(function (_, $module$react, $module$react_router_h6p15h, com_ustadmobile_core_wrappers_compressorjs_default_j4zdfk, $module$libphonenumber_js_s63wkw, $module$react_router_dom_s6xi74, $module$uuid, kotlin_kotlin, kotlin_dev_icerock_moko_resources, kotlin_com_ustadmobile_app_lib_database, kotlin_org_kodein_di_kodein_di, kotlin_org_kodein_type_kaverit, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_com_github_UstadMobile_door_door_runtime, kotlin_io_ktor_ktor_client_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_io_github_aakira_napier, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_github_pdvrieze_xmlutil_serialization, kotlin_io_github_pdvrieze_xmlutil_core, kotlin_com_benasher44_uuid, kotlin_com_ustadmobile_app_lib_util, kotlin_org_jetbrains_kotlinx_kotlinx_datetime, kotlin_net_thauvin_erik_urlencoder_urlencoder_lib, kotlin_com_github_UstadMobile_xmlpullparserkmp, kotlin_io_ktor_ktor_utils, kotlin_UstadMobile_lib_xxhashkmp_core, kotlin_app_cash_paging_paging_common, kotlin_moe_tlaster_precompose_viewmodel, kotlin_UstadMobile_lib_centralappconfigdb_common, kotlin_com_russhwolf_multiplatform_settings, kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core, kotlin_org_jetbrains_kotlin_wrappers_kotlin_react, kotlin_org_jetbrains_kotlin_wrappers_kotlin_web, kotlin_org_jetbrains_kotlin_wrappers_kotlin_js) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var createContext = $module$react.createContext;
  var useState = $module$react.useState;
  var useNavigate = $module$react_router_h6p15h.useNavigate;
  var useLocation = $module$react_router_h6p15h.useLocation;
  var useMemo = $module$react.useMemo;
  var useState_0 = $module$react.useState;
  var parsePhoneNumber = $module$libphonenumber_js_s63wkw.parsePhoneNumber;
  var useSearchParams = $module$react_router_dom_s6xi74.useSearchParams;
  var v4 = $module$uuid.v4;
  var THROW_CCE = kotlin_kotlin.$_$.hi;
  var SupportedLocale = kotlin_dev_icerock_moko_resources.$_$.b;
  var listOf = kotlin_kotlin.$_$.l8;
  var SupportedLocales = kotlin_dev_icerock_moko_resources.$_$.a;
  var Impl = kotlin_dev_icerock_moko_resources.$_$.d;
  var StringResource = kotlin_dev_icerock_moko_resources.$_$.f;
  var protoOf = kotlin_kotlin.$_$.wc;
  var objectMeta = kotlin_kotlin.$_$.vc;
  var setMetadataFor = kotlin_kotlin.$_$.xc;
  var PluralsResource = kotlin_dev_icerock_moko_resources.$_$.e;
  var VOID = kotlin_kotlin.$_$.f;
  var getBooleanHashCode = kotlin_kotlin.$_$.rb;
  var equals = kotlin_kotlin.$_$.ob;
  var classMeta = kotlin_kotlin.$_$.lb;
  var IllegalStateException = kotlin_kotlin.$_$.yh;
  var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.b2;
  var captureStack = kotlin_kotlin.$_$.fb;
  var CoroutineImpl = kotlin_kotlin.$_$.va;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.ha;
  var PersonAuth2 = kotlin_com_ustadmobile_app_lib_database.$_$.k4;
  var Companion_instance = kotlin_com_ustadmobile_app_lib_database.$_$.w7;
  var Unit_instance = kotlin_kotlin.$_$.m5;
  var Companion_instance_0 = kotlin_org_kodein_di_kodein_di.$_$.c;
  var getKClass = kotlin_kotlin.$_$.e;
  var arrayOf = kotlin_kotlin.$_$.wi;
  var createKType = kotlin_kotlin.$_$.b;
  var typeToken = kotlin_org_kodein_type_kaverit.$_$.d;
  var TypeToken = kotlin_org_kodein_type_kaverit.$_$.b;
  var isInterface = kotlin_kotlin.$_$.gc;
  var On = kotlin_org_kodein_di_kodein_di.$_$.n;
  var UmAppDataLayer = kotlin_com_ustadmobile_app_lib_database.$_$.j;
  var Instance = kotlin_org_kodein_di_kodein_di.$_$.m;
  var get_diContext = kotlin_org_kodein_di_kodein_di.$_$.i;
  var get_diTrigger = kotlin_org_kodein_di_kodein_di.$_$.j;
  var DIAware = kotlin_org_kodein_di_kodein_di.$_$.k;
  var KProperty1 = kotlin_kotlin.$_$.vd;
  var getPropertyCallableRef = kotlin_kotlin.$_$.ub;
  var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u2;
  var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w;
  var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f;
  var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p2;
  var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q2;
  var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;
  var LazyThreadSafetyMode_NONE_getInstance = kotlin_kotlin.$_$.h;
  var lazy = kotlin_kotlin.$_$.ej;
  var objectCreate = kotlin_kotlin.$_$.uc;
  var Url = kotlin_io_ktor_ktor_http.$_$.v;
  var endsWith = kotlin_kotlin.$_$.xe;
  var getStringHashCode = kotlin_kotlin.$_$.vb;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v;
  var StandardScopeRegistry = kotlin_org_kodein_di_kodein_di.$_$.g;
  var $serializer_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.u7;
  var $serializer_getInstance_0 = kotlin_com_ustadmobile_app_lib_database.$_$.y7;
  var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a1;
  var $serializer_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.k8;
  var $serializer_getInstance_2 = kotlin_com_ustadmobile_app_lib_database.$_$.b8;
  var removePrefix = kotlin_kotlin.$_$.rf;
  var removeSuffix = kotlin_kotlin.$_$.sf;
  var hashCode = kotlin_kotlin.$_$.wb;
  var compareValues = kotlin_kotlin.$_$.fa;
  var List = kotlin_kotlin.$_$.w5;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.n6;
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.l;
  var UserSession = kotlin_com_ustadmobile_app_lib_database.$_$.b5;
  var Person = kotlin_com_ustadmobile_app_lib_database.$_$.q4;
  var sortedWith = kotlin_kotlin.$_$.o9;
  var plus = kotlin_kotlin.$_$.z8;
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a2;
  var get_direct = kotlin_org_kodein_di_kodein_di.$_$.o;
  var Companion_instance_1 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.b3;
  var UmAppDatabase = kotlin_com_ustadmobile_app_lib_database.$_$.k;
  var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n2;
  var collectLatest = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
  var PersonAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.h1;
  var shallowCopy = kotlin_com_ustadmobile_app_lib_database.$_$.v1;
  var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.p;
  var Pair = kotlin_kotlin.$_$.ei;
  var bodyAsText = kotlin_io_ktor_ktor_client_core.$_$.a;
  var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u3;
  var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i3;
  var get_doorPrimaryKeyManager = kotlin_com_github_UstadMobile_door_door_runtime.$_$.k;
  var Companion_instance_2 = kotlin_com_ustadmobile_app_lib_database.$_$.l8;
  var get_doorWrapperNodeId = kotlin_com_github_UstadMobile_door_door_runtime.$_$.l;
  var systemTimeInMillis = kotlin_com_github_UstadMobile_door_door_runtime.$_$.d2;
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
  var listOf_0 = kotlin_kotlin.$_$.k8;
  var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a;
  var StringCompanionObject_instance = kotlin_kotlin.$_$.a5;
  var serializer_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b1;
  var ListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;
  var toSet = kotlin_kotlin.$_$.aa;
  var toList = kotlin_kotlin.$_$.t9;
  var Long = kotlin_kotlin.$_$.ai;
  var Comparator = kotlin_kotlin.$_$.rh;
  var FlowCollector = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c1;
  var withDoorTransactionAsync = kotlin_com_github_UstadMobile_door_door_runtime.$_$.w2;
  var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.j;
  var url = kotlin_io_ktor_ktor_client_core.$_$.n;
  var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
  var contentType = kotlin_io_ktor_ktor_http.$_$.c1;
  var setBodyJson = kotlin_com_github_UstadMobile_door_door_runtime.$_$.q;
  var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
  var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.q;
  var Exception_init_$Create$ = kotlin_kotlin.$_$.n1;
  var NodeIdAndAuth = kotlin_com_github_UstadMobile_door_door_runtime.$_$.b;
  var toHexString = kotlin_kotlin.$_$.sg;
  var to = kotlin_kotlin.$_$.nj;
  var parameter = kotlin_io_ktor_ktor_client_core.$_$.m;
  var Napier_getInstance = kotlin_io_github_aakira_napier.$_$.g;
  var UmAccount = kotlin_com_ustadmobile_app_lib_database.$_$.a5;
  var ensureNotNull = kotlin_kotlin.$_$.zi;
  var DoorDatabaseRepository = kotlin_com_github_UstadMobile_door_door_runtime.$_$.g2;
  var header = kotlin_io_ktor_ktor_client_core.$_$.l;
  var set_expectSuccess = kotlin_io_ktor_ktor_client_core.$_$.h;
  var Companion_getInstance_0 = kotlin_io_ktor_ktor_http.$_$.i;
  var addAll = kotlin_kotlin.$_$.e6;
  var Companion_instance_3 = kotlin_com_ustadmobile_app_lib_database.$_$.v7;
  var Companion_instance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.x7;
  var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.t;
  var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.o;
  var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c;
  var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v;
  var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b2;
  var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z1;
  var MutableStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e1;
  var asStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h1;
  var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l;
  var isCharSequence = kotlin_kotlin.$_$.cc;
  var trim = kotlin_kotlin.$_$.jh;
  var toString = kotlin_kotlin.$_$.bd;
  var buildClassSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u1;
  var XmlInput = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.c;
  var EventType_END_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.d;
  var EventType_START_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.f;
  var XmlSerialName = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.e;
  var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n2;
  var emptyList = kotlin_kotlin.$_$.i7;
  var XmlValue = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.f;
  var Regex_init_$Create$ = kotlin_kotlin.$_$.d1;
  var contains = kotlin_kotlin.$_$.qe;
  var firstOrNull = kotlin_kotlin.$_$.n7;
  var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s2;
  var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
  var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;
  var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;
  var IllegalArgumentException = kotlin_kotlin.$_$.xh;
  var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.v1;
  var $serializer_getInstance_3 = kotlin_com_ustadmobile_app_lib_database.$_$.d7;
  var $serializer_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.a7;
  var mapOf = kotlin_kotlin.$_$.o8;
  var Companion_instance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.o6;
  var Companion_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.e7;
  var Exception = kotlin_kotlin.$_$.wh;
  var interfaceMeta = kotlin_kotlin.$_$.xb;
  var Exception_init_$Init$ = kotlin_kotlin.$_$.m1;
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.u1;
  var shallowCopy_0 = kotlin_com_ustadmobile_app_lib_database.$_$.s1;
  var uuid4 = kotlin_com_benasher44_uuid.$_$.a;
  var Companion_getInstance_2 = kotlin_kotlin.$_$.g5;
  var serializer_1 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i1;
  var MapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
  var plus_0 = kotlin_kotlin.$_$.t8;
  var XapiSessionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.t2;
  var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.f2;
  var compareTo = kotlin_kotlin.$_$.mb;
  var mapOf_0 = kotlin_kotlin.$_$.n8;
  var shallowCopy_1 = kotlin_com_ustadmobile_app_lib_database.$_$.y1;
  var PersonNames = kotlin_com_ustadmobile_app_lib_database.$_$.i1;
  var first = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
  var toLong = kotlin_kotlin.$_$.zc;
  var toString_0 = kotlin_kotlin.$_$.mj;
  var CancellationException = kotlin_kotlin.$_$.ga;
  var Enum = kotlin_kotlin.$_$.uh;
  var Companion_instance_6 = kotlin_com_ustadmobile_app_lib_database.$_$.f7;
  var Companion_instance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.c8;
  var Companion_instance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.m7;
  var Companion_instance_9 = kotlin_com_ustadmobile_app_lib_database.$_$.h7;
  var Companion_instance_10 = kotlin_com_ustadmobile_app_lib_database.$_$.b7;
  var charSequenceLength = kotlin_kotlin.$_$.jb;
  var Companion_getInstance_3 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.e3;
  var get_isActive = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l2;
  var delay = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k;
  var TransferJobItemStatus_COMPLETE_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.c5;
  var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
  var plus_1 = kotlin_kotlin.$_$.a9;
  var Companion_instance_11 = kotlin_com_ustadmobile_app_lib_database.$_$.c7;
  var Companion_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.n6;
  var randomString = kotlin_com_ustadmobile_app_lib_util.$_$.c;
  var Companion_instance_12 = kotlin_com_ustadmobile_app_lib_database.$_$.p6;
  var Companion_getInstance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.l7;
  var CoursePermission = kotlin_com_ustadmobile_app_lib_database.$_$.w3;
  var Exception_init_$Init$_0 = kotlin_kotlin.$_$.l1;
  var IllegalStateException_init_$Init$_0 = kotlin_kotlin.$_$.x1;
  var Companion_instance_13 = kotlin_com_ustadmobile_app_lib_database.$_$.r7;
  var ClazzEnrolment_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.i5;
  var Companion_getInstance_6 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.e;
  var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.s1;
  var EnrolmentRequest = kotlin_com_ustadmobile_app_lib_database.$_$.a4;
  var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.i;
  var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.h2;
  var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v2;
  var enumEntries = kotlin_kotlin.$_$.za;
  var INT_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i;
  var PrimitiveSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l1;
  var mapCapacity = kotlin_kotlin.$_$.m8;
  var coerceAtLeast = kotlin_kotlin.$_$.jd;
  var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.u;
  var UrlEncoderUtil_getInstance = kotlin_net_thauvin_erik_urlencoder_urlencoder_lib.$_$.a;
  var doorNodeIdHeader = kotlin_com_github_UstadMobile_door_door_runtime.$_$.j;
  var $serializer_getInstance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.x6;
  var setInputString = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.c;
  var substringBeforeLast = kotlin_kotlin.$_$.gg;
  var Collection = kotlin_kotlin.$_$.p5;
  var ContentEntryParentChildJoin = kotlin_com_ustadmobile_app_lib_database.$_$.i3;
  var toMutableList = kotlin_kotlin.$_$.x9;
  var checkIndexOverflow = kotlin_kotlin.$_$.l6;
  var Companion_instance_14 = kotlin_com_ustadmobile_app_lib_database.$_$.g7;
  var getOrNull = kotlin_kotlin.$_$.t7;
  var decodeBase64Bytes = kotlin_io_ktor_ktor_utils.$_$.u;
  var decodeToString = kotlin_kotlin.$_$.se;
  var PersonPasskey = kotlin_com_ustadmobile_app_lib_database.$_$.o4;
  var split = kotlin_kotlin.$_$.zf;
  var startsWith = kotlin_kotlin.$_$.ag;
  var Companion_instance_15 = kotlin_com_ustadmobile_app_lib_database.$_$.p7;
  var Companion_instance_16 = kotlin_com_ustadmobile_app_lib_database.$_$.z6;
  var plus_2 = kotlin_kotlin.$_$.x8;
  var emptySet = kotlin_kotlin.$_$.k7;
  var first_0 = kotlin_kotlin.$_$.p7;
  var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.f;
  var charSequenceGet = kotlin_kotlin.$_$.ib;
  var Char = kotlin_kotlin.$_$.ph;
  var isDigit = kotlin_kotlin.$_$.ff;
  var toString_1 = kotlin_kotlin.$_$.c3;
  var isLetter = kotlin_kotlin.$_$.hf;
  var joinToString = kotlin_kotlin.$_$.a8;
  var Companion_instance_17 = kotlin_com_ustadmobile_app_lib_database.$_$.r6;
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.u2;
  var indexOf = kotlin_kotlin.$_$.df;
  var emptyMap = kotlin_kotlin.$_$.j7;
  var first_1 = kotlin_kotlin.$_$.q7;
  var distinct = kotlin_kotlin.$_$.f7;
  var until = kotlin_kotlin.$_$.rd;
  var PeerReviewerAllocation = kotlin_com_ustadmobile_app_lib_database.$_$.i4;
  var Companion_instance_18 = kotlin_com_ustadmobile_app_lib_database.$_$.t7;
  var toMap = kotlin_kotlin.$_$.w9;
  var checkCountOverflow = kotlin_kotlin.$_$.k6;
  var shuffled = kotlin_kotlin.$_$.l9;
  var shallowCopy_2 = kotlin_com_ustadmobile_app_lib_database.$_$.e2;
  var SystemPermission = kotlin_com_ustadmobile_app_lib_database.$_$.w4;
  var Companion_instance_19 = kotlin_com_ustadmobile_app_lib_database.$_$.z7;
  var PersonParentJoin = kotlin_com_ustadmobile_app_lib_database.$_$.n4;
  var Companion_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.i8;
  var IllegalArgumentException_init_$Init$_0 = kotlin_kotlin.$_$.t1;
  var filterNotNull = kotlin_kotlin.$_$.m7;
  var Iterator = kotlin_kotlin.$_$.t5;
  var numberToLong = kotlin_kotlin.$_$.tc;
  var isWhitespace = kotlin_kotlin.$_$.lf;
  var setOf = kotlin_kotlin.$_$.k9;
  var firstOrNull_0 = kotlin_kotlin.$_$.ze;
  var Companion_instance_20 = kotlin_com_ustadmobile_app_lib_database.$_$.d6;
  var Exception_init_$Init$_1 = kotlin_kotlin.$_$.o1;
  var Json_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.n;
  var uuidFrom = kotlin_com_benasher44_uuid.$_$.b;
  var Companion_getInstance_8 = kotlin_kotlin.$_$.e5;
  var _Duration___get_inWholeMilliseconds__impl__msfiry = kotlin_kotlin.$_$.s2;
  var XapiEntityObjectTypeFlags_instance = kotlin_com_ustadmobile_app_lib_database.$_$.j6;
  var plus_3 = kotlin_kotlin.$_$.w8;
  var System_instance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.c;
  var Uuid_init_$Create$ = kotlin_com_benasher44_uuid.$_$.c;
  var encodeBase64 = kotlin_io_ktor_ktor_utils.$_$.v;
  var get_jsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.v;
  var get_intOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.t;
  var replace = kotlin_kotlin.$_$.uf;
  var toBooleanStrictOrNull = kotlin_kotlin.$_$.mg;
  var listOfNotNull = kotlin_kotlin.$_$.j8;
  var flow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o1;
  var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c;
  var Companion_instance_21 = kotlin_com_ustadmobile_app_lib_database.$_$.e6;
  var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.c5;
  var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
  var ActivityEntity = kotlin_com_ustadmobile_app_lib_database.$_$.i2;
  var Companion_instance_22 = kotlin_com_ustadmobile_app_lib_database.$_$.f6;
  var Companion_instance_23 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;
  var ActivityExtensionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.j2;
  var ActivityLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.l2;
  var ActivityInteractionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.k2;
  var JsonContentPolymorphicSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.g;
  var get_jsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.u;
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.gj;
  var ActorEntity = kotlin_com_ustadmobile_app_lib_database.$_$.m2;
  var JsonDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;
  var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.y1;
  var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.j;
  var Companion_instance_24 = kotlin_com_ustadmobile_app_lib_database.$_$.h6;
  var StatementContextActivityJoin = kotlin_com_ustadmobile_app_lib_database.$_$.o2;
  var Companion_instance_25 = kotlin_com_ustadmobile_app_lib_database.$_$.g6;
  var GroupMemberActorJoin = kotlin_com_ustadmobile_app_lib_database.$_$.n2;
  var serializer_2 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s3;
  var THROW_IAE = kotlin_kotlin.$_$.ii;
  var FloatSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;
  var getNumberHashCode = kotlin_kotlin.$_$.tb;
  var StatementEntity = kotlin_com_ustadmobile_app_lib_database.$_$.q2;
  var StatementEntityJson = kotlin_com_ustadmobile_app_lib_database.$_$.p2;
  var JsonNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.i;
  var VerbEntity = kotlin_com_ustadmobile_app_lib_database.$_$.r2;
  var VerbLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.s2;
  var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.g;
  var toDuration = kotlin_kotlin.$_$.mh;
  var Duration__toIsoString_impl_9h6wsm = kotlin_kotlin.$_$.t2;
  var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.l;
  var atomic$long$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
  var $serializer_getInstance_6 = kotlin_com_ustadmobile_app_lib_database.$_$.k6;
  var values = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.j;
  var isBlank = kotlin_kotlin.$_$.ef;
  var toInt = kotlin_kotlin.$_$.ug;
  var sorted = kotlin_kotlin.$_$.p9;
  var Module_init_$Create$ = kotlin_org_kodein_di_kodein_di.$_$.a;
  var ImplWithScope = kotlin_org_kodein_di_kodein_di.$_$.h;
  var Provider = kotlin_org_kodein_di_kodein_di.$_$.d;
  var Singleton = kotlin_org_kodein_di_kodein_di.$_$.f;
  var XXStringHasher = kotlin_UstadMobile_lib_xxhashkmp_core.$_$.d;
  var Companion_instance_26 = kotlin_com_ustadmobile_app_lib_database.$_$.d8;
  var Companion_instance_27 = kotlin_com_ustadmobile_app_lib_database.$_$.i6;
  var Companion_instance_28 = kotlin_com_ustadmobile_app_lib_database.$_$.w6;
  var Companion_instance_29 = kotlin_com_ustadmobile_app_lib_database.$_$.f8;
  var BufferOverflow_DROP_OLDEST_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
  var MutableSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d1;
  var asSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g1;
  var PagingSource = kotlin_app_cash_paging_paging_common.$_$.i;
  var Page_init_$Create$ = kotlin_app_cash_paging_paging_common.$_$.j;
  var LoadResult = kotlin_app_cash_paging_paging_common.$_$.h;
  var JsonPrimitive_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.k;
  var XmlPullParserConstants_instance = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.d;
  var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.b3;
  var mutableLinkedListOf = kotlin_com_github_UstadMobile_door_door_runtime.$_$.m;
  var ChannelResult__getOrThrow_impl_od1axs = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
  var _ChannelResult___get_isSuccess__impl__odq1z9 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
  var Channel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z;
  var fillArrayVal = kotlin_kotlin.$_$.qb;
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.f1;
  var indexOf_0 = kotlin_kotlin.$_$.cf;
  var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.w2;
  var lastIndexOf = kotlin_kotlin.$_$.nf;
  var HashMap_init_$Create$ = kotlin_kotlin.$_$.p;
  var round = kotlin_kotlin.$_$.fd;
  var lazy_0 = kotlin_kotlin.$_$.fj;
  var roundToInt = kotlin_kotlin.$_$.ed;
  var substringBefore = kotlin_kotlin.$_$.jg;
  var Companion_instance_30 = kotlin_com_ustadmobile_app_lib_database.$_$.y6;
  var timeout = kotlin_io_ktor_ktor_client_core.$_$.i;
  var Companion_instance_31 = kotlin_com_ustadmobile_app_lib_database.$_$.g8;
  var Companion_getInstance_9 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.i;
  var toLocalDateTime = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.q;
  var toInstant = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.o;
  var periodUntil = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.n;
  var JsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.f;
  var LocalTime_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
  var LocalDateTime_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.a;
  var distinctUntilChanged = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l1;
  var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.w;
  var Companion_getInstance_10 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.d;
  var minus = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.l;
  var toMap_0 = kotlin_kotlin.$_$.v9;
  var substringBefore_0 = kotlin_kotlin.$_$.ig;
  var toMutableSet = kotlin_kotlin.$_$.z9;
  var titlecase = kotlin_kotlin.$_$.lg;
  var isLowerCase = kotlin_kotlin.$_$.jf;
  var offsetAt = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.m;
  var PersonGroup = kotlin_com_ustadmobile_app_lib_database.$_$.l4;
  var PersonGroupMember_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.j5;
  var ScopedGrant = kotlin_com_ustadmobile_app_lib_database.$_$.s4;
  var abs = kotlin_kotlin.$_$.cd;
  var padStart = kotlin_kotlin.$_$.qf;
  var substringAfterLast = kotlin_kotlin.$_$.dg;
  var equals_0 = kotlin_kotlin.$_$.ye;
  var SerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p1;
  var toLong_0 = kotlin_kotlin.$_$.xg;
  var LanguageDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.q5;
  var LeavingReason = kotlin_com_ustadmobile_app_lib_database.$_$.g4;
  var Companion_getInstance_11 = kotlin_com_ustadmobile_app_lib_database.$_$.s7;
  var lastOrNull = kotlin_kotlin.$_$.g8;
  var KProperty0 = kotlin_kotlin.$_$.ud;
  var THROW_ISE = kotlin_kotlin.$_$.ji;
  var getLocalDelegateReference = kotlin_kotlin.$_$.sb;
  var ViewModel = kotlin_moe_tlaster_precompose_viewmodel.$_$.b;
  var ViewModel_init_$Init$ = kotlin_moe_tlaster_precompose_viewmodel.$_$.a;
  var get_viewModelScope = kotlin_moe_tlaster_precompose_viewmodel.$_$.c;
  var toMutableMap = kotlin_kotlin.$_$.y9;
  var Companion_instance_32 = kotlin_com_ustadmobile_app_lib_database.$_$.l6;
  var toBoolean = kotlin_kotlin.$_$.ng;
  var InstanceOrNull = kotlin_org_kodein_di_kodein_di.$_$.l;
  var PermissionFlags_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.s5;
  var ClazzAndDetailPermissions = kotlin_com_ustadmobile_app_lib_database.$_$.n;
  var mutableListOf = kotlin_kotlin.$_$.q8;
  var PermissionTriple = kotlin_com_ustadmobile_app_lib_database.$_$.e1;
  var ClazzAndDisplayDetails = kotlin_com_ustadmobile_app_lib_database.$_$.o;
  var combine = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j1;
  var ClazzWithHolidayCalendarAndAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.d3;
  var CourseBlockAndEditEntities = kotlin_com_ustadmobile_app_lib_database.$_$.x;
  var Schedule = kotlin_com_ustadmobile_app_lib_database.$_$.r4;
  var Companion_getInstance_12 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s;
  var shareIn = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q1;
  var $serializer_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.z5;
  var $serializer_getInstance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.e8;
  var $serializer_getInstance_9 = kotlin_com_ustadmobile_app_lib_database.$_$.u6;
  var CourseBlockPicture = kotlin_com_ustadmobile_app_lib_database.$_$.r3;
  var CoursePicture = kotlin_com_ustadmobile_app_lib_database.$_$.x3;
  var shallowCopy_3 = kotlin_com_ustadmobile_app_lib_database.$_$.b2;
  var shallowCopy_4 = kotlin_com_ustadmobile_app_lib_database.$_$.g2;
  var getDefaultTimeZoneId = kotlin_com_ustadmobile_app_lib_util.$_$.a;
  var CourseTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.y3;
  var Companion_instance_33 = kotlin_com_ustadmobile_app_lib_database.$_$.v6;
  var Companion_getInstance_13 = kotlin_com_ustadmobile_app_lib_database.$_$.a6;
  var deactivateByUids = kotlin_com_ustadmobile_app_lib_database.$_$.f5;
  var deactivateByUids_0 = kotlin_com_ustadmobile_app_lib_database.$_$.g5;
  var deactivateByUids_1 = kotlin_com_ustadmobile_app_lib_database.$_$.h5;
  var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g2;
  var awaitAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
  var Companion_instance_34 = kotlin_com_ustadmobile_app_lib_database.$_$.o7;
  var BlockStatus = kotlin_com_ustadmobile_app_lib_database.$_$.m;
  var Page = kotlin_app_cash_paging_paging_common.$_$.g;
  var Invalid = kotlin_app_cash_paging_paging_common.$_$.f;
  var Error_0 = kotlin_app_cash_paging_paging_common.$_$.e;
  var StudentAndBlockStatuses = kotlin_com_ustadmobile_app_lib_database.$_$.k1;
  var PagingSourceWithHttpLoader = kotlin_com_github_UstadMobile_door_door_runtime.$_$.s1;
  var DelegatedInvalidationPagingSource = kotlin_com_github_UstadMobile_door_door_runtime.$_$.m1;
  var ClazzEnrolmentDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.m5;
  var ClazzInviteAndClazz = kotlin_com_ustadmobile_app_lib_database.$_$.p;
  var last = kotlin_kotlin.$_$.h8;
  var ClazzDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.l5;
  var PermissionPair = kotlin_com_ustadmobile_app_lib_database.$_$.d1;
  var first_2 = kotlin_kotlin.$_$.r7;
  var eachCount = kotlin_kotlin.$_$.h7;
  var AverageCourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.x2;
  var CourseAssignmentMarkAndMarkerName = kotlin_com_ustadmobile_app_lib_database.$_$.v;
  var SubmissionAndFiles = kotlin_com_ustadmobile_app_lib_database.$_$.l1;
  var ClazzAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.z2;
  var AssignmentProgressSummary = kotlin_com_ustadmobile_app_lib_database.$_$.u2;
  var ClazzAssignmentDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.k5;
  var ClazzAssignmentCourseBlockAndSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.y2;
  var throwKotlinNothingValueException = kotlin_kotlin.$_$.jj;
  var CourseAssignmentSubmission = kotlin_com_ustadmobile_app_lib_database.$_$.q3;
  var Comments = kotlin_com_ustadmobile_app_lib_database.$_$.f3;
  var CourseAssignmentSubmissionFile = kotlin_com_ustadmobile_app_lib_database.$_$.p3;
  var CourseAssignmentMarkDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.o5;
  var CourseGroupSet = kotlin_com_ustadmobile_app_lib_database.$_$.v3;
  var shallowCopy_5 = kotlin_com_ustadmobile_app_lib_database.$_$.c2;
  var CourseBlock = kotlin_com_ustadmobile_app_lib_database.$_$.s3;
  var $serializer_getInstance_10 = kotlin_com_ustadmobile_app_lib_database.$_$.n7;
  var AssignmentSubmitterSummary = kotlin_com_ustadmobile_app_lib_database.$_$.w2;
  var AssignmentSubmitterAndAllocations = kotlin_com_ustadmobile_app_lib_database.$_$.v2;
  var Companion_getInstance_14 = kotlin_com_ustadmobile_app_lib_database.$_$.m6;
  var CourseBlockAndAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.w;
  var AssignmentPermissionAndActiveUserSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.l;
  var CourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.o3;
  var ClazzNameAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.q;
  var ClazzEnrolmentWithLeavingReason = kotlin_com_ustadmobile_app_lib_database.$_$.a3;
  var Companion_instance_35 = kotlin_com_ustadmobile_app_lib_database.$_$.q6;
  var flowOf = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n1;
  var Clazz = kotlin_com_ustadmobile_app_lib_database.$_$.e3;
  var Companion_instance_36 = kotlin_com_ustadmobile_app_lib_database.$_$.s6;
  var ClazzLog = kotlin_com_ustadmobile_app_lib_database.$_$.c3;
  var shallowCopy_6 = kotlin_com_ustadmobile_app_lib_database.$_$.a2;
  var Companion_instance_37 = kotlin_com_ustadmobile_app_lib_database.$_$.t6;
  var Companion_instance_38 = kotlin_com_ustadmobile_app_lib_database.$_$.b6;
  var ClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.b3;
  var PersonAndClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.f1;
  var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.t1;
  var shallowCopy_7 = kotlin_com_ustadmobile_app_lib_database.$_$.q1;
  var ContentEntry = kotlin_com_ustadmobile_app_lib_database.$_$.n3;
  var AttemptsPersonListConst_instance = kotlin_com_ustadmobile_app_lib_database.$_$.w5;
  var firstOrNull_1 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
  var SessionTimeAndProgressInfoConst_instance = kotlin_com_ustadmobile_app_lib_database.$_$.u5;
  var StatementConst_instance = kotlin_com_ustadmobile_app_lib_database.$_$.v5;
  var ContentEntryAndDetail = kotlin_com_ustadmobile_app_lib_database.$_$.t;
  var ContentEntryVersion = kotlin_com_ustadmobile_app_lib_database.$_$.m3;
  var OfflineItemAndState = kotlin_com_ustadmobile_app_lib_database.$_$.c1;
  var distinctUntilChangedBy = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k1;
  var Companion_instance_39 = kotlin_com_ustadmobile_app_lib_database.$_$.j8;
  var Companion_instance_40 = kotlin_com_ustadmobile_app_lib_database.$_$.y5;
  var shallowCopy_8 = kotlin_com_ustadmobile_app_lib_database.$_$.z1;
  var ContentEntryPicture2 = kotlin_com_ustadmobile_app_lib_database.$_$.j3;
  var ContentEntryAndContentJob = kotlin_com_ustadmobile_app_lib_database.$_$.s;
  var ContentEntryImportJob = kotlin_com_ustadmobile_app_lib_database.$_$.h3;
  var Companion_instance_41 = kotlin_com_ustadmobile_app_lib_database.$_$.x5;
  var setOf_0 = kotlin_kotlin.$_$.j9;
  var ContentEntryDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.n5;
  var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w2;
  var CourseBlockAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.y;
  var CourseGroupMemberAndName = kotlin_com_ustadmobile_app_lib_database.$_$.t3;
  var CourseGroupMember = kotlin_com_ustadmobile_app_lib_database.$_$.u3;
  var Companion_instance_42 = kotlin_com_ustadmobile_app_lib_database.$_$.i7;
  var Companion_instance_43 = kotlin_com_ustadmobile_app_lib_database.$_$.j7;
  var Companion_instance_44 = kotlin_com_ustadmobile_app_lib_database.$_$.k7;
  var shallowCopy_9 = kotlin_com_ustadmobile_app_lib_database.$_$.u1;
  var CourseGroupSetDaoConstants_instance = kotlin_com_ustadmobile_app_lib_database.$_$.p5;
  var shallowCopy_10 = kotlin_com_ustadmobile_app_lib_database.$_$.r1;
  var DiscussionPost = kotlin_com_ustadmobile_app_lib_database.$_$.z3;
  var Companion_instance_45 = kotlin_com_ustadmobile_app_lib_database.$_$.q7;
  var printStackTrace = kotlin_kotlin.$_$.ij;
  var XML = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.d;
  var Site = kotlin_com_ustadmobile_app_lib_database.$_$.v4;
  var daysUntil = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.k;
  var Message = kotlin_com_ustadmobile_app_lib_database.$_$.h4;
  var NotImplementedError = kotlin_kotlin.$_$.ci;
  var shallowCopy_11 = kotlin_com_ustadmobile_app_lib_database.$_$.x1;
  var Companion_instance_46 = kotlin_com_ustadmobile_app_lib_database.$_$.a8;
  var PersonAndDisplayDetail = kotlin_com_ustadmobile_app_lib_database.$_$.j4;
  var EditAndViewPermission = kotlin_com_ustadmobile_app_lib_database.$_$.a1;
  var PersonPicture = kotlin_com_ustadmobile_app_lib_database.$_$.p4;
  var CentralAppConfigDbDataSource = kotlin_UstadMobile_lib_centralappconfigdb_common.$_$.b;
  var getSystemTimeInMillis = kotlin_com_ustadmobile_app_lib_util.$_$.b;
  var PersonDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.r5;
  var println = kotlin_kotlin.$_$.bb;
  var Settings = kotlin_com_russhwolf_multiplatform_settings.$_$.a;
  var get_lastIndex = kotlin_kotlin.$_$.e8;
  var SiteTermsAndLangName = kotlin_com_ustadmobile_app_lib_database.$_$.j1;
  var contains_0 = kotlin_kotlin.$_$.o6;
  var SiteTerms = kotlin_com_ustadmobile_app_lib_database.$_$.u4;
  var Companion_instance_47 = kotlin_com_ustadmobile_app_lib_database.$_$.h8;
  var shallowCopy_12 = kotlin_com_ustadmobile_app_lib_database.$_$.d2;
  var mutableMapOf = kotlin_kotlin.$_$.r8;
  var addChild = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.d;
  var addChildNode = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.a;
  var FC = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react.$_$.a;
  var toUrlQueryString = kotlin_com_github_UstadMobile_door_door_runtime.$_$.s;
  var json = kotlin_kotlin.$_$.lc;
  var KMutableProperty0 = kotlin_kotlin.$_$.td;
  var useEffect = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.i;
  var isSuccess = kotlin_io_ktor_ktor_http.$_$.h1;
  var TransferJobItemStatus_FAILED_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.d5;
  var TransferJob = kotlin_com_ustadmobile_app_lib_database.$_$.y4;
  var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
  var TransferJobItem = kotlin_com_ustadmobile_app_lib_database.$_$.x4;
  var TransferJobItemStatus_IN_PROGRESS_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.e5;
  var NonCancellable_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y;
  var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
  var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v1;
  var randomUuid = kotlin_com_github_UstadMobile_door_door_runtime.$_$.c2;
  var fetch_0 = kotlin_org_jetbrains_kotlin_wrappers_kotlin_web.$_$.a;
  var IllegalStateException_init_$Create$_1 = kotlin_kotlin.$_$.c2;
  var Companion_getInstance_15 = kotlin_io_ktor_ktor_http.$_$.c;
  var TextContent = kotlin_io_ktor_ktor_http.$_$.q;
  var JsType_instance = kotlin_io_ktor_ktor_utils.$_$.b;
  var typeInfoImpl = kotlin_io_ktor_ktor_utils.$_$.k;
  var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.p;
  var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
  var Text_getInstance = kotlin_io_ktor_ktor_http.$_$.d;
  var doorNodeAndVersionHeaders = kotlin_com_github_UstadMobile_door_door_runtime.$_$.i;
  var IntCompanionObject_instance = kotlin_kotlin.$_$.y4;
  var cancel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h2;
  var useRequiredContext = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.j;
  var getKClassFromExpression = kotlin_kotlin.$_$.d;
  var format = kotlin_dev_icerock_moko_resources.$_$.g;
  var XmlPullParserFactory = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.a;
  var XXStringHasherJs = kotlin_UstadMobile_lib_xxhashkmp_core.$_$.b;
  var XXHasher64FactoryJs = kotlin_UstadMobile_lib_xxhashkmp_core.$_$.a;
  var XXHasher64Factory = kotlin_UstadMobile_lib_xxhashkmp_core.$_$.c;
  var Default_getInstance_0 = kotlin_kotlin.$_$.b5;
  var Antilog = kotlin_io_github_aakira_napier.$_$.h;
  var LogLevel_VERBOSE_getInstance = kotlin_io_github_aakira_napier.$_$.e;
  var LogLevel_DEBUG_getInstance = kotlin_io_github_aakira_napier.$_$.b;
  var toSet_0 = kotlin_org_jetbrains_kotlin_wrappers_kotlin_js.$_$.b;
  //endregion
  //region block: pre-declaration
  setMetadataFor(strings, 'strings', objectMeta);
  setMetadataFor(plurals, 'plurals', objectMeta);
  setMetadataFor(MR, 'MR', objectMeta);
  setMetadataFor(AccountRegisterOptions, 'AccountRegisterOptions', classMeta, VOID, VOID, AccountRegisterOptions);
  setMetadataFor(AdultAccountRequiredException, 'AdultAccountRequiredException', classMeta, IllegalStateException, VOID, AdultAccountRequiredException);
  setMetadataFor($setAuthCOROUTINE$1, '$setAuthCOROUTINE$1', classMeta, CoroutineImpl);
  setMetadataFor(AuthManager, 'AuthManager', classMeta, VOID, [DIAware], VOID, VOID, VOID, [2]);
  setMetadataFor(ConsentNotGrantedException, 'ConsentNotGrantedException', classMeta, IllegalStateException, VOID, ConsentNotGrantedException);
  setMetadataFor(Companion, 'Companion', objectMeta);
  setMetadataFor($serializer, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(LearningSpace, 'LearningSpace', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_11});
  setMetadataFor(Companion_0, 'Companion', objectMeta);
  setMetadataFor(LearningSpaceScope, 'LearningSpaceScope', classMeta, VOID, VOID, LearningSpaceScope);
  setMetadataFor(Pbkdf2Params, 'Pbkdf2Params', classMeta, VOID, VOID, Pbkdf2Params);
  setMetadataFor(Companion_1, 'Companion', objectMeta);
  setMetadataFor($serializer_0, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(RegisterRequest, 'RegisterRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_12});
  setMetadataFor(UnauthorizedException, 'UnauthorizedException', classMeta, IllegalStateException, VOID, UnauthorizedException);
  setMetadataFor(Companion_2, 'Companion', objectMeta);
  setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(UserSessionWithPersonAndLearningSpace, 'UserSessionWithPersonAndLearningSpace', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_13});
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda, 'UstadAccountManager$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda_1, 'UstadAccountManager$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda_1, 'UstadAccountManager$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda_1, 'UstadAccountManager$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(UstadAccountManager$registerWithPasskey$slambda$slambda, 'UstadAccountManager$registerWithPasskey$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda$slambda, 'UstadAccountManager$register$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda$slambda_1, 'UstadAccountManager$register$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_3, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta);
  setMetadataFor(UstadAccountManager$slambda, 'UstadAccountManager$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda_1, 'UstadAccountManager$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$makeNewTempGuestSession$slambda, 'UstadAccountManager$makeNewTempGuestSession$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$registerWithPasskey$slambda, 'UstadAccountManager$registerWithPasskey$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda, 'UstadAccountManager$register$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$addSession$slambda, 'UstadAccountManager$addSession$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$loginWithPasskey$slambda, 'UstadAccountManager$loginWithPasskey$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$login$slambda, 'UstadAccountManager$login$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($activeSessionsListCOROUTINE$2, '$activeSessionsListCOROUTINE$2', classMeta, CoroutineImpl);
  setMetadataFor($activeSessionCountCOROUTINE$3, '$activeSessionCountCOROUTINE$3', classMeta, CoroutineImpl);
  setMetadataFor($addSessionCOROUTINE$4, '$addSessionCOROUTINE$4', classMeta, CoroutineImpl);
  setMetadataFor($endSessionCOROUTINE$6, '$endSessionCOROUTINE$6', classMeta, CoroutineImpl);
  setMetadataFor($getSiteFromDbOrLoadFromHttpCOROUTINE$7, '$getSiteFromDbOrLoadFromHttpCOROUTINE$7', classMeta, CoroutineImpl);
  setMetadataFor($startGuestSessionCOROUTINE$9, '$startGuestSessionCOROUTINE$9', classMeta, CoroutineImpl);
  setMetadataFor(UstadAccountManager, 'UstadAccountManager', classMeta, VOID, VOID, VOID, VOID, VOID, [1, 2, 4, 3, 5, 0]);
  setMetadataFor(Companion_4, 'Companion', objectMeta);
  setMetadataFor(Companion_5, 'Companion', objectMeta);
  setMetadataFor(Anchor, 'Anchor', classMeta, VOID, VOID, Anchor, VOID, {0: AnchorSerializer_getInstance});
  setMetadataFor(AnchorSerializer, 'AnchorSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_6, 'Companion', objectMeta);
  setMetadataFor(Body, 'Body', classMeta, VOID, VOID, VOID, VOID, {0: BodySerializer_getInstance});
  setMetadataFor(BodySerializer, 'BodySerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_7, 'Companion', objectMeta);
  setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ListItem, 'ListItem', classMeta, VOID, VOID, ListItem, VOID, {0: $serializer_getInstance_14});
  setMetadataFor(Companion_8, 'Companion', objectMeta);
  setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavElement, 'NavElement', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_15});
  setMetadataFor(Companion_9, 'Companion', objectMeta);
  setMetadataFor($serializer_4, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavigationDocument, 'NavigationDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_16});
  setMetadataFor(Companion_10, 'Companion', objectMeta);
  setMetadataFor($serializer_5, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(OrderedList, 'OrderedList', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_17});
  setMetadataFor(Companion_11, 'Companion', objectMeta);
  setMetadataFor(Span, 'Span', classMeta, VOID, VOID, Span, VOID, {0: SpanSerializer_getInstance});
  setMetadataFor(SpanSerializer, 'SpanSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor($serializer_6, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Content, 'Content', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_18});
  setMetadataFor(Companion_12, 'Companion', objectMeta);
  setMetadataFor($serializer_7, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DocTitle, 'DocTitle', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_19});
  setMetadataFor(Companion_13, 'Companion', objectMeta);
  setMetadataFor($serializer_8, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Head, 'Head', classMeta, VOID, VOID, Head, VOID, {0: $serializer_getInstance_20});
  setMetadataFor($serializer_9, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavLabel, 'NavLabel', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_21});
  setMetadataFor(Companion_14, 'Companion', objectMeta);
  setMetadataFor($serializer_10, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavMap, 'NavMap', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_22});
  setMetadataFor(Companion_15, 'Companion', objectMeta);
  setMetadataFor($serializer_11, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavPoint, 'NavPoint', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_23});
  setMetadataFor(Companion_16, 'Companion', objectMeta);
  setMetadataFor($serializer_12, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NcxDocument, 'NcxDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_24});
  setMetadataFor(Companion_17, 'Companion', objectMeta);
  setMetadataFor($serializer_13, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Text, 'Text', classMeta, VOID, VOID, Text, VOID, {0: $serializer_getInstance_25});
  setMetadataFor(Companion_18, 'Companion', objectMeta);
  setMetadataFor($serializer_14, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcCreator, 'DcCreator', classMeta, VOID, VOID, DcCreator, VOID, {0: $serializer_getInstance_26});
  setMetadataFor(Companion_19, 'Companion', objectMeta);
  setMetadataFor($serializer_15, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcDescription, 'DcDescription', classMeta, VOID, VOID, DcDescription, VOID, {0: $serializer_getInstance_27});
  setMetadataFor(Companion_20, 'Companion', objectMeta);
  setMetadataFor($serializer_16, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcIdentifier, 'DcIdentifier', classMeta, VOID, VOID, DcIdentifier, VOID, {0: $serializer_getInstance_28});
  setMetadataFor($serializer_17, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcLanguage, 'DcLanguage', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_29});
  setMetadataFor(Companion_21, 'Companion', objectMeta);
  setMetadataFor($serializer_18, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcTitle, 'DcTitle', classMeta, VOID, VOID, DcTitle, VOID, {0: $serializer_getInstance_30});
  setMetadataFor($serializer_19, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Item, 'Item', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_31});
  setMetadataFor(Companion_22, 'Companion', objectMeta);
  setMetadataFor($serializer_20, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ItemRef, 'ItemRef', classMeta, VOID, VOID, ItemRef, VOID, {0: $serializer_getInstance_32});
  setMetadataFor(Companion_23, 'Companion', objectMeta);
  setMetadataFor($serializer_21, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Manifest, 'Manifest', classMeta, VOID, VOID, Manifest, VOID, {0: $serializer_getInstance_33});
  setMetadataFor(Companion_24, 'Companion', objectMeta);
  setMetadataFor($serializer_22, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Meta, 'Meta', classMeta, VOID, VOID, Meta, VOID, {0: $serializer_getInstance_34});
  setMetadataFor(Companion_25, 'Companion', objectMeta);
  setMetadataFor($serializer_23, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Metadata, 'Metadata', classMeta, VOID, VOID, Metadata, VOID, {0: $serializer_getInstance_35});
  setMetadataFor(Companion_26, 'Companion', objectMeta);
  setMetadataFor($serializer_24, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PackageDocument, 'PackageDocument', classMeta, VOID, VOID, PackageDocument, VOID, {0: $serializer_getInstance_36});
  setMetadataFor(Companion_27, 'Companion', objectMeta);
  setMetadataFor($serializer_25, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Spine, 'Spine', classMeta, VOID, VOID, Spine, VOID, {0: $serializer_getInstance_37});
  setMetadataFor(Companion_28, 'Companion', objectMeta);
  setMetadataFor($serializer_26, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifest, 'ContentManifest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_38});
  setMetadataFor(Companion_29, 'Companion', objectMeta);
  setMetadataFor($serializer_27, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifestEntry, 'ContentManifestEntry', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_39});
  setMetadataFor(Companion_30, 'Companion', objectMeta);
  setMetadataFor($serializer_28, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MediaContentInfo, 'MediaContentInfo', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_40});
  setMetadataFor($serializer_29, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MediaSource, 'MediaSource', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_41});
  setMetadataFor(Companion_31, 'Companion', objectMeta);
  setMetadataFor($serializer_30, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SubtitleTrack, 'SubtitleTrack', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_42});
  setMetadataFor(InvalidContentException, 'InvalidContentException', classMeta, IllegalArgumentException);
  setMetadataFor(Companion_32, 'Companion', objectMeta);
  setMetadataFor($serializer_31, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MetadataResult, 'MetadataResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_43});
  setMetadataFor(PersonConstants, 'PersonConstants', objectMeta);
  setMetadataFor(SubmissionConstants, 'SubmissionConstants', objectMeta);
  setMetadataFor(TerminologyKeys, 'TerminologyKeys', objectMeta);
  setMetadataFor(ValidateUsernameUseCase, 'ValidateUsernameUseCase', classMeta, VOID, VOID, ValidateUsernameUseCase);
  setMetadataFor($invokeCOROUTINE$10, '$invokeCOROUTINE$10', classMeta, CoroutineImpl);
  setMetadataFor(CheckRegistrationAllowedUseCase, 'CheckRegistrationAllowedUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CreateNewLocalAccountUseCase, 'CreateNewLocalAccountUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SetPasswordUseCase, 'SetPasswordUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(AssignmentSubmissionException, 'AssignmentSubmissionException', classMeta, Exception);
  setMetadataFor(AccountIsNotSubmitterException, 'AccountIsNotSubmitterException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentAlreadySubmittedException, 'AssignmentAlreadySubmittedException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentDeadlinePassedException, 'AssignmentDeadlinePassedException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentTextTooLongException, 'AssignmentTextTooLongException', classMeta, AssignmentSubmissionException);
  setMetadataFor(SubmitAssignmentResult, 'SubmitAssignmentResult', classMeta);
  setMetadataFor($invokeCOROUTINE$11, '$invokeCOROUTINE$11', classMeta, CoroutineImpl);
  setMetadataFor(SubmitAssignmentUseCase, 'SubmitAssignmentUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(SubmitMarkUseCase$invoke$slambda, 'SubmitMarkUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$12, '$invokeCOROUTINE$12', classMeta, CoroutineImpl);
  setMetadataFor(SubmitMarkUseCase, 'SubmitMarkUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda, 'GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$14, '$collectCOROUTINE$14', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$13, '$invokeCOROUTINE$13', classMeta, CoroutineImpl);
  setMetadataFor(GetAssignmentSubmitterNameUseCase, 'GetAssignmentSubmitterNameUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ZipFileUseCase, 'ZipFileUseCase', interfaceMeta);
  setMetadataFor(BlobTransferJobItem, 'BlobTransferJobItem', classMeta);
  setMetadataFor(BlobTransferProgressUpdate, 'BlobTransferProgressUpdate', classMeta);
  setMetadataFor(BlobTransferStatusUpdate, 'BlobTransferStatusUpdate', classMeta);
  setMetadataFor(CancelDownloadUseCase, 'CancelDownloadUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(MakeContentEntryAvailableOfflineUseCase, 'MakeContentEntryAvailableOfflineUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(GetContentManifestUseCase, 'GetContentManifestUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(OpenBlobItem, 'OpenBlobItem', classMeta);
  setMetadataFor($invokeCOROUTINE$17, '$invokeCOROUTINE$17', classMeta, CoroutineImpl);
  setMetadataFor(OpenBlobUiUseCase, 'OpenBlobUiUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(OpenBlobIntent, 'OpenBlobIntent', classMeta, Enum);
  setMetadataFor(OpenBlobUseCase, 'OpenBlobUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(OpeningBlobState, 'OpeningBlobState', classMeta);
  setMetadataFor(SaveAndUploadLocalUrisUseCase$updateUris$slambda, 'SaveAndUploadLocalUrisUseCase$updateUris$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$18, '$invokeCOROUTINE$18', classMeta, CoroutineImpl);
  setMetadataFor(SaveAndUploadLocalUrisUseCase, 'SaveAndUploadLocalUrisUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_33, 'Companion', objectMeta);
  setMetadataFor($serializer_32, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SaveLocalUriAsBlobItem, 'SaveLocalUriAsBlobItem', classMeta);
  setMetadataFor(SavedBlob, 'SavedBlob', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_44});
  function invoke$default(localUrisToSave, onTransferJobItemCreated, $completion, $super) {
    var tmp;
    if (onTransferJobItemCreated === VOID) {
      tmp = SaveLocalUrisAsBlobsUseCase$invoke$lambda;
    } else {
      tmp = onTransferJobItemCreated;
    }
    onTransferJobItemCreated = tmp;
    return $super === VOID ? this.aos(localUrisToSave, onTransferJobItemCreated, $completion) : $super.aos.call(this, localUrisToSave, onTransferJobItemCreated, $completion);
  }
  setMetadataFor(SaveLocalUrisAsBlobsUseCase, 'SaveLocalUrisAsBlobsUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueSavePictureUseCase, 'EnqueueSavePictureUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(Companion_34, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$19, '$invokeCOROUTINE$19', classMeta, CoroutineImpl);
  setMetadataFor(SavePictureUseCase, 'SavePictureUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(TransferJobItemStatusUpdater$updateJob$slambda, 'TransferJobItemStatusUpdater$updateJob$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TransferJobItemStatusUpdater$commit$slambda, 'TransferJobItemStatusUpdater$commit$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($commitCOROUTINE$20, '$commitCOROUTINE$20', classMeta, CoroutineImpl);
  setMetadataFor($onFinishedCOROUTINE$21, '$onFinishedCOROUTINE$21', classMeta, CoroutineImpl);
  setMetadataFor(TransferJobItemStatusUpdater, 'TransferJobItemStatusUpdater', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$22, '$invokeCOROUTINE$22', classMeta, CoroutineImpl);
  setMetadataFor(UpdateTransferJobItemEtagUseCase, 'UpdateTransferJobItemEtagUseCase', classMeta, VOID, VOID, UpdateTransferJobItemEtagUseCase, VOID, VOID, [4]);
  setMetadataFor(Companion_35, 'Companion', objectMeta);
  setMetadataFor(CancelBlobUploadClientUseCase, 'CancelBlobUploadClientUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EnqueueBlobUploadItem, 'EnqueueBlobUploadItem', classMeta);
  function invoke$default_0(items, batchUuid, chunkSize, tableId, entityUid, $completion, $super) {
    var tmp;
    if (chunkSize === VOID) {
      tmp = 524288;
    } else {
      tmp = chunkSize;
    }
    chunkSize = tmp;
    tableId = tableId === VOID ? 0 : tableId;
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    return $super === VOID ? this.tox(items, batchUuid, chunkSize, tableId, entityUid, $completion) : $super.tox.call(this, items, batchUuid, chunkSize, tableId, entityUid, $completion);
  }
  setMetadataFor(EnqueueBlobUploadClientUseCase, 'EnqueueBlobUploadClientUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor($getLocalUriIfRemoteCOROUTINE$23, '$getLocalUriIfRemoteCOROUTINE$23', classMeta, CoroutineImpl);
  function invoke$default_1(url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion, $super) {
    progressInterval = progressInterval === VOID ? 500 : progressInterval;
    var tmp;
    if (onStateChange === VOID) {
      tmp = GetStoragePathForUrlUseCase$invoke$lambda;
    } else {
      tmp = onStateChange;
    }
    onStateChange = tmp;
    inflateToTmpFileIfCompressed = inflateToTmpFileIfCompressed === VOID ? false : inflateToTmpFileIfCompressed;
    return $super === VOID ? this.joy(url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion) : $super.joy.call(this, url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion);
  }
  setMetadataFor(GetStoragePathForUrlUseCase, 'GetStoragePathForUrlUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(CreateNewClazzUseCase$invoke$slambda, 'CreateNewClazzUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CreateNewClazzUseCase, 'CreateNewClazzUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AlreadyEnroledInClassException, 'AlreadyEnroledInClassException', classMeta, Exception, VOID, AlreadyEnroledInClassException);
  setMetadataFor(AlreadyHasPendingRequestException, 'AlreadyHasPendingRequestException', classMeta, IllegalStateException, VOID, AlreadyHasPendingRequestException);
  setMetadataFor(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda, 'ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$24, '$invokeCOROUTINE$24', classMeta, CoroutineImpl);
  setMetadataFor(IApproveOrDeclinePendingEnrolmentRequestUseCase, 'IApproveOrDeclinePendingEnrolmentRequestUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ApproveOrDeclinePendingEnrolmentUseCase, 'ApproveOrDeclinePendingEnrolmentUseCase', classMeta, VOID, [IApproveOrDeclinePendingEnrolmentRequestUseCase], VOID, VOID, VOID, [2]);
  setMetadataFor(EnrolIntoCourseUseCase$invoke$slambda, 'EnrolIntoCourseUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$25, '$invokeCOROUTINE$25', classMeta, CoroutineImpl);
  setMetadataFor(EnrolIntoCourseUseCase, 'EnrolIntoCourseUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$26, '$invokeCOROUTINE$26', classMeta, CoroutineImpl);
  setMetadataFor(RequestEnrolmentUseCase, 'RequestEnrolmentUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(SetClipboardStringUseCase, 'SetClipboardStringUseCase', interfaceMeta);
  setMetadataFor(Companion_36, 'Companion', objectMeta);
  setMetadataFor($serializer_33, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CompressParams, 'CompressParams', classMeta, VOID, VOID, CompressParams, VOID, {0: $serializer_getInstance_45});
  setMetadataFor(CompressResult, 'CompressResult', classMeta);
  function invoke$default_2(fromUri, toUri, params, onProgress, $completion, $super) {
    toUri = toUri === VOID ? null : toUri;
    params = params === VOID ? new CompressParams() : params;
    onProgress = onProgress === VOID ? null : onProgress;
    return $super === VOID ? this.cp2(fromUri, toUri, params, onProgress, $completion) : $super.cp2.call(this, fromUri, toUri, params, onProgress, $completion);
  }
  setMetadataFor(CompressUseCase, 'CompressUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(Companion_37, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompressionLevel, 'CompressionLevel', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_54});
  setMetadataFor(CompressionLevelSerializer, 'CompressionLevelSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(ContentManifestMap, 'ContentManifestMap', classMeta);
  setMetadataFor(DeleteContentEntryParentChildJoinUseCase$invoke$slambda, 'DeleteContentEntryParentChildJoinUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DeleteContentEntryParentChildJoinUseCase, 'DeleteContentEntryParentChildJoinUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_38, 'Companion', objectMeta);
  setMetadataFor(ContentEntryGetMetaDataFromUriUseCase, 'ContentEntryGetMetaDataFromUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(ContentEntryGetMetadataStatus, 'ContentEntryGetMetadataStatus', classMeta, VOID, VOID, ContentEntryGetMetadataStatus);
  setMetadataFor(UnsupportedContentException, 'UnsupportedContentException', classMeta, Exception);
  setMetadataFor(Companion_39, 'Companion', objectMeta);
  function invoke$default_3(subtitleTrackUri, filename, locale, $completion, $super) {
    locale = locale === VOID ? null : locale;
    return $super === VOID ? this.xp3(subtitleTrackUri, filename, locale, $completion) : $super.xp3.call(this, subtitleTrackUri, filename, locale, $completion);
  }
  setMetadataFor(GetSubtitleTrackFromUriUseCase, 'GetSubtitleTrackFromUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(CancelImportContentEntryUseCase, 'CancelImportContentEntryUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$27, '$invokeCOROUTINE$27', classMeta, CoroutineImpl);
  setMetadataFor(CancelRemoteContentEntryImportUseCase, 'CancelRemoteContentEntryImportUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$28, '$invokeCOROUTINE$28', classMeta, CoroutineImpl);
  setMetadataFor(DismissRemoteContentEntryImportErrorUseCase, 'DismissRemoteContentEntryImportErrorUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueContentEntryImportUseCase, 'EnqueueContentEntryImportUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$29, '$invokeCOROUTINE$29', classMeta, CoroutineImpl);
  setMetadataFor(EnqueueImportContentEntryUseCaseRemote, 'EnqueueImportContentEntryUseCaseRemote', classMeta, VOID, [EnqueueContentEntryImportUseCase], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_40, 'Companion', objectMeta);
  setMetadataFor($serializer_34, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ImportRequest, 'ImportRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_46});
  setMetadataFor(LaunchContentEntryVersionUseCase, 'LaunchContentEntryVersionUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(DefaultLaunchContentEntryVersionUseCase, 'DefaultLaunchContentEntryVersionUseCase', classMeta, VOID, [LaunchContentEntryVersionUseCase], DefaultLaunchContentEntryVersionUseCase, VOID, VOID, [5]);
  setMetadataFor(LaunchResult, 'LaunchResult', classMeta, VOID, VOID, LaunchResult);
  setMetadataFor(LaunchEpubUseCase, 'LaunchEpubUseCase', interfaceMeta, VOID, [LaunchContentEntryVersionUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(LaunchXapiUseCase, 'LaunchXapiUseCase', interfaceMeta, VOID, [LaunchContentEntryVersionUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(XapiLaunchHrefResult, 'XapiLaunchHrefResult', classMeta);
  setMetadataFor(ResolveXapiLaunchHrefUseCase$invoke$slambda, 'ResolveXapiLaunchHrefUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$30, '$invokeCOROUTINE$30', classMeta, CoroutineImpl);
  setMetadataFor(ResolveXapiLaunchHrefUseCase, 'ResolveXapiLaunchHrefUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(MoveContentEntriesUseCase, 'MoveContentEntriesUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SaveContentEntryUseCase$invoke$slambda, 'SaveContentEntryUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$31, '$invokeCOROUTINE$31', classMeta, CoroutineImpl);
  setMetadataFor(SaveContentEntryUseCase, 'SaveContentEntryUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(AddOrUpdateCourseBlockUseCase, 'AddOrUpdateCourseBlockUseCase', classMeta, VOID, VOID, AddOrUpdateCourseBlockUseCase);
  setMetadataFor(UpdateCourseBlocksOnReorderOrCommitUseCase, 'UpdateCourseBlocksOnReorderOrCommitUseCase', classMeta, VOID, VOID, UpdateCourseBlocksOnReorderOrCommitUseCase);
  setMetadataFor(CreatePasskeyResult, 'CreatePasskeyResult', classMeta);
  setMetadataFor(PasskeyCreatedResult, 'PasskeyCreatedResult', classMeta, CreatePasskeyResult);
  setMetadataFor(UserCanceledResult, 'UserCanceledResult', classMeta, CreatePasskeyResult);
  setMetadataFor(Error_1, 'Error', classMeta, CreatePasskeyResult);
  setMetadataFor(CreatePasskeyUseCase, 'CreatePasskeyUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CredentialResult, 'CredentialResult', classMeta);
  setMetadataFor(PasswordCredentialResult, 'PasswordCredentialResult', classMeta, CredentialResult);
  setMetadataFor(PasskeyCredentialResult, 'PasskeyCredentialResult', classMeta, CredentialResult);
  setMetadataFor(NoCredentialAvailableResult, 'NoCredentialAvailableResult', classMeta, CredentialResult);
  setMetadataFor(UserCanceledResult_0, 'UserCanceledResult', classMeta, CredentialResult);
  setMetadataFor(Error_2, 'Error', classMeta, CredentialResult);
  setMetadataFor(GetCredentialUseCase, 'GetCredentialUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_41, 'Companion', objectMeta);
  setMetadataFor($serializer_35, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PasskeyVerifyResult, 'PasskeyVerifyResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_47});
  setMetadataFor(SavePersonPasskeyUseCase, 'SavePersonPasskeyUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(DecodeUserHandleUseCase, 'DecodeUserHandleUseCase', interfaceMeta);
  setMetadataFor(Companion_42, 'Companion', objectMeta);
  setMetadataFor($serializer_36, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationExtensionsClientOutputsJSON, 'AuthenticationExtensionsClientOutputsJSON', classMeta, VOID, VOID, AuthenticationExtensionsClientOutputsJSON, VOID, {0: $serializer_getInstance_48});
  setMetadataFor(Companion_43, 'Companion', objectMeta);
  setMetadataFor($serializer_37, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationExtensionsPRFOutputsJSON, 'AuthenticationExtensionsPRFOutputsJSON', classMeta, VOID, VOID, AuthenticationExtensionsPRFOutputsJSON, VOID, {0: $serializer_getInstance_49});
  setMetadataFor(Companion_44, 'Companion', objectMeta);
  setMetadataFor($serializer_38, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationResponseJSON, 'AuthenticationResponseJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_50});
  setMetadataFor($serializer_39, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticatorAssertionResponseJSON, 'AuthenticatorAssertionResponseJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_51});
  setMetadataFor(Companion_45, 'Companion', objectMeta);
  setMetadataFor($serializer_40, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClientDataJSON, 'ClientDataJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_52});
  setMetadataFor(SavePasswordUseCase, 'SavePasswordUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CreateCredentialUsernameUseCase, 'CreateCredentialUsernameUseCase', classMeta);
  setMetadataFor(ParseCredentialUsernameUseCase, 'ParseCredentialUsernameUseCase', classMeta, VOID, VOID, ParseCredentialUsernameUseCase);
  setMetadataFor(DeletePermanentlyUseCase, 'DeletePermanentlyUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RestoreDeletedItemUseCase$invoke$slambda, 'RestoreDeletedItemUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RestoreDeletedItemUseCase, 'RestoreDeletedItemUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$32, '$invokeCOROUTINE$32', classMeta, CoroutineImpl);
  setMetadataFor(GetEpubTableOfContentsUseCase, 'GetEpubTableOfContentsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_46, 'Companion', objectMeta);
  setMetadataFor(FilterUsernameUseCase, 'FilterUsernameUseCase', classMeta, VOID, VOID, FilterUsernameUseCase);
  setMetadataFor(GetApiUrlUseCase, 'GetApiUrlUseCase', interfaceMeta);
  setMetadataFor(GetApiUrlUseCaseDirect, 'GetApiUrlUseCaseDirect', classMeta, VOID, [GetApiUrlUseCase]);
  setMetadataFor(VersionInfo, 'VersionInfo', classMeta);
  setMetadataFor(GetVersionUseCase, 'GetVersionUseCase', interfaceMeta);
  setMetadataFor(HideKeyboardUseCase, 'HideKeyboardUseCase', interfaceMeta);
  setMetadataFor(GetHtmlContentDisplayEngineOptionsUseCase, 'GetHtmlContentDisplayEngineOptionsUseCase', classMeta);
  setMetadataFor(GetHtmlContentDisplayEngineUseCase, 'GetHtmlContentDisplayEngineUseCase', classMeta);
  setMetadataFor(Companion_47, 'Companion', objectMeta);
  setMetadataFor(SetHtmlContentDisplayEngineUseCase, 'SetHtmlContentDisplayEngineUseCase', classMeta);
  setMetadataFor(ExceptionWithStringResource, 'ExceptionWithStringResource', interfaceMeta);
  setMetadataFor(ClazzInviteRedeemException, 'ClazzInviteRedeemException', classMeta, Exception, [Exception, ExceptionWithStringResource]);
  setMetadataFor(ClazzInviteRedeemUseCase$invoke$slambda, 'ClazzInviteRedeemUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$33, '$invokeCOROUTINE$33', classMeta, CoroutineImpl);
  setMetadataFor(ClazzInviteRedeemUseCase, 'ClazzInviteRedeemUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(ClazzRedeemResult, 'ClazzRedeemResult', classMeta);
  setMetadataFor($invokeCOROUTINE$34, '$invokeCOROUTINE$34', classMeta, CoroutineImpl);
  setMetadataFor(EnrollToCourseFromInviteCodeUseCase, 'EnrollToCourseFromInviteCodeUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ParseInviteUseCase, 'ParseInviteUseCase', classMeta);
  setMetadataFor(Companion_48, 'Companion', objectMeta);
  setMetadataFor($serializer_41, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SendClazzInvitesRequest, 'SendClazzInvitesRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_53});
  setMetadataFor(SendClazzInvitesUseCase, 'SendClazzInvitesUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$35, '$invokeCOROUTINE$35', classMeta, CoroutineImpl);
  setMetadataFor(SendClazzInvitesUseCaseSendToServerImpl, 'SendClazzInvitesUseCaseSendToServerImpl', classMeta, VOID, [SendClazzInvitesUseCase], VOID, VOID, VOID, [1]);
  setMetadataFor(SetLangResult, 'SetLangResult', classMeta);
  function invoke$default_4(uiLang, currentDestination, navController, navArgs, $super) {
    navArgs = navArgs === VOID ? emptyMap() : navArgs;
    return $super === VOID ? this.mpi(uiLang, currentDestination, navController, navArgs) : $super.mpi.call(this, uiLang, currentDestination, navController, navArgs);
  }
  setMetadataFor(SetLanguageUseCase, 'SetLanguageUseCase', interfaceMeta);
  setMetadataFor(LaunchOpenLicensesUseCase, 'LaunchOpenLicensesUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(GoToLearningSpaceUseCase, 'GoToLearningSpaceUseCase', interfaceMeta);
  setMetadataFor(GetLocalAccountsSupportedUseCase, 'GetLocalAccountsSupportedUseCase', classMeta);
  setMetadataFor(CheckContentLocalAvailabilityUseCase, 'CheckContentLocalAvailabilityUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_49, 'Companion', objectMeta);
  setMetadataFor(SetLocalSharingEnabledUseCase, 'SetLocalSharingEnabledUseCase', classMeta);
  setMetadataFor(MakeLinkUseCase, 'MakeLinkUseCase', classMeta);
  setMetadataFor(GetDefaultDestinationUseCase, 'GetDefaultDestinationUseCase', classMeta);
  setMetadataFor(OnClickLinkUseCase, 'OnClickLinkUseCase', classMeta);
  setMetadataFor(Companion_50, 'Companion', objectMeta);
  setMetadataFor(LinkTarget, 'LinkTarget', classMeta, Enum);
  setMetadataFor(OpenExternalLinkUseCase, 'OpenExternalLinkUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$36, '$invokeCOROUTINE$36', classMeta, CoroutineImpl);
  setMetadataFor(UpdatePeerReviewAllocationUseCase, 'UpdatePeerReviewAllocationUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(AddNewPersonUseCase$invoke$slambda, 'AddNewPersonUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddNewPersonUseCase, 'AddNewPersonUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(BulkAddPersonException, 'BulkAddPersonException', classMeta, IllegalArgumentException);
  setMetadataFor($serializer_42, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonsDataError, 'BulkAddPersonsDataError', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_54});
  setMetadataFor(BulkAddPersonsFromLocalUriUseCase, 'BulkAddPersonsFromLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(Companion_51, 'Companion', objectMeta);
  setMetadataFor($serializer_43, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddUsersResult, 'BulkAddUsersResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_55});
  setMetadataFor(IPhoneNumberUtil, 'IPhoneNumberUtil', interfaceMeta);
  setMetadataFor(OnClickPhoneNumUseCase, 'OnClickPhoneNumUseCase', interfaceMeta);
  setMetadataFor(PhoneNumValidatorUseCase, 'PhoneNumValidatorUseCase', interfaceMeta);
  setMetadataFor(OnClickEmailUseCase, 'OnClickEmailUseCase', interfaceMeta);
  setMetadataFor(ShareAppUseCase, 'ShareAppUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ShareTextUseCase, 'ShareTextUseCase', interfaceMeta);
  setMetadataFor(GetShowPoweredByUseCase, 'GetShowPoweredByUseCase', classMeta);
  setMetadataFor(Companion_52, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$37, '$invokeCOROUTINE$37', classMeta, CoroutineImpl);
  setMetadataFor(GetLocaleForSiteTermsUseCase, 'GetLocaleForSiteTermsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(OnClickSendSmsUseCase, 'OnClickSendSmsUseCase', interfaceMeta);
  setMetadataFor(Companion_53, 'Companion', objectMeta);
  setMetadataFor(DismissSocialWarningUseCase, 'DismissSocialWarningUseCase', classMeta);
  setMetadataFor(Companion_54, 'Companion', objectMeta);
  setMetadataFor(ShowSocialWarningUseCase, 'ShowSocialWarningUseCase', classMeta);
  setMetadataFor(DeleteUrisUseCase, 'DeleteUrisUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(IsTempFileCheckerUseCase, 'IsTempFileCheckerUseCase', interfaceMeta);
  setMetadataFor(ChunkIterator, 'ChunkIterator', classMeta, VOID, [Iterator]);
  setMetadataFor(Chunk, 'Chunk', classMeta);
  setMetadataFor(ChunkInfo, 'ChunkInfo', classMeta);
  setMetadataFor(UploadProgress, 'UploadProgress', classMeta);
  setMetadataFor(LastChunkResponse, 'LastChunkResponse', classMeta);
  function invoke$default_5(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion, $super) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    chunkSize = chunkSize === VOID ? get_DEFAULT_CHUNK_SIZE() : chunkSize;
    var tmp;
    if (onProgress === VOID) {
      tmp = ChunkedUploadClientLocalUriUseCase$invoke$lambda;
    } else {
      tmp = onProgress;
    }
    onProgress = tmp;
    var tmp_0;
    if (onStatusChange === VOID) {
      tmp_0 = ChunkedUploadClientLocalUriUseCase$invoke$lambda_0;
    } else {
      tmp_0 = onStatusChange;
    }
    onStatusChange = tmp_0;
    lastChunkHeaders = lastChunkHeaders === VOID ? null : lastChunkHeaders;
    return $super === VOID ? this.ppn(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) : $super.ppn.call(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
  }
  setMetadataFor(ChunkedUploadClientLocalUriUseCase, 'ChunkedUploadClientLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [8]);
  setMetadataFor(Companion_55, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$41, '$invokeCOROUTINE$41', classMeta, CoroutineImpl);
  setMetadataFor(GetUsernameSuggestionUseCase, 'GetUsernameSuggestionUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(StartUserSessionUseCase, 'StartUserSessionUseCase', classMeta);
  setMetadataFor(ValidateEmailUseCase, 'ValidateEmailUseCase', classMeta, VOID, VOID, ValidateEmailUseCase);
  setMetadataFor(Companion_56, 'Companion', objectMeta);
  setMetadataFor(ValidateUsernameUseCase_0, 'ValidateUsernameUseCase', classMeta, VOID, VOID, ValidateUsernameUseCase_0);
  setMetadataFor(Companion_57, 'Companion', objectMeta);
  setMetadataFor(ValidationResult, 'ValidationResult', classMeta, VOID, VOID, ValidationResult);
  setMetadataFor(StoreActivitiesUseCase$invoke$slambda, 'StoreActivitiesUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$42, '$invokeCOROUTINE$42', classMeta, CoroutineImpl);
  setMetadataFor(StoreActivitiesUseCase, 'StoreActivitiesUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(XapiException, 'XapiException', classMeta, Exception);
  setMetadataFor(XapiJson, 'XapiJson', classMeta, VOID, VOID, XapiJson);
  setMetadataFor(StatementStoreResult, 'StatementStoreResult', classMeta);
  setMetadataFor(XapiStatementResource$storeStatements$slambda, 'XapiStatementResource$storeStatements$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($storeStatementsCOROUTINE$43, '$storeStatementsCOROUTINE$43', classMeta, CoroutineImpl);
  setMetadataFor($postCOROUTINE$45, '$postCOROUTINE$45', classMeta, CoroutineImpl);
  setMetadataFor(XapiStatementResource, 'XapiStatementResource', classMeta, VOID, VOID, VOID, VOID, VOID, [2, 3]);
  setMetadataFor(XapiGroupAndPersonUidMap, 'XapiGroupAndPersonUidMap', classMeta);
  setMetadataFor($invokeCOROUTINE$47, '$invokeCOROUTINE$47', classMeta, CoroutineImpl);
  setMetadataFor(CreateXapiGroupForCourseGroupUseCase, 'CreateXapiGroupForCourseGroupUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor($insertOrUpdateActorsIfNameChangedCOROUTINE$48, '$insertOrUpdateActorsIfNameChangedCOROUTINE$48', classMeta, CoroutineImpl);
  setMetadataFor($insertOrUpdateIfLastModChangedCOROUTINE$49, '$insertOrUpdateIfLastModChangedCOROUTINE$49', classMeta, CoroutineImpl);
  setMetadataFor(FormattedStatementResponse, 'FormattedStatementResponse', classMeta);
  setMetadataFor(Companion_58, 'Companion', objectMeta);
  setMetadataFor(FormatStatementResponseUseCase$invoke$slambda, 'FormatStatementResponseUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(FormatStatementResponseUseCase, 'FormatStatementResponseUseCase', classMeta);
  setMetadataFor(Companion_59, 'Companion', objectMeta);
  setMetadataFor($serializer_44, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Attachment, 'Attachment', classMeta, VOID, VOID, Attachment, VOID, {0: $serializer_getInstance_56});
  setMetadataFor(Companion_60, 'Companion', objectMeta);
  setMetadataFor($serializer_45, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiAccount, 'XapiAccount', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_57});
  setMetadataFor(Companion_61, 'Companion', objectMeta);
  setMetadataFor($serializer_46, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Interaction, 'Interaction', classMeta, VOID, VOID, Interaction, VOID, {0: $serializer_getInstance_58});
  setMetadataFor(Companion_62, 'Companion', objectMeta);
  setMetadataFor($serializer_47, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivity, 'XapiActivity', classMeta, VOID, VOID, XapiActivity, VOID, {0: $serializer_getInstance_59});
  setMetadataFor(ActivityEntities, 'ActivityEntities', classMeta);
  setMetadataFor(Companion_63, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiActor, 'XapiActor', interfaceMeta, VOID, VOID, VOID, VOID, {0: XapiActorSerializer_getInstance});
  setMetadataFor(XapiActorSerializer, 'XapiActorSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(ActorEntities, 'ActorEntities', classMeta);
  setMetadataFor(Companion_64, 'Companion', objectMeta);
  setMetadataFor($serializer_48, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementObject, 'XapiStatementObject', interfaceMeta, VOID, VOID, VOID, VOID, {0: XapiStatementObjectSerializer_getInstance});
  setMetadataFor(XapiAgent, 'XapiAgent', classMeta, VOID, [XapiActor, XapiStatementObject], XapiAgent, VOID, {0: $serializer_getInstance_60});
  setMetadataFor(Companion_65, 'Companion', objectMeta);
  setMetadataFor($serializer_49, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContext, 'XapiContext', classMeta, VOID, VOID, XapiContext, VOID, {0: $serializer_getInstance_61});
  setMetadataFor(Companion_66, 'Companion', objectMeta);
  setMetadataFor(XapiContextActivities, 'XapiContextActivities', classMeta, VOID, VOID, XapiContextActivities, VOID, {0: XapiContextActivitiesSerializer_getInstance});
  setMetadataFor(XapiContextActivitiesSerializer, 'XapiContextActivitiesSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_67, 'Companion', objectMeta);
  setMetadataFor($serializer_50, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContextActivitiesSurrogate, 'XapiContextActivitiesSurrogate', classMeta, VOID, VOID, XapiContextActivitiesSurrogate, VOID, {0: $serializer_getInstance_62});
  setMetadataFor(Companion_68, 'Companion', objectMeta);
  setMetadataFor($serializer_51, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiGroup, 'XapiGroup', classMeta, VOID, [XapiActor, XapiStatementObject], XapiGroup, VOID, {0: $serializer_getInstance_63});
  setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(Companion_69, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiInteractionType, 'XapiInteractionType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_86});
  setMetadataFor(XapiInteractionTypeSerializer, 'XapiInteractionTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_70, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiObjectType, 'XapiObjectType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_87});
  setMetadataFor(XapiObjectTypeSerializer, 'XapiObjectTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_71, 'Companion', objectMeta);
  setMetadataFor($serializer_52, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Score, 'Score', classMeta, VOID, VOID, Score, VOID, {0: $serializer_getInstance_64});
  setMetadataFor(Companion_72, 'Companion', objectMeta);
  setMetadataFor($serializer_53, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiResult, 'XapiResult', classMeta, VOID, VOID, XapiResult, VOID, {0: $serializer_getInstance_65});
  setMetadataFor(Companion_73, 'Companion', objectMeta);
  setMetadataFor($serializer_54, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatement, 'XapiStatement', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_66});
  setMetadataFor(StatementEntities, 'StatementEntities', classMeta, VOID, VOID, StatementEntities);
  setMetadataFor(XapiStatementObjectSerializer, 'XapiStatementObjectSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(Companion_74, 'Companion', objectMeta);
  setMetadataFor($serializer_55, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivityStatementObject, 'XapiActivityStatementObject', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_67});
  setMetadataFor(Companion_75, 'Companion', objectMeta);
  setMetadataFor($serializer_56, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementRef, 'XapiStatementRef', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_68});
  setMetadataFor(Companion_76, 'Companion', objectMeta);
  setMetadataFor($serializer_57, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiVerb, 'XapiVerb', classMeta, VOID, VOID, XapiVerb, VOID, {0: $serializer_getInstance_69});
  setMetadataFor(VerbEntities, 'VerbEntities', classMeta);
  setMetadataFor(NonInteractiveContentXapiStatementRecorder$onComplete$slambda, 'NonInteractiveContentXapiStatementRecorder$onComplete$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(NonInteractiveContentXapiStatementRecorder, 'NonInteractiveContentXapiStatementRecorder', classMeta);
  setMetadataFor(NonInteractiveContentXapiStatementRecorderFactory, 'NonInteractiveContentXapiStatementRecorderFactory', classMeta);
  setMetadataFor(SaveStatementOnClearUseCase, 'SaveStatementOnClearUseCase', interfaceMeta);
  setMetadataFor(SaveStatementOnUnloadUseCase, 'SaveStatementOnUnloadUseCase', interfaceMeta, VOID, [SaveStatementOnClearUseCase]);
  setMetadataFor(Companion_77, 'Companion', objectMeta);
  setMetadataFor($serializer_58, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementsAndSession, 'XapiStatementsAndSession', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_70});
  setMetadataFor(ResumeOrStartXapiSessionUseCase, 'ResumeOrStartXapiSessionUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(UstadMobileConstants, 'UstadMobileConstants', objectMeta);
  setMetadataFor(Companion_78, 'Companion', objectMeta);
  setMetadataFor(UstadGoOptions, 'UstadGoOptions', classMeta, VOID, VOID, UstadGoOptions);
  setMetadataFor(UiLanguage, 'UiLanguage', classMeta);
  setMetadataFor(Companion_79, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemCommon, 'UstadMobileSystemCommon', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ActionBarButtonUiState, 'ActionBarButtonUiState', classMeta, VOID, VOID, ActionBarButtonUiState);
  setMetadataFor(AppActionButton, 'AppActionButton', classMeta);
  setMetadataFor(AppBarColors, 'AppBarColors', classMeta, Enum);
  setMetadataFor(AppBarSearchUiState, 'AppBarSearchUiState', classMeta, VOID, VOID, AppBarSearchUiState);
  setMetadataFor(AppStateIcon, 'AppStateIcon', classMeta, Enum);
  setMetadataFor(AppUiState, 'AppUiState', classMeta, VOID, VOID, AppUiState);
  setMetadataFor(FabIcon, 'FabIcon', classMeta, Enum);
  setMetadataFor(FabUiState, 'FabUiState', classMeta, VOID, VOID, FabUiState);
  setMetadataFor(State, 'State', classMeta, Enum);
  setMetadataFor(Companion_80, 'Companion', objectMeta);
  setMetadataFor(LoadingUiState, 'LoadingUiState', classMeta, VOID, VOID, LoadingUiState);
  setMetadataFor(OverflowItem, 'OverflowItem', classMeta);
  setMetadataFor(Snack, 'Snack', classMeta);
  setMetadataFor(SnackBarDispatcher, 'SnackBarDispatcher', interfaceMeta);
  setMetadataFor(TabItem, 'TabItem', classMeta);
  setMetadataFor(UstadContextMenuItem, 'UstadContextMenuItem', classMeta);
  setMetadataFor(UstadBuildConfig, 'UstadBuildConfig', interfaceMeta);
  setMetadataFor(BuildConfigMap, 'BuildConfigMap', classMeta, VOID, [UstadBuildConfig]);
  setMetadataFor(Companion_81, 'Companion', objectMeta);
  setMetadataFor(GenderConfig, 'GenderConfig', classMeta, VOID, VOID, GenderConfig);
  setMetadataFor(SettingsLocaleSettingDelegate, 'SettingsLocaleSettingDelegate', classMeta);
  setMetadataFor(Companion_82, 'Companion', objectMeta);
  setMetadataFor(SupportedLanguagesConfig, 'SupportedLanguagesConfig', classMeta);
  setMetadataFor(Companion_83, 'Companion', objectMeta);
  setMetadataFor(SystemUrlConfig, 'SystemUrlConfig', classMeta);
  setMetadataFor(Companion_84, 'Companion', objectMeta);
  setMetadataFor(Companion_85, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyStrings, 'CourseTerminologyStrings', classMeta);
  setMetadataFor(TerminologyEntry, 'TerminologyEntry', classMeta);
  setMetadataFor(ClazzEnrolmentListConstants, 'ClazzEnrolmentListConstants', objectMeta);
  setMetadataFor(ConditionConstants, 'ConditionConstants', objectMeta);
  setMetadataFor(ContentCompletionStatusConstants, 'ContentCompletionStatusConstants', objectMeta);
  setMetadataFor(EnrolmentPolicyConstants, 'EnrolmentPolicyConstants', objectMeta);
  setMetadataFor(FieldConstants, 'FieldConstants', objectMeta);
  setMetadataFor(LicenceConstants, 'LicenceConstants', objectMeta);
  setMetadataFor(OutcomeConstants, 'OutcomeConstants', objectMeta);
  setMetadataFor(PersonConstants_0, 'PersonConstants', objectMeta);
  setMetadataFor(PersonParentJoinConstants, 'PersonParentJoinConstants', objectMeta);
  setMetadataFor(RoleConstants, 'RoleConstants', objectMeta);
  setMetadataFor(ScheduleConstants, 'ScheduleConstants', objectMeta);
  setMetadataFor(SubmissionPolicyConstants, 'SubmissionPolicyConstants', objectMeta);
  function navigate$default(viewName, args, goOptions, $super) {
    goOptions = goOptions === VOID ? Companion_getInstance_95().cq4_1 : goOptions;
    var tmp;
    if ($super === VOID) {
      this.lq9(viewName, args, goOptions);
      tmp = Unit_instance;
    } else {
      tmp = $super.lq9.call(this, viewName, args, goOptions);
    }
    return tmp;
  }
  setMetadataFor(UstadNavController, 'UstadNavController', interfaceMeta);
  setMetadataFor(CommandFlowUstadNavController, 'CommandFlowUstadNavController', classMeta, VOID, [UstadNavController], CommandFlowUstadNavController);
  setMetadataFor(NavCommand, 'NavCommand', classMeta);
  setMetadataFor(NavigateNavCommand, 'NavigateNavCommand', classMeta, NavCommand);
  setMetadataFor(PopNavCommand, 'PopNavCommand', classMeta, NavCommand);
  setMetadataFor(NavResult, 'NavResult', classMeta);
  setMetadataFor(NavResultDest, 'NavResultDest', classMeta);
  setMetadataFor(NavResultReturner, 'NavResultReturner', interfaceMeta);
  setMetadataFor(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda, 'NavResultReturnerImpl$resultFlowForKey$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$50, '$collectCOROUTINE$50', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_1, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_0, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(NavResultReturnerImpl, 'NavResultReturnerImpl', classMeta, VOID, [NavResultReturner], NavResultReturnerImpl);
  setMetadataFor(BitmaskFlag, 'BitmaskFlag', classMeta);
  setMetadataFor(ListPagingSource, 'ListPagingSource', classMeta, PagingSource, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RefreshCommand, 'RefreshCommand', classMeta, VOID, VOID, RefreshCommand);
  setMetadataFor(Activity, 'Activity', classMeta);
  setMetadataFor(Companion_86, 'Companion', objectMeta);
  setMetadataFor(TinCanXML, 'TinCanXML', classMeta, VOID, VOID, TinCanXML);
  setMetadataFor(Companion_87, 'Companion', objectMeta);
  setMetadataFor(UsernameSuggestionUseCase, 'UsernameSuggestionUseCase', classMeta);
  setMetadataFor(UsernameErrorException, 'UsernameErrorException', classMeta, Exception);
  setMetadataFor(DiTag, 'DiTag', objectMeta);
  setMetadataFor(EventCollator2$receiveEvent$slambda, 'EventCollator2$receiveEvent$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EventCollator2, 'EventCollator2', classMeta);
  setMetadataFor(Companion_88, 'Companion', objectMeta);
  setMetadataFor(MessageIdOption2, 'MessageIdOption2', classMeta);
  setMetadataFor(SortOrderOption, 'SortOrderOption', classMeta);
  setMetadataFor(UMFileUtil, 'UMFileUtil', objectMeta);
  setMetadataFor(Companion_89, 'Companion', objectMeta);
  setMetadataFor(UstadUrlComponents, 'UstadUrlComponents', classMeta);
  setMetadataFor($verifySiteCOROUTINE$51, '$verifySiteCOROUTINE$51', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_2, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(whenSubscribed$o$collect$slambda, 'whenSubscribed$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$52, '$collectCOROUTINE$52', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_1, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(whenSubscribed$slambda, 'whenSubscribed$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta);
  setMetadataFor(navigateToLink$slambda, 'navigateToLink$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScopedGrantResult, 'ScopedGrantResult', classMeta);
  setMetadataFor($insertPersonAndGroupCOROUTINE$53, '$insertPersonAndGroupCOROUTINE$53', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfFalseCOROUTINE$54, '$localFirstThenRepoIfFalseCOROUTINE$54', classMeta, CoroutineImpl);
  setMetadataFor($grantScopedPermissionCOROUTINE$55, '$grantScopedPermissionCOROUTINE$55', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfNullCOROUTINE$56, '$localFirstThenRepoIfNullCOROUTINE$56', classMeta, CoroutineImpl);
  setMetadataFor(Companion_90, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(IStringValues, 'IStringValues', interfaceMeta, VOID, VOID, VOID, VOID, {0: Companion_getInstance_107});
  setMetadataFor(MapStringValues, 'MapStringValues', classMeta, VOID, [IStringValues]);
  setMetadataFor(StringValuesSerializer, 'StringValuesSerializer', classMeta, VOID, [KSerializer], StringValuesSerializer);
  setMetadataFor(Companion_91, 'Companion', objectMeta);
  setMetadataFor(Companion_92, 'Companion', objectMeta);
  setMetadataFor(Companion_93, 'Companion', objectMeta);
  setMetadataFor(Companion_94, 'Companion', objectMeta);
  setMetadataFor(Companion_95, 'Companion', objectMeta);
  setMetadataFor(Companion_96, 'Companion', objectMeta);
  setMetadataFor(Companion_97, 'Companion', objectMeta);
  setMetadataFor(Companion_98, 'Companion', objectMeta);
  setMetadataFor(ListViewMode, 'ListViewMode', classMeta, Enum);
  setMetadataFor(Companion_99, 'Companion', objectMeta);
  setMetadataFor(UstadViewModel, 'UstadViewModel', classMeta, ViewModel, [ViewModel, DIAware], VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(DetailViewModel, 'DetailViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ErrorReportUiState, 'ErrorReportUiState', classMeta, VOID, VOID, ErrorReportUiState);
  setMetadataFor(HolidayCalendarDetailUIState, 'HolidayCalendarDetailUIState', classMeta, VOID, VOID, HolidayCalendarDetailUIState);
  setMetadataFor(Companion_100, 'Companion', objectMeta);
  setMetadataFor(HolidayCalendarEditUiState, 'HolidayCalendarEditUiState', classMeta, VOID, VOID, HolidayCalendarEditUiState);
  setMetadataFor(Companion_101, 'Companion', objectMeta);
  setMetadataFor(HolidayCalendarListUiState, 'HolidayCalendarListUiState', classMeta, VOID, VOID, HolidayCalendarListUiState);
  setMetadataFor(LanguageDetailUiState, 'LanguageDetailUiState', classMeta, VOID, VOID, LanguageDetailUiState);
  setMetadataFor(LanguageEditUiState, 'LanguageEditUiState', classMeta, VOID, VOID, LanguageEditUiState);
  setMetadataFor(Companion_102, 'Companion', objectMeta);
  setMetadataFor(LanguageListUiState, 'LanguageListUiState', classMeta, VOID, VOID, LanguageListUiState);
  setMetadataFor(LeavingReasonEditViewModel$slambda$slambda, 'LeavingReasonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LeavingReasonEditViewModel$slambda$slambda_1, 'LeavingReasonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_103, 'Companion', objectMeta);
  setMetadataFor(LeavingReasonEditViewModel$slambda, 'LeavingReasonEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LeavingReasonEditViewModel$onEntityChanged$slambda, 'LeavingReasonEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadEditViewModel, 'UstadEditViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LeavingReasonEditViewModel, 'LeavingReasonEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LeavingReasonEditUiState, 'LeavingReasonEditUiState', classMeta, VOID, VOID, LeavingReasonEditUiState);
  setMetadataFor(Companion_104, 'Companion', objectMeta);
  setMetadataFor(ReportFilterEditUiState, 'ReportFilterEditUiState', classMeta, VOID, VOID, ReportFilterEditUiState);
  setMetadataFor(ScopedGrantDetailUiState, 'ScopedGrantDetailUiState', classMeta, VOID, VOID, ScopedGrantDetailUiState);
  setMetadataFor(Companion_105, 'Companion', objectMeta);
  setMetadataFor(ScopedGrantEditUiState, 'ScopedGrantEditUiState', classMeta, VOID, VOID, ScopedGrantEditUiState);
  setMetadataFor(Companion_106, 'Companion', objectMeta);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_107, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_3, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadListViewModel$searchEvtCollator$slambda, 'UstadListViewModel$searchEvtCollator$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(UstadListViewModel, 'UstadListViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(UstadViewModel$filteredResultFlowForKey$o$collect$slambda, 'UstadViewModel$filteredResultFlowForKey$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$60, '$collectCOROUTINE$60', classMeta, CoroutineImpl);
  setMetadataFor(Companion_108, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_4, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(_no_name_provided__qut3iv_2, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$getJson$slambda, 'UstadViewModel$getJson$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$setJson$slambda, 'UstadViewModel$setJson$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$launchIfHasPermission$slambda, 'UstadViewModel$launchIfHasPermission$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$launchWithLoadingIndicator$slambda, 'UstadViewModel$launchWithLoadingIndicator$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($getJsonCOROUTINE$57, '$getJsonCOROUTINE$57', classMeta, CoroutineImpl);
  setMetadataFor($setJsonCOROUTINE$58, '$setJsonCOROUTINE$58', classMeta, CoroutineImpl);
  setMetadataFor($loadEntityCOROUTINE$59, '$loadEntityCOROUTINE$59', classMeta, CoroutineImpl);
  setMetadataFor(Companion_109, 'Companion', objectMeta);
  setMetadataFor(OpenLicensesViewModel, 'OpenLicensesViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_110, 'Companion', objectMeta);
  setMetadataFor(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda, 'AddAccountSelectNewOrExistingViewModel$getCredentials$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda, 'AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddAccountSelectNewOrExistingViewModel, 'AddAccountSelectNewOrExistingViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AddAccountSelectNewOrExistingUiState, 'AddAccountSelectNewOrExistingUiState', classMeta, VOID, VOID, AddAccountSelectNewOrExistingUiState);
  setMetadataFor(Companion_111, 'Companion', objectMeta);
  setMetadataFor(AddAccountSelectNewOrExistingUserTypeViewModel, 'AddAccountSelectNewOrExistingUserTypeViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AddAccountSelectNewOrExistingUserTypeUiState, 'AddAccountSelectNewOrExistingUserTypeUiState', classMeta, VOID, VOID, AddAccountSelectNewOrExistingUserTypeUiState);
  setMetadataFor(AccountListViewModel$slambda$slambda, 'AccountListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda$slambda$slambda, 'AccountListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda$slambda_1, 'AccountListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_112, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_5, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(AccountListViewModel$slambda, 'AccountListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda_1, 'AccountListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickLogout$slambda, 'AccountListViewModel$onClickLogout$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickAddAccount$slambda, 'AccountListViewModel$onClickAddAccount$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickDeleteAccount$slambda, 'AccountListViewModel$onClickDeleteAccount$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickOpenLicenses$slambda, 'AccountListViewModel$onClickOpenLicenses$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel, 'AccountListViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AccountListUiState, 'AccountListUiState', classMeta, VOID, VOID, AccountListUiState);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_6, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(launchSetTitleFromClazzUid$slambda$slambda, 'launchSetTitleFromClazzUid$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(launchSetTitleFromClazzUid$slambda, 'launchSetTitleFromClazzUid$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_7, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(collectClazzNameAndUpdateTitle$slambda, 'collectClazzNameAndUpdateTitle$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionConstants, 'CoursePermissionConstants', objectMeta);
  setMetadataFor(getTitleForCoursePermission$slambda, 'getTitleForCoursePermission$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(getTitleForCoursePermission$slambda_1, 'getTitleForCoursePermission$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($getTitleForCoursePermissionCOROUTINE$61, '$getTitleForCoursePermissionCOROUTINE$61', classMeta, CoroutineImpl);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_113, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_8, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda, 'ClazzDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel, 'ClazzDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzDetailUiState, 'ClazzDetailUiState', classMeta, VOID, VOID, ClazzDetailUiState);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$62, '$collectCOROUTINE$62', classMeta, CoroutineImpl);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_3, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$63, '$collectCOROUTINE$63', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_4, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$64, '$collectCOROUTINE$64', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_5, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_114, 'Companion', objectMeta);
  setMetadataFor(ClazzAction, 'ClazzAction', classMeta, Enum);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_9, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda, 'ClazzDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda_1, 'ClazzDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda, 'ClazzDetailOverviewViewModel$onClickCopyCourse$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel, 'ClazzDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzDetailOverviewUiState, 'ClazzDetailOverviewUiState', classMeta, VOID, VOID, ClazzDetailOverviewUiState);
  setMetadataFor(Companion_115, 'Companion', objectMeta);
  setMetadataFor($serializer_59, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CopyCourseResult, 'CopyCourseResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_71});
  setMetadataFor($invokeCOROUTINE$65, '$invokeCOROUTINE$65', classMeta, CoroutineImpl);
  setMetadataFor(CopyCourseUseCase, 'CopyCourseUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_1, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_3, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_5, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_7, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_9, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda$slambda, 'ClazzEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_11, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_13, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_15, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_17, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_19, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_1, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_3, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_5, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_7, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_9, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_11, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_13, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_15, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickSave$slambda$slambda, 'ClazzEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_116, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_10, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda, 'ClazzEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda_1, 'ClazzEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$updateCourseBlockList$slambda, 'ClazzEditViewModel$updateCourseBlockList$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onEntityChanged$slambda, 'ClazzEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickSave$slambda, 'ClazzEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$onCourseBlockMoved$slambda, 'ClazzEditViewModel$onCourseBlockMoved$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$updateCourseBlock$slambda, 'ClazzEditViewModel$updateCourseBlock$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickDeleteCourseBlock$slambda, 'ClazzEditViewModel$onClickDeleteCourseBlock$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($updateCourseBlockListCOROUTINE$66, '$updateCourseBlockListCOROUTINE$66', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEditViewModel, 'ClazzEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(CourseBlockUiState, 'CourseBlockUiState', classMeta);
  setMetadataFor(Companion_117, 'Companion', objectMeta);
  setMetadataFor($serializer_60, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzEditUiState, 'ClazzEditUiState', classMeta, VOID, VOID, ClazzEditUiState, VOID, {0: $serializer_getInstance_72});
  setMetadataFor($loadCOROUTINE$67, '$loadCOROUTINE$67', classMeta, CoroutineImpl);
  setMetadataFor($loadHttpCOROUTINE$68, '$loadHttpCOROUTINE$68', classMeta, CoroutineImpl);
  setMetadataFor(ClazzGradebookPagingSource, 'ClazzGradebookPagingSource', classMeta, DelegatedInvalidationPagingSource, [DelegatedInvalidationPagingSource, PagingSourceWithHttpLoader], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1, 'ClazzGradebookViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda_1, 'ClazzGradebookViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_118, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_11, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda, 'ClazzGradebookViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel, 'ClazzGradebookViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzGradebookUiState, 'ClazzGradebookUiState', classMeta, VOID, VOID, ClazzGradebookUiState);
  setMetadataFor(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda, 'ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel$lambda$slambda$slambda, 'ClazzInviteRedeemViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_119, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_12, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel$lambda$slambda, 'ClazzInviteRedeemViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel$processDecision$slambda, 'ClazzInviteRedeemViewModel$processDecision$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel, 'ClazzInviteRedeemViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzInviteRedeemUiState, 'ClazzInviteRedeemUiState', classMeta, VOID, VOID, ClazzInviteRedeemUiState);
  setMetadataFor(Companion_120, 'Companion', objectMeta);
  setMetadataFor(ClazzInviteViaContactViewModel$onClickSend$slambda, 'ClazzInviteViaContactViewModel$onClickSend$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($sendContactsToServerCOROUTINE$69, '$sendContactsToServerCOROUTINE$69', classMeta, CoroutineImpl);
  setMetadataFor(ClazzInviteViaContactViewModel, 'ClazzInviteViaContactViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(ClazzInviteViaContactUiState, 'ClazzInviteViaContactUiState', classMeta, VOID, VOID, ClazzInviteViaContactUiState);
  setMetadataFor(InviteViaContactChip, 'InviteViaContactChip', classMeta);
  setMetadataFor(Companion_121, 'Companion', objectMeta);
  setMetadataFor(ClazzInviteViaLinkViewModel, 'ClazzInviteViaLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzInviteViaLinkUiState, 'ClazzInviteViaLinkUiState', classMeta, VOID, VOID, ClazzInviteViaLinkUiState);
  setMetadataFor(Companion_122, 'Companion', objectMeta);
  setMetadataFor(JoinWithCodeViewModel$onClickJoin$slambda, 'JoinWithCodeViewModel$onClickJoin$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(JoinWithCodeViewModel, 'JoinWithCodeViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(JoinWithCodeUiState, 'JoinWithCodeUiState', classMeta, VOID, VOID, JoinWithCodeUiState);
  setMetadataFor(ClazzListViewModel$slambda$slambda$slambda, 'ClazzListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda$slambda, 'ClazzListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzListViewModel$slambda$slambda$slambda_1, 'ClazzListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda$slambda_1, 'ClazzListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_123, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_13, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda, 'ClazzListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda_1, 'ClazzListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda, 'ClazzListViewModel$onClickCancelEnrolmentRequest$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel, 'ClazzListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_124, 'Companion', objectMeta);
  setMetadataFor(ClazzListUiState, 'ClazzListUiState', classMeta, VOID, VOID, ClazzListUiState);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1, 'CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_125, 'Companion', objectMeta);
  setMetadataFor(CoursePermissionDetailViewModel$slambda, 'CoursePermissionDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel, 'CoursePermissionDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CoursePermissionDetailUiState, 'CoursePermissionDetailUiState', classMeta, VOID, VOID, CoursePermissionDetailUiState);
  setMetadataFor(CoursePermissionEditViewModel$slambda$slambda, 'CoursePermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$slambda$slambda_1, 'CoursePermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CoursePermissionEditViewModel$onClickSave$slambda$slambda, 'CoursePermissionEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_126, 'Companion', objectMeta);
  setMetadataFor(CoursePermissionEditViewModel$slambda, 'CoursePermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$slambda_1, 'CoursePermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$onClickSave$slambda, 'CoursePermissionEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CoursePermissionEditViewModel, 'CoursePermissionEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CoursePermissionEditUiState, 'CoursePermissionEditUiState', classMeta, VOID, VOID, CoursePermissionEditUiState);
  setMetadataFor(CoursePermissionListViewModel$slambda$slambda$slambda, 'CoursePermissionListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$slambda$slambda, 'CoursePermissionListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_127, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_14, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$slambda, 'CoursePermissionListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$onClickDeleteEntry$slambda, 'CoursePermissionListViewModel$onClickDeleteEntry$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel, 'CoursePermissionListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CoursePermissionListUiState, 'CoursePermissionListUiState', classMeta, VOID, VOID, CoursePermissionListUiState);
  setMetadataFor(Companion_128, 'Companion', objectMeta);
  setMetadataFor(TextLimitType, 'TextLimitType', classMeta, Enum);
  setMetadataFor(MarkingType, 'MarkingType', classMeta, Enum);
  setMetadataFor(ClazzAssignmentViewModelConstants, 'ClazzAssignmentViewModelConstants', objectMeta);
  setMetadataFor(_no_name_provided__qut3iv_6, VOID, classMeta);
  setMetadataFor(UstadAssignmentSubmissionHeaderUiState, 'UstadAssignmentSubmissionHeaderUiState', classMeta, VOID, VOID, UstadAssignmentSubmissionHeaderUiState);
  setMetadataFor(UstadCourseAssignmentMarkListItemUiState, 'UstadCourseAssignmentMarkListItemUiState', classMeta);
  setMetadataFor(Companion_129, 'Companion', objectMeta);
  setMetadataFor(ClazzAssignmentDetailViewModel$slambda, 'ClazzAssignmentDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentDetailViewModel, 'ClazzAssignmentDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzAssignmentDetailUiState, 'ClazzAssignmentDetailUiState', classMeta, VOID, VOID, ClazzAssignmentDetailUiState);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_130, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_15, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel, 'ClazzAssignmentDetailSubmissionsTabViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_131, 'Companion', objectMeta);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabUiState, 'ClazzAssignmentDetailSubmissionsTabUiState', classMeta, VOID, VOID, ClazzAssignmentDetailSubmissionsTabUiState);
  setMetadataFor(AssignmentSubmitterSummaryUiState, 'AssignmentSubmitterSummaryUiState', classMeta);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$70, '$collectCOROUTINE$70', classMeta, CoroutineImpl);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_7, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_132, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_16, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda, 'ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda, 'ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda, 'ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda, 'ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda, 'ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel, 'ClazzAssignmentDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzAssignmentDetailOverviewUiState, 'ClazzAssignmentDetailOverviewUiState', classMeta, VOID, VOID, ClazzAssignmentDetailOverviewUiState);
  setMetadataFor(ClazzAssignmentDetailoverviewSubmissionUiState, 'ClazzAssignmentDetailoverviewSubmissionUiState', classMeta, VOID, VOID, ClazzAssignmentDetailoverviewSubmissionUiState);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_5, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_7, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_9, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_11, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda, 'ClazzAssignmentEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_133, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_17, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda, 'ClazzAssignmentEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda, 'ClazzAssignmentEditViewModel$onAssignmentChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda, 'ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onPictureChanged$slambda, 'ClazzAssignmentEditViewModel$onPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onClickSave$slambda, 'ClazzAssignmentEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel, 'ClazzAssignmentEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [0, 2, 3, 6]);
  setMetadataFor(Companion_134, 'Companion', objectMeta);
  setMetadataFor($serializer_61, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzAssignmentEditUiState, 'ClazzAssignmentEditUiState', classMeta, VOID, VOID, ClazzAssignmentEditUiState, VOID, {0: $serializer_getInstance_73});
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda$slambda, 'PeerReviewerAllocationEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda$slambda_1, 'PeerReviewerAllocationEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_135, 'Companion', objectMeta);
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda, 'PeerReviewerAllocationEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda, 'PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel, 'PeerReviewerAllocationEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PeerReviewerAllocationEditUIState, 'PeerReviewerAllocationEditUIState', classMeta, VOID, VOID, PeerReviewerAllocationEditUIState);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_136, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_18, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda, 'ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel, 'ClazzAssignmentSubmitterDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(sam$kotlin_Comparator$0_1, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(ClazzAssignmentSubmitterDetailUiState, 'ClazzAssignmentSubmitterDetailUiState', classMeta, VOID, VOID, ClazzAssignmentSubmitterDetailUiState);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1, 'ClazzMemberListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda_1, 'ClazzMemberListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda, 'ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_137, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_19, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda, 'ClazzMemberListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda, 'ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickAddNewMember$slambda, 'ClazzMemberListViewModel$onClickAddNewMember$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickRevokeInvite$slambda, 'ClazzMemberListViewModel$onClickRevokeInvite$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickResendInvite$slambda, 'ClazzMemberListViewModel$onClickResendInvite$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel, 'ClazzMemberListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzMemberListUiState, 'ClazzMemberListUiState', classMeta, VOID, VOID, ClazzMemberListUiState);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda_1, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda_3, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_138, 'Companion', objectMeta);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda, 'ClazzEnrolmentEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda_1, 'ClazzEnrolmentEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$onEntityChanged$slambda, 'ClazzEnrolmentEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$onClickSave$slambda, 'ClazzEnrolmentEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel, 'ClazzEnrolmentEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzEnrolmentEditUiState, 'ClazzEnrolmentEditUiState', classMeta, VOID, VOID, ClazzEnrolmentEditUiState);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$o$collect$slambda, 'ClazzEnrolmentListViewModel$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$71, '$collectCOROUTINE$71', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$72, '$collectCOROUTINE$72', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_8, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_9, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_139, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_20, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda, 'ClazzEnrolmentListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel, 'ClazzEnrolmentListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzEnrolmentListUiState, 'ClazzEnrolmentListUiState', classMeta, VOID, VOID, ClazzEnrolmentListUiState);
  setMetadataFor(ClazzEnrolmentListItemUiState, 'ClazzEnrolmentListItemUiState', classMeta);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(RecordAttendanceOption, 'RecordAttendanceOption', classMeta, Enum);
  setMetadataFor(PermissionAndExistingLogs, 'PermissionAndExistingLogs', classMeta);
  setMetadataFor(Companion_140, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_21, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda, 'ClazzLogListAttendanceViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda, 'ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel, 'ClazzLogListAttendanceViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzLogListAttendanceUiState, 'ClazzLogListAttendanceUiState', classMeta, VOID, VOID, ClazzLogListAttendanceUiState);
  setMetadataFor(ClazzLogEditViewModel$slambda$slambda, 'ClazzLogEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel$slambda$slambda_1, 'ClazzLogEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_141, 'Companion', objectMeta);
  setMetadataFor(ClazzLogEditViewModel$slambda, 'ClazzLogEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel$onEntityChanged$slambda, 'ClazzLogEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel, 'ClazzLogEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzLogEditUiState, 'ClazzLogEditUiState', classMeta, VOID, VOID, ClazzLogEditUiState);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda_1, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda_3, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda, 'ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_142, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0_2, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda, 'ClazzLogEditAttendanceViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda_1, 'ClazzLogEditAttendanceViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda, 'ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda, 'ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda, 'ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickSave$slambda, 'ClazzLogEditAttendanceViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($savePersonAndAttendanceRecordsCOROUTINE$73, '$savePersonAndAttendanceRecordsCOROUTINE$73', classMeta, CoroutineImpl);
  setMetadataFor($commitAttendanceRecordsToStateCOROUTINE$74, '$commitAttendanceRecordsToStateCOROUTINE$74', classMeta, CoroutineImpl);
  setMetadataFor(ClazzLogEditAttendanceViewModel, 'ClazzLogEditAttendanceViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 0, 3, 6]);
  setMetadataFor(ClazzLogEditAttendanceUiState, 'ClazzLogEditAttendanceUiState', classMeta, VOID, VOID, ClazzLogEditAttendanceUiState);
  setMetadataFor(Companion_143, 'Companion', objectMeta);
  setMetadataFor(ContentEntryDetailViewModel, 'ContentEntryDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryDetailUiState, 'ContentEntryDetailUiState', classMeta, VOID, VOID, ContentEntryDetailUiState);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda, 'ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda, 'ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_144, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_22, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda, 'ContentEntryDetailAttemptsPersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda_1, 'ContentEntryDetailAttemptsPersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($buildSortOptionsCOROUTINE$75, '$buildSortOptionsCOROUTINE$75', classMeta, CoroutineImpl);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel, 'ContentEntryDetailAttemptsPersonListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [1, 3, 2, 6]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListUiState, 'ContentEntryDetailAttemptsPersonListUiState', classMeta, VOID, VOID, ContentEntryDetailAttemptsPersonListUiState);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda, 'ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1, 'ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_145, 'Companion', objectMeta);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel$slambda, 'ContentEntryDetailAttemptsSessionListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel, 'ContentEntryDetailAttemptsSessionListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ContentEntryDetailAttemptsSessionListUiState, 'ContentEntryDetailAttemptsSessionListUiState', classMeta, VOID, VOID, ContentEntryDetailAttemptsSessionListUiState);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_146, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_23, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel, 'ContentEntryDetailAttemptsStatementListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListUiState, 'ContentEntryDetailAttemptsStatementListUiState', classMeta, VOID, VOID, ContentEntryDetailAttemptsStatementListUiState);
  setMetadataFor(StatementSummaryEntity, 'StatementSummaryEntity', classMeta);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda, 'ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_147, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_24, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda, 'ContentEntryDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onClickOpen$slambda, 'ContentEntryDetailOverviewViewModel$onClickOpen$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda, 'ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda, 'ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel, 'ContentEntryDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryDetailOverviewUiState, 'ContentEntryDetailOverviewUiState', classMeta, VOID, VOID, ContentEntryDetailOverviewUiState);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda$slambda, 'ContentEntryEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda$slambda_1, 'ContentEntryEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_1, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_3, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_5, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_148, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_25, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda, 'ContentEntryEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda_1, 'ContentEntryEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$scheduleEntityCommit$slambda, 'ContentEntryEditViewModel$scheduleEntityCommit$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$onClickSave$slambda, 'ContentEntryEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel, 'ContentEntryEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryEditUiState, 'ContentEntryEditUiState', classMeta, VOID, VOID, ContentEntryEditUiState);
  setMetadataFor(Companion_149, 'Companion', objectMeta);
  setMetadataFor(ContentEntryGetMetadataViewModel$slambda, 'ContentEntryGetMetadataViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryGetMetadataViewModel, 'ContentEntryGetMetadataViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryGetMetadataUiState, 'ContentEntryGetMetadataUiState', classMeta, VOID, VOID, ContentEntryGetMetadataUiState);
  setMetadataFor(Companion_150, 'Companion', objectMeta);
  setMetadataFor(GetSubtitleViewModel$slambda, 'GetSubtitleViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(GetSubtitleViewModel, 'GetSubtitleViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(GetSubtitleUiState, 'GetSubtitleUiState', classMeta, VOID, VOID, GetSubtitleUiState);
  setMetadataFor(Companion_151, 'Companion', objectMeta);
  setMetadataFor(ContentEntryImportLinkViewModel$onChangeLink$slambda, 'ContentEntryImportLinkViewModel$onChangeLink$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryImportLinkViewModel$onClickNext$slambda, 'ContentEntryImportLinkViewModel$onClickNext$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryImportLinkViewModel, 'ContentEntryImportLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryImportLinkUiState, 'ContentEntryImportLinkUiState', classMeta, VOID, VOID, ContentEntryImportLinkUiState);
  setMetadataFor(ContentEntryListItemUiState, 'ContentEntryListItemUiState', classMeta);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda$slambda, 'ContentEntryListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_1, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_3, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_5, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_152, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_26, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_1, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_3, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_5, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$launchDeleteEntries$slambda, 'ContentEntryListViewModel$launchDeleteEntries$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel, 'ContentEntryListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_153, 'Companion', objectMeta);
  setMetadataFor(ContentEntryListUiState, 'ContentEntryListUiState', classMeta, VOID, VOID, ContentEntryListUiState);
  setMetadataFor(Companion_154, 'Companion', objectMeta);
  setMetadataFor($serializer_62, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentEntryListSelectedItem, 'ContentEntryListSelectedItem', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_74});
  setMetadataFor(SubtitleEditViewModel$slambda$slambda, 'SubtitleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel$slambda$slambda_1, 'SubtitleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_155, 'Companion', objectMeta);
  setMetadataFor(SubtitleEditViewModel$slambda, 'SubtitleEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel$onEntityChanged$slambda, 'SubtitleEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel, 'SubtitleEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SubtitleEditUiState, 'SubtitleEditUiState', classMeta, VOID, VOID, SubtitleEditUiState);
  setMetadataFor(Companion_156, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompletionCriteria, 'CompletionCriteria', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_173});
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda$slambda, 'CourseBlockEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda$slambda_1, 'CourseBlockEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_1, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_3, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_5, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_157, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_27, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda, 'CourseBlockEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$onEntityChanged$slambda, 'CourseBlockEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$onPictureChanged$slambda, 'CourseBlockEditViewModel$onPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel, 'CourseBlockEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_158, 'Companion', objectMeta);
  setMetadataFor($serializer_63, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CourseBlockEditUiState, 'CourseBlockEditUiState', classMeta, VOID, VOID, CourseBlockEditUiState, VOID, {0: $serializer_getInstance_75});
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_159, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_28, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda, 'TextBlockDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel, 'TextBlockDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(TextBlockDetailUiState, 'TextBlockDetailUiState', classMeta, VOID, VOID, TextBlockDetailUiState);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_160, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_29, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda, 'CourseGroupSetDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel, 'CourseGroupSetDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseGroupSetDetailUiState, 'CourseGroupSetDetailUiState', classMeta, VOID, VOID, CourseGroupSetDetailUiState);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_1, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_3, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_5, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda, 'CourseGroupSetEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda_1, 'CourseGroupSetEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickSave$slambda$slambda, 'CourseGroupSetEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_161, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetEditViewModel$slambda, 'CourseGroupSetEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda_1, 'CourseGroupSetEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onEntityChanged$slambda, 'CourseGroupSetEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda, 'CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda, 'CourseGroupSetEditViewModel$onClickAssignRandomly$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickSave$slambda, 'CourseGroupSetEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel, 'CourseGroupSetEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseGroupSetEditUiState, 'CourseGroupSetEditUiState', classMeta, VOID, VOID, CourseGroupSetEditUiState);
  setMetadataFor(CourseGroupSetListViewModel$slambda$slambda$slambda, 'CourseGroupSetListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel$slambda$slambda, 'CourseGroupSetListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_162, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetListViewModel$slambda, 'CourseGroupSetListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel$slambda_1, 'CourseGroupSetListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel, 'CourseGroupSetListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_163, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetListUiState, 'CourseGroupSetListUiState', classMeta, VOID, VOID, CourseGroupSetListUiState);
  setMetadataFor(CourseTerminologyEditViewModel$slambda$slambda, 'CourseTerminologyEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$slambda$slambda_1, 'CourseTerminologyEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_164, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyEditViewModel$slambda, 'CourseTerminologyEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$onEntityChanged$slambda, 'CourseTerminologyEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$onClickSave$slambda, 'CourseTerminologyEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel, 'CourseTerminologyEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseTerminologyEditUiState, 'CourseTerminologyEditUiState', classMeta, VOID, VOID, CourseTerminologyEditUiState);
  setMetadataFor(Companion_165, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyListViewModel$slambda, 'CourseTerminologyListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyListViewModel, 'CourseTerminologyListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CourseTerminologyListUiState, 'CourseTerminologyListUiState', classMeta, VOID, VOID, CourseTerminologyListUiState);
  setMetadataFor(Companion_166, 'Companion', objectMeta);
  setMetadataFor(DeletedItemListViewModel$onConfirmDeletePermanently$slambda, 'DeletedItemListViewModel$onConfirmDeletePermanently$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DeletedItemListViewModel$restoreItems$slambda, 'DeletedItemListViewModel$restoreItems$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DeletedItemListViewModel, 'DeletedItemListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(DeletedItemListUiState, 'DeletedItemListUiState', classMeta, VOID, VOID, DeletedItemListUiState);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_167, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_30, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda, 'CourseDiscussionDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$onDeletePost$slambda, 'CourseDiscussionDetailViewModel$onDeletePost$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel, 'CourseDiscussionDetailViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CourseDiscussionDetailUiState, 'CourseDiscussionDetailUiState', classMeta, VOID, VOID, CourseDiscussionDetailUiState);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_168, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_31, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda, 'DiscussionPostDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onChangeReplyText$slambda, 'DiscussionPostDetailViewModel$onChangeReplyText$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onClickPostReply$slambda, 'DiscussionPostDetailViewModel$onClickPostReply$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$submitReply$slambda, 'DiscussionPostDetailViewModel$submitReply$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onDeletePost$slambda, 'DiscussionPostDetailViewModel$onDeletePost$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($submitReplyCOROUTINE$76, '$submitReplyCOROUTINE$76', classMeta, CoroutineImpl);
  setMetadataFor(DiscussionPostDetailViewModel, 'DiscussionPostDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(DiscussionPostDetailUiState2, 'DiscussionPostDetailUiState2', classMeta, VOID, VOID, DiscussionPostDetailUiState2);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda$slambda, 'DiscussionPostEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda$slambda_1, 'DiscussionPostEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda, 'DiscussionPostEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onClickSave$slambda$slambda, 'DiscussionPostEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_169, 'Companion', objectMeta);
  setMetadataFor(DiscussionPostEditViewModel$slambda, 'DiscussionPostEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onEntityChanged$slambda, 'DiscussionPostEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onClickSave$slambda, 'DiscussionPostEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel, 'DiscussionPostEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(DiscussionPostEditUiState, 'DiscussionPostEditUiState', classMeta, VOID, VOID, DiscussionPostEditUiState);
  setMetadataFor(EpubContentViewModel$slambda$slambda$slambda, 'EpubContentViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EpubContentViewModel$slambda$slambda, 'EpubContentViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_170, 'Companion', objectMeta);
  setMetadataFor(EpubContentViewModel$slambda, 'EpubContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AbstractNonInteractiveContentViewModel, 'AbstractNonInteractiveContentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EpubContentViewModel, 'EpubContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EpubContentUiState, 'EpubContentUiState', classMeta, VOID, VOID, EpubContentUiState);
  setMetadataFor(EpubScrollCommand, 'EpubScrollCommand', classMeta);
  setMetadataFor(EpubTocItem, 'EpubTocItem', classMeta);
  setMetadataFor(Companion_171, 'Companion', objectMeta);
  setMetadataFor(Companion_172, 'Companion', objectMeta);
  setMetadataFor(LoginViewModel$slambda, 'LoginViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$onClickLogin$slambda, 'LoginViewModel$onClickLogin$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$onClickConnectAsGuest$slambda, 'LoginViewModel$onClickConnectAsGuest$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$getCredentials$slambda, 'LoginViewModel$getCredentials$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel, 'LoginViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LoginUiState, 'LoginUiState', classMeta, VOID, VOID, LoginUiState);
  setMetadataFor(Companion_173, 'Companion', objectMeta);
  setMetadataFor(ConversationListViewModel, 'ConversationListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ConversationListUiState, 'ConversationListUiState', classMeta, VOID, VOID, ConversationListUiState);
  setMetadataFor(MessageListViewModel$slambda$slambda$slambda, 'MessageListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$slambda$slambda, 'MessageListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_174, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_32, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$slambda, 'MessageListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$onWarningDismiss$slambda, 'MessageListViewModel$onWarningDismiss$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$onClickSend$slambda, 'MessageListViewModel$onClickSend$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel, 'MessageListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(MessageListUiState, 'MessageListUiState', classMeta, VOID, VOID, MessageListUiState);
  setMetadataFor(TitleAndLangCode, 'TitleAndLangCode', classMeta);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda$slambda, 'ParentalConsentManagementViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda$slambda_1, 'ParentalConsentManagementViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_175, 'Companion', objectMeta);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda, 'ParentalConsentManagementViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda_1, 'ParentalConsentManagementViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$updateStatus$slambda, 'ParentalConsentManagementViewModel$updateStatus$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel, 'ParentalConsentManagementViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ParentalConsentManagementUiState, 'ParentalConsentManagementUiState', classMeta, VOID, VOID, ParentalConsentManagementUiState);
  setMetadataFor(Companion_176, 'Companion', objectMeta);
  setMetadataFor(PdfContentViewModel$slambda, 'PdfContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PdfContentViewModel, 'PdfContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PdfContentUiState, 'PdfContentUiState', classMeta, VOID, VOID, PdfContentUiState);
  setMetadataFor(PersonViewModelConstants, 'PersonViewModelConstants', objectMeta);
  setMetadataFor(PersonAccountEditViewModel$slambda$slambda, 'PersonAccountEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$slambda$slambda_1, 'PersonAccountEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonAccountEditViewModel$onClickSave$slambda$slambda, 'PersonAccountEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_177, 'Companion', objectMeta);
  setMetadataFor(PersonAccountEditViewModel$slambda, 'PersonAccountEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$slambda_1, 'PersonAccountEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$onEntityChanged$slambda, 'PersonAccountEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$onClickSave$slambda, 'PersonAccountEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel, 'PersonAccountEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonAccountEditUiState, 'PersonAccountEditUiState', classMeta, VOID, VOID, PersonAccountEditUiState);
  setMetadataFor(Companion_178, 'Companion', objectMeta);
  setMetadataFor($serializer_64, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PersonUsernameAndPasswordModel, 'PersonUsernameAndPasswordModel', classMeta, VOID, VOID, PersonUsernameAndPasswordModel, VOID, {0: $serializer_getInstance_76});
  setMetadataFor(Companion_179, 'Companion', objectMeta);
  setMetadataFor(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0, 'sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0', classMeta);
  setMetadataFor(BulkAddPersonRunImportViewModel$slambda, 'BulkAddPersonRunImportViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonRunImportViewModel, 'BulkAddPersonRunImportViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_180, 'Companion', objectMeta);
  setMetadataFor($serializer_65, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonRunImportUiState, 'BulkAddPersonRunImportUiState', classMeta, VOID, VOID, BulkAddPersonRunImportUiState, VOID, {0: $serializer_getInstance_77});
  setMetadataFor(Companion_181, 'Companion', objectMeta);
  setMetadataFor(BulkAddPersonSelectFileViewModel$slambda, 'BulkAddPersonSelectFileViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel$slambda_1, 'BulkAddPersonSelectFileViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda, 'BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel, 'BulkAddPersonSelectFileViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(BulkAddPersonSelectFileUiState, 'BulkAddPersonSelectFileUiState', classMeta, VOID, VOID, BulkAddPersonSelectFileUiState);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda$slambda, 'AddChildProfilesViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda$slambda_1, 'AddChildProfilesViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda$slambda_3, 'AddChildProfilesViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda, 'AddChildProfilesViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_182, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_33, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda, 'AddChildProfilesViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda_1, 'AddChildProfilesViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$updateChildProfileList$slambda, 'AddChildProfilesViewModel$updateChildProfileList$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda, 'AddChildProfilesViewModel$onClickDeleteChildProfile$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$onProfileSelected$slambda, 'AddChildProfilesViewModel$onProfileSelected$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($updateChildProfileListCOROUTINE$77, '$updateChildProfileListCOROUTINE$77', classMeta, CoroutineImpl);
  setMetadataFor(AddChildProfilesViewModel, 'AddChildProfilesViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(AddChildProfilesUiState, 'AddChildProfilesUiState', classMeta, VOID, VOID, AddChildProfilesUiState);
  setMetadataFor(EditChildProfileViewModel$slambda$slambda, 'EditChildProfileViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EditChildProfileViewModel$slambda$slambda_1, 'EditChildProfileViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_183, 'Companion', objectMeta);
  setMetadataFor(EditChildProfileViewModel$slambda, 'EditChildProfileViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EditChildProfileViewModel$onEntityChanged$slambda, 'EditChildProfileViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EditChildProfileViewModel, 'EditChildProfileViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EditChildProfileUiState, 'EditChildProfileUiState', classMeta, VOID, VOID, EditChildProfileUiState);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_1, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_3, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_5, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_7, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_1, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_3, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_5, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda, 'PersonDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_184, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_34, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda, 'PersonDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel, 'PersonDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonDetailUiState, 'PersonDetailUiState', classMeta, VOID, VOID, PersonDetailUiState);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_1, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_3, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_5, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonEditViewModel$slambda$slambda, 'PersonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda_1, 'PersonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onClickSave$slambda$slambda, 'PersonEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_185, 'Companion', objectMeta);
  setMetadataFor(PersonEditViewModel$slambda, 'PersonEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda_1, 'PersonEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onEntityChanged$slambda, 'PersonEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onPersonPictureChanged$slambda, 'PersonEditViewModel$onPersonPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onClickSave$slambda, 'PersonEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel, 'PersonEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonEditUiState, 'PersonEditUiState', classMeta, VOID, VOID, PersonEditUiState);
  setMetadataFor(LearningSpaceListViewModel$slambda$slambda$slambda, 'LearningSpaceListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceListViewModel$slambda$slambda, 'LearningSpaceListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_186, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_35, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceListViewModel$slambda, 'LearningSpaceListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceListViewModel, 'LearningSpaceListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(LearningSpaceListUiState, 'LearningSpaceListUiState', classMeta, VOID, VOID, LearningSpaceListUiState);
  setMetadataFor(EmptyPagingSource, 'EmptyPagingSource', classMeta, PagingSource, VOID, EmptyPagingSource, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda$slambda$slambda, 'PersonListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda$slambda, 'PersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonListViewModel$slambda$slambda_1, 'PersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_187, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_36, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda, 'PersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda_1, 'PersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel, 'PersonListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(PersonListUiState, 'PersonListUiState', classMeta, VOID, VOID, PersonListUiState);
  setMetadataFor(ManageAccountViewModel$slambda$slambda, 'ManageAccountViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$slambda$slambda_1, 'ManageAccountViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_188, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_37, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$slambda, 'ManageAccountViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$slambda_1, 'ManageAccountViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel, 'ManageAccountViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ManageAccountUiState, 'ManageAccountUiState', classMeta, VOID, VOID, ManageAccountUiState);
  setMetadataFor(Companion_189, 'Companion', objectMeta);
  setMetadataFor(RegisterAgeRedirectViewModel, 'RegisterAgeRedirectViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterAgeRedirectUiState, 'RegisterAgeRedirectUiState', classMeta, VOID, VOID, RegisterAgeRedirectUiState);
  setMetadataFor(Companion_190, 'Companion', objectMeta);
  setMetadataFor(RegisterMinorWaitForParentViewModel, 'RegisterMinorWaitForParentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterMinorWaitForParentUiState, 'RegisterMinorWaitForParentUiState', classMeta, VOID, VOID, RegisterMinorWaitForParentUiState);
  setMetadataFor(Companion_191, 'Companion', objectMeta);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(RedirectViewModel$slambda, 'RedirectViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RedirectViewModel, 'RedirectViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ScheduleEditViewModel$slambda$slambda, 'ScheduleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel$slambda$slambda_1, 'ScheduleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_192, 'Companion', objectMeta);
  setMetadataFor(ScheduleEditViewModel$slambda, 'ScheduleEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel$onEntityChanged$slambda, 'ScheduleEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel, 'ScheduleEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ScheduleEditUiState, 'ScheduleEditUiState', classMeta, VOID, VOID, ScheduleEditUiState);
  setMetadataFor(Companion_193, 'Companion', objectMeta);
  setMetadataFor(SettingsViewModel$slambda$slambda, 'SettingsViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_194, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_38, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SettingsViewModel$slambda, 'SettingsViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SettingsViewModel, 'SettingsViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SettingsUiState, 'SettingsUiState', classMeta, VOID, VOID, SettingsUiState);
  setMetadataFor(Companion_195, 'Companion', objectMeta);
  setMetadataFor(SignUpViewModel$slambda$slambda, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$slambda$slambda_1, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SignUpViewModel$slambda$slambda_3, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$slambda$slambda_5, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_196, 'Companion', objectMeta);
  setMetadataFor(SignUpViewModel$slambda, 'SignUpViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onEntityChanged$slambda, 'SignUpViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onPersonPictureChanged$slambda, 'SignUpViewModel$onPersonPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onFullNameFocusedChanged$slambda, 'SignUpViewModel$onFullNameFocusedChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onClickSignup$slambda, 'SignUpViewModel$onClickSignup$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($enrollToCourseFromInviteUidCOROUTINE$79, '$enrollToCourseFromInviteUidCOROUTINE$79', classMeta, CoroutineImpl);
  setMetadataFor(SignUpViewModel, 'SignUpViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(SignUpUiState, 'SignUpUiState', classMeta, VOID, VOID, SignUpUiState);
  setMetadataFor(Companion_197, 'Companion', objectMeta);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$slambda, 'SignupEnterUsernamePasswordViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda, 'SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda, 'SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel, 'SignupEnterUsernamePasswordViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SignupEnterUsernamePasswordUiState, 'SignupEnterUsernamePasswordUiState', classMeta, VOID, VOID, SignupEnterUsernamePasswordUiState);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda$slambda, 'SiteDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda$slambda_1, 'SiteDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda$slambda_3, 'SiteDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda, 'SiteDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda_1, 'SiteDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda, 'SiteDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_198, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_39, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda, 'SiteDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel, 'SiteDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteDetailUiState, 'SiteDetailUiState', classMeta, VOID, VOID, SiteDetailUiState);
  setMetadataFor(SiteEditViewModel$slambda$slambda$slambda, 'SiteEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda$slambda, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_1, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_3, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_5, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_7, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_199, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_40, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda, 'SiteEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda_1, 'SiteEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$onChangeTermsHtml$slambda, 'SiteEditViewModel$onChangeTermsHtml$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$onEntityChanged$slambda, 'SiteEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$onClickSave$slambda, 'SiteEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel, 'SiteEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteEditUiState, 'SiteEditUiState', classMeta, VOID, VOID, SiteEditUiState);
  setMetadataFor(Companion_200, 'Companion', objectMeta);
  setMetadataFor(SiteTermsDetailViewModel$slambda, 'SiteTermsDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteTermsDetailViewModel, 'SiteTermsDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteTermsDetailUiState, 'SiteTermsDetailUiState', classMeta, VOID, VOID, SiteTermsDetailUiState);
  setMetadataFor(Companion_201, 'Companion', objectMeta);
  setMetadataFor(LearningSpaceEnterLinkViewModel$onClickNext$slambda, 'LearningSpaceEnterLinkViewModel$onClickNext$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceEnterLinkViewModel, 'LearningSpaceEnterLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LearningSpaceEnterLinkUiState, 'LearningSpaceEnterLinkUiState', classMeta, VOID, VOID, LearningSpaceEnterLinkUiState);
  setMetadataFor(SystemPermissionConstants, 'SystemPermissionConstants', objectMeta);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda_1, 'SystemPermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_202, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_41, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda, 'SystemPermissionDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel, 'SystemPermissionDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SystemPermissionDetailUiState, 'SystemPermissionDetailUiState', classMeta, VOID, VOID, SystemPermissionDetailUiState);
  setMetadataFor(SystemPermissionEditViewModel$slambda$slambda, 'SystemPermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$slambda$slambda_1, 'SystemPermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SystemPermissionEditViewModel$onClickSave$slambda$slambda, 'SystemPermissionEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_203, 'Companion', objectMeta);
  setMetadataFor(SystemPermissionEditViewModel$slambda, 'SystemPermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$slambda_1, 'SystemPermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$onClickSave$slambda, 'SystemPermissionEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SystemPermissionEditViewModel, 'SystemPermissionEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SystemPermissionEditUiState, 'SystemPermissionEditUiState', classMeta, VOID, VOID, SystemPermissionEditUiState);
  setMetadataFor(TimeZoneListViewModel$slambda$slambda, 'TimeZoneListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda, 'TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_204, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0_3, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(TimeZoneListViewModel$slambda, 'TimeZoneListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel$onUpdateSearchResult$slambda, 'TimeZoneListViewModel$onUpdateSearchResult$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel, 'TimeZoneListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(TimezoneListUiState, 'TimezoneListUiState', classMeta, VOID, VOID, TimezoneListUiState);
  setMetadataFor(VideoContentViewModel$slambda$slambda, 'VideoContentViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(VideoContentViewModel$slambda$slambda_1, 'VideoContentViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MediaPlayState, 'MediaPlayState', classMeta, VOID, VOID, MediaPlayState);
  setMetadataFor(Companion_205, 'Companion', objectMeta);
  setMetadataFor(VideoContentViewModel$slambda, 'VideoContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(VideoContentViewModel, 'VideoContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(VideoContentUiState, 'VideoContentUiState', classMeta, VOID, VOID, VideoContentUiState);
  setMetadataFor(Companion_206, 'Companion', objectMeta);
  setMetadataFor(XapiContentViewModel$slambda, 'XapiContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(XapiContentViewModel, 'XapiContentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(XapiContentUiState, 'XapiContentUiState', classMeta, VOID, VOID, XapiContentUiState);
  setMetadataFor($encryptPbkdf2COROUTINE$80, '$encryptPbkdf2COROUTINE$80', classMeta, CoroutineImpl);
  setMetadataFor($doublePbkdf2HashAsBase64COROUTINE$82, '$doublePbkdf2HashAsBase64COROUTINE$82', classMeta, CoroutineImpl);
  setMetadataFor(NavHostFunction, 'NavHostFunction', classMeta);
  setMetadataFor(NavHost$lambda$lambda$launchClearStackTimeout$slambda, 'NavHost$lambda$lambda$launchClearStackTimeout$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$83, '$invokeCOROUTINE$83', classMeta, CoroutineImpl);
  setMetadataFor(SetPasswordUseCaseJs, 'SetPasswordUseCaseJs', classMeta, VOID, [SetPasswordUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(OpenBlobUseCaseJs, 'OpenBlobUseCaseJs', classMeta, VOID, [OpenBlobUseCase], OpenBlobUseCaseJs, VOID, VOID, [3]);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UriToSaveQueueItem, 'UriToSaveQueueItem', classMeta);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$84, '$invokeCOROUTINE$84', classMeta, CoroutineImpl);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs, 'SaveLocalUrisAsBlobUseCaseJs', classMeta, VOID, [SaveLocalUrisAsBlobsUseCase], VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueSavePictureUseCaseJs$invoke$slambda, 'EnqueueSavePictureUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EnqueueSavePictureUseCaseJs, 'EnqueueSavePictureUseCaseJs', classMeta, VOID, [EnqueueSavePictureUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor(SetClipboardStringUseCaseJs, 'SetClipboardStringUseCaseJs', classMeta, VOID, [SetClipboardStringUseCase], SetClipboardStringUseCaseJs);
  setMetadataFor($invokeCOROUTINE$85, '$invokeCOROUTINE$85', classMeta, CoroutineImpl);
  setMetadataFor(CompressImageUseCaseJs, 'CompressImageUseCaseJs', classMeta, VOID, [CompressUseCase], CompressImageUseCaseJs, VOID, VOID, [4]);
  setMetadataFor(Companion_207, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$86, '$invokeCOROUTINE$86', classMeta, CoroutineImpl);
  setMetadataFor(ContentEntryGetMetaDataFromUriUseCaseJs, 'ContentEntryGetMetaDataFromUriUseCaseJs', classMeta, VOID, [ContentEntryGetMetaDataFromUriUseCase], VOID, VOID, VOID, [4]);
  setMetadataFor($invokeCOROUTINE$87, '$invokeCOROUTINE$87', classMeta, CoroutineImpl);
  setMetadataFor(GetSubtitleTrackFromUriUseCaseJs, 'GetSubtitleTrackFromUriUseCaseJs', classMeta, VOID, [GetSubtitleTrackFromUriUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor($invokeCOROUTINE$88, '$invokeCOROUTINE$88', classMeta, CoroutineImpl);
  setMetadataFor(LaunchXapiUseCaseJs, 'LaunchXapiUseCaseJs', classMeta, VOID, [LaunchXapiUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(SetLanguageUseCaseJs, 'SetLanguageUseCaseJs', classMeta, VOID, [SetLanguageUseCase]);
  setMetadataFor(GoToLearningSpaceUseCaseJs, 'GoToLearningSpaceUseCaseJs', classMeta, VOID, [GoToLearningSpaceUseCase]);
  setMetadataFor(OpenExternalLinkUseCaseJs, 'OpenExternalLinkUseCaseJs', classMeta, VOID, [OpenExternalLinkUseCase], OpenExternalLinkUseCaseJs);
  setMetadataFor(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda, 'BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$89, '$invokeCOROUTINE$89', classMeta, CoroutineImpl);
  setMetadataFor(BulkAddPersonsFromLocalUriUseCaseJs, 'BulkAddPersonsFromLocalUriUseCaseJs', classMeta, VOID, [BulkAddPersonsFromLocalUriUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor(OnClickPhoneNumUseCaseJs, 'OnClickPhoneNumUseCaseJs', classMeta, VOID, [OnClickPhoneNumUseCase], OnClickPhoneNumUseCaseJs);
  setMetadataFor(PhoneNumValidatorUseCaseJs, 'PhoneNumValidatorUseCaseJs', classMeta, VOID, [PhoneNumValidatorUseCase], PhoneNumValidatorUseCaseJs);
  setMetadataFor(PhoneNumberJs, 'PhoneNumberJs', classMeta);
  setMetadataFor(PhoneNumberUtilJs, 'PhoneNumberUtilJs', classMeta, VOID, [IPhoneNumberUtil], PhoneNumberUtilJs);
  setMetadataFor(OnClickSendEmailUseCaseJs, 'OnClickSendEmailUseCaseJs', classMeta, VOID, [OnClickEmailUseCase], OnClickSendEmailUseCaseJs);
  setMetadataFor(DeleteUrisUseCaseJs, 'DeleteUrisUseCaseJs', classMeta, VOID, [DeleteUrisUseCase], VOID, VOID, VOID, [2]);
  setMetadataFor(IsTempFileCheckerUseCaseJs, 'IsTempFileCheckerUseCaseJs', classMeta, VOID, [IsTempFileCheckerUseCase], IsTempFileCheckerUseCaseJs);
  setMetadataFor($invokeCOROUTINE$90, '$invokeCOROUTINE$90', classMeta, CoroutineImpl);
  setMetadataFor(ChunkedUploadClientLocalUriUseCaseJs, 'ChunkedUploadClientLocalUriUseCaseJs', classMeta, VOID, [ChunkedUploadClientLocalUriUseCase], ChunkedUploadClientLocalUriUseCaseJs, VOID, VOID, [8]);
  setMetadataFor(SaveStatementOnClearUseCaseJs$invoke$slambda, 'SaveStatementOnClearUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SaveStatementOnClearUseCaseJs, 'SaveStatementOnClearUseCaseJs', classMeta, VOID, [SaveStatementOnClearUseCase]);
  setMetadataFor(SaveStatementOnUnloadUseCaseJs, 'SaveStatementOnUnloadUseCaseJs', classMeta, VOID, [SaveStatementOnUnloadUseCase]);
  setMetadataFor($invokeCOROUTINE$91, '$invokeCOROUTINE$91', classMeta, CoroutineImpl);
  setMetadataFor(ResumeOrStartXapiSessionUseCaseJs, 'ResumeOrStartXapiSessionUseCaseJs', classMeta, VOID, [ResumeOrStartXapiSessionUseCase], VOID, VOID, VOID, [7]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_42, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(collectAsState$lambda$slambda$slambda, 'collectAsState$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(collectAsState$lambda$slambda, 'collectAsState$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(useLaunchedEffect$lambda$slambda, 'useLaunchedEffect$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_43, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(useNavControllerEffect$slambda$slambda, 'useNavControllerEffect$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(useNavControllerEffect$slambda, 'useNavControllerEffect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ViewModelAndKey, 'ViewModelAndKey', classMeta);
  setMetadataFor(Companion_208, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemImpl, 'UstadMobileSystemImpl', classMeta, UstadMobileSystemCommon, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(StringProviderJs, 'StringProviderJs', classMeta);
  setMetadataFor(Companion_209, 'Companion', objectMeta);
  setMetadataFor(SavedStateHandle2, 'SavedStateHandle2', classMeta);
  setMetadataFor(UrlKmpJs, 'UrlKmpJs', classMeta);
  setMetadataFor(Companion_210, 'Companion', objectMeta);
  setMetadataFor(UstadAntilog, 'UstadAntilog', classMeta, Antilog, VOID, UstadAntilog);
  setMetadataFor(JsHeaderStringValuesAdapter, 'JsHeaderStringValuesAdapter', classMeta, VOID, [IStringValues]);
  //endregion
  function strings() {
    strings_instance = this;
    var tmp = this;
    var tmp_0 = require('localization/comustadmobilecore_stringsJson.json');
    tmp.dmi_1 = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    var tmp_1 = this;
    var tmp_2 = require('localization/comustadmobilecore_stringsJson_rw.json');
    var tmp_3 = new SupportedLocale('rw', (!(tmp_2 == null) ? typeof tmp_2 === 'string' : false) ? tmp_2 : THROW_CCE());
    var tmp_4 = require('localization/comustadmobilecore_stringsJson_ne.json');
    var tmp_5 = new SupportedLocale('ne', (!(tmp_4 == null) ? typeof tmp_4 === 'string' : false) ? tmp_4 : THROW_CCE());
    var tmp_6 = require('localization/comustadmobilecore_stringsJson_ar.json');
    var tmp_7 = new SupportedLocale('ar', (!(tmp_6 == null) ? typeof tmp_6 === 'string' : false) ? tmp_6 : THROW_CCE());
    var tmp_8 = require('localization/comustadmobilecore_stringsJson_bn.json');
    var tmp_9 = new SupportedLocale('bn', (!(tmp_8 == null) ? typeof tmp_8 === 'string' : false) ? tmp_8 : THROW_CCE());
    var tmp_10 = require('localization/comustadmobilecore_stringsJson_fr.json');
    var tmp_11 = new SupportedLocale('fr', (!(tmp_10 == null) ? typeof tmp_10 === 'string' : false) ? tmp_10 : THROW_CCE());
    var tmp_12 = require('localization/comustadmobilecore_stringsJson_km.json');
    var tmp_13 = new SupportedLocale('km', (!(tmp_12 == null) ? typeof tmp_12 === 'string' : false) ? tmp_12 : THROW_CCE());
    var tmp_14 = require('localization/comustadmobilecore_stringsJson_fa.json');
    var tmp_15 = new SupportedLocale('fa', (!(tmp_14 == null) ? typeof tmp_14 === 'string' : false) ? tmp_14 : THROW_CCE());
    var tmp_16 = require('localization/comustadmobilecore_stringsJson_nb-NO.json');
    var tmp_17 = new SupportedLocale('nb-NO', (!(tmp_16 == null) ? typeof tmp_16 === 'string' : false) ? tmp_16 : THROW_CCE());
    var tmp_18 = require('localization/comustadmobilecore_stringsJson_it.json');
    var tmp_19 = new SupportedLocale('it', (!(tmp_18 == null) ? typeof tmp_18 === 'string' : false) ? tmp_18 : THROW_CCE());
    var tmp_20 = require('localization/comustadmobilecore_stringsJson_my.json');
    var tmp_21 = new SupportedLocale('my', (!(tmp_20 == null) ? typeof tmp_20 === 'string' : false) ? tmp_20 : THROW_CCE());
    var tmp_22 = require('localization/comustadmobilecore_stringsJson_ps.json');
    var tmp_23 = new SupportedLocale('ps', (!(tmp_22 == null) ? typeof tmp_22 === 'string' : false) ? tmp_22 : THROW_CCE());
    var tmp_24 = require('localization/comustadmobilecore_stringsJson_tg.json');
    var tmp_25 = new SupportedLocale('tg', (!(tmp_24 == null) ? typeof tmp_24 === 'string' : false) ? tmp_24 : THROW_CCE());
    var tmp_26 = require('localization/comustadmobilecore_stringsJson_ru.json');
    tmp_1.emi_1 = new SupportedLocales(listOf([tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, tmp_25, new SupportedLocale('ru', (!(tmp_26 == null) ? typeof tmp_26 === 'string' : false) ? tmp_26 : THROW_CCE())]));
    this.fmi_1 = new Impl(this.emi_1, this.dmi_1);
    this.gmi_1 = new StringResource('app_name', this.fmi_1);
    this.hmi_1 = new StringResource('blank', this.fmi_1);
    this.imi_1 = new StringResource('login', this.fmi_1);
    this.jmi_1 = new StringResource('got_it', this.fmi_1);
    this.kmi_1 = new StringResource('learn_more', this.fmi_1);
    this.lmi_1 = new StringResource('be_careful_interacting_online', this.fmi_1);
    this.mmi_1 = new StringResource('be_careful_not_to_share', this.fmi_1);
    this.nmi_1 = new StringResource('share_app', this.fmi_1);
    this.omi_1 = new StringResource('send_apk_file', this.fmi_1);
    this.pmi_1 = new StringResource('send_app_link', this.fmi_1);
    this.qmi_1 = new StringResource('error', this.fmi_1);
    this.rmi_1 = new StringResource('create_backup', this.fmi_1);
    this.smi_1 = new StringResource('create_backup_description', this.fmi_1);
    this.tmi_1 = new StringResource('err_registering_new_user', this.fmi_1);
    this.umi_1 = new StringResource('register_empty_fields', this.fmi_1);
    this.vmi_1 = new StringResource('register_incorrect_email', this.fmi_1);
    this.wmi_1 = new StringResource('group_activity', this.fmi_1);
    this.xmi_1 = new StringResource('select_group_members', this.fmi_1);
    this.ymi_1 = new StringResource('confirm_delete_message', this.fmi_1);
    this.zmi_1 = new StringResource('wrong_user_pass_combo', this.fmi_1);
    this.amj_1 = new StringResource('login_network_error', this.fmi_1);
    this.bmj_1 = new StringResource('download', this.fmi_1);
    this.cmj_1 = new StringResource('downloaded', this.fmi_1);
    this.dmj_1 = new StringResource('recycled', this.fmi_1);
    this.emj_1 = new StringResource('libraries', this.fmi_1);
    this.fmj_1 = new StringResource('pause_download', this.fmi_1);
    this.gmj_1 = new StringResource('ok', this.fmi_1);
    this.hmj_1 = new StringResource('confirm', this.fmi_1);
    this.imj_1 = new StringResource('cancel', this.fmi_1);
    this.jmj_1 = new StringResource('canceled', this.fmi_1);
    this.kmj_1 = new StringResource('delete', this.fmi_1);
    this.lmj_1 = new StringResource('deleted', this.fmi_1);
    this.mmj_1 = new StringResource('new_tab', this.fmi_1);
    this.nmj_1 = new StringResource('loading', this.fmi_1);
    this.omj_1 = new StringResource('deleting', this.fmi_1);
    this.pmj_1 = new StringResource('processing', this.fmi_1);
    this.qmj_1 = new StringResource('uploading', this.fmi_1);
    this.rmj_1 = new StringResource('error_opening_file', this.fmi_1);
    this.smj_1 = new StringResource('logout', this.fmi_1);
    this.tmj_1 = new StringResource('about', this.fmi_1);
    this.umj_1 = new StringResource('download_all', this.fmi_1);
    this.vmj_1 = new StringResource('next', this.fmi_1);
    this.wmj_1 = new StringResource('previous', this.fmi_1);
    this.xmj_1 = new StringResource('back', this.fmi_1);
    this.ymj_1 = new StringResource('username', this.fmi_1);
    this.zmj_1 = new StringResource('password', this.fmi_1);
    this.amk_1 = new StringResource('confirm_password', this.fmi_1);
    this.bmk_1 = new StringResource('last_name', this.fmi_1);
    this.cmk_1 = new StringResource('first_name', this.fmi_1);
    this.dmk_1 = new StringResource('least_recent', this.fmi_1);
    this.emk_1 = new StringResource('by_score', this.fmi_1);
    this.fmk_1 = new StringResource('by_completion', this.fmi_1);
    this.gmk_1 = new StringResource('by_recent_attempt', this.fmi_1);
    this.hmk_1 = new StringResource('by_timestamp', this.fmi_1);
    this.imk_1 = new StringResource('register_now', this.fmi_1);
    this.jmk_1 = new StringResource('new_password', this.fmi_1);
    this.kmk_1 = new StringResource('phone_memory', this.fmi_1);
    this.lmk_1 = new StringResource('memory_card', this.fmi_1);
    this.mmk_1 = new StringResource('device', this.fmi_1);
    this.nmk_1 = new StringResource('register', this.fmi_1);
    this.omk_1 = new StringResource('phone_number', this.fmi_1);
    this.pmk_1 = new StringResource('name_key', this.fmi_1);
    this.qmk_1 = new StringResource('description', this.fmi_1);
    this.rmk_1 = new StringResource('male', this.fmi_1);
    this.smk_1 = new StringResource('female', this.fmi_1);
    this.tmk_1 = new StringResource('other', this.fmi_1);
    this.umk_1 = new StringResource('unset', this.fmi_1);
    this.vmk_1 = new StringResource('settings', this.fmi_1);
    this.wmk_1 = new StringResource('language', this.fmi_1);
    this.xmk_1 = new StringResource('add_a_new_language', this.fmi_1);
    this.ymk_1 = new StringResource('add_new_language', this.fmi_1);
    this.zmk_1 = new StringResource('select_language', this.fmi_1);
    this.aml_1 = new StringResource('languages', this.fmi_1);
    this.bml_1 = new StringResource('edit_language', this.fmi_1);
    this.cml_1 = new StringResource('two_letter_code', this.fmi_1);
    this.dml_1 = new StringResource('three_letter_code', this.fmi_1);
    this.eml_1 = new StringResource('languages_description', this.fmi_1);
    this.fml_1 = new StringResource('advanced', this.fmi_1);
    this.gml_1 = new StringResource('optional', this.fmi_1);
    this.hml_1 = new StringResource('email', this.fmi_1);
    this.iml_1 = new StringResource('regcode', this.fmi_1);
    this.jml_1 = new StringResource('home', this.fmi_1);
    this.kml_1 = new StringResource('phone', this.fmi_1);
    this.lml_1 = new StringResource('attendance', this.fmi_1);
    this.mml_1 = new StringResource('classes', this.fmi_1);
    this.nml_1 = new StringResource('exams', this.fmi_1);
    this.oml_1 = new StringResource('reports', this.fmi_1);
    this.pml_1 = new StringResource('choose_template', this.fmi_1);
    this.qml_1 = new StringResource('save_as_template', this.fmi_1);
    this.rml_1 = new StringResource('contents', this.fmi_1);
    this.sml_1 = new StringResource('students', this.fmi_1);
    this.tml_1 = new StringResource('add_a_student', this.fmi_1);
    this.uml_1 = new StringResource('forgot_password', this.fmi_1);
    this.vml_1 = new StringResource('notifications', this.fmi_1);
    this.wml_1 = new StringResource('account', this.fmi_1);
    this.xml_1 = new StringResource('accounts', this.fmi_1);
    this.yml_1 = new StringResource('share', this.fmi_1);
    this.zml_1 = new StringResource('send', this.fmi_1);
    this.amm_1 = new StringResource('open', this.fmi_1);
    this.bmm_1 = new StringResource('downloading', this.fmi_1);
    this.cmm_1 = new StringResource('waiting', this.fmi_1);
    this.dmm_1 = new StringResource('waiting_for_connection', this.fmi_1);
    this.emm_1 = new StringResource('queued', this.fmi_1);
    this.fmm_1 = new StringResource('failed', this.fmi_1);
    this.gmm_1 = new StringResource('passed', this.fmi_1);
    this.hmm_1 = new StringResource('success', this.fmi_1);
    this.imm_1 = new StringResource('failure', this.fmi_1);
    this.jmm_1 = new StringResource('incomplete', this.fmi_1);
    this.kmm_1 = new StringResource('completed', this.fmi_1);
    this.lmm_1 = new StringResource('experience', this.fmi_1);
    this.mmm_1 = new StringResource('answered', this.fmi_1);
    this.nmm_1 = new StringResource('select_subtitle_video', this.fmi_1);
    this.omm_1 = new StringResource('no_subtitle', this.fmi_1);
    this.pmm_1 = new StringResource('no_video_file_found', this.fmi_1);
    this.qmm_1 = new StringResource('content_from_file', this.fmi_1);
    this.rmm_1 = new StringResource('content_from_link', this.fmi_1);
    this.smm_1 = new StringResource('import_from_file', this.fmi_1);
    this.tmm_1 = new StringResource('import_from_link', this.fmi_1);
    this.umm_1 = new StringResource('import_content', this.fmi_1);
    this.vmm_1 = new StringResource('update_content', this.fmi_1);
    this.wmm_1 = new StringResource('publicly_accessible', this.fmi_1);
    this.xmm_1 = new StringResource('title', this.fmi_1);
    this.ymm_1 = new StringResource('licence', this.fmi_1);
    this.zmm_1 = new StringResource('ebook', this.fmi_1);
    this.amn_1 = new StringResource('interactive', this.fmi_1);
    this.bmn_1 = new StringResource('collection', this.fmi_1);
    this.cmn_1 = new StringResource('document', this.fmi_1);
    this.dmn_1 = new StringResource('article', this.fmi_1);
    this.emn_1 = new StringResource('audio', this.fmi_1);
    this.fmn_1 = new StringResource('move', this.fmi_1);
    this.gmn_1 = new StringResource('hide', this.fmi_1);
    this.hmn_1 = new StringResource('unhide', this.fmi_1);
    this.imn_1 = new StringResource('compress', this.fmi_1);
    this.jmn_1 = new StringResource('and_key', this.fmi_1);
    this.kmn_1 = new StringResource('added', this.fmi_1);
    this.lmn_1 = new StringResource('attempts', this.fmi_1);
    this.mmn_1 = new StringResource('add_link_description', this.fmi_1);
    this.nmn_1 = new StringResource('add_gallery_description', this.fmi_1);
    this.omn_1 = new StringResource('add_file_description', this.fmi_1);
    this.pmn_1 = new StringResource('error_this_device_doesnt_support_bluetooth_sharing', this.fmi_1);
    this.qmn_1 = new StringResource('share_offline_zip_checkbox_label', this.fmi_1);
    this.rmn_1 = new StringResource('share_offline_dialog_message', this.fmi_1);
    this.smn_1 = new StringResource('preparing', this.fmi_1);
    this.tmn_1 = new StringResource('fixed_date', this.fmi_1);
    this.umn_1 = new StringResource('relative_date', this.fmi_1);
    this.vmn_1 = new StringResource('field_required_prompt', this.fmi_1);
    this.wmn_1 = new StringResource('field_password_error_min', this.fmi_1);
    this.xmn_1 = new StringResource('filed_password_no_match', this.fmi_1);
    this.ymn_1 = new StringResource('update', this.fmi_1);
    this.zmn_1 = new StringResource('profile', this.fmi_1);
    this.amo_1 = new StringResource('dialog_download_from_playstore_message', this.fmi_1);
    this.bmo_1 = new StringResource('dialog_download_from_playstore_ok', this.fmi_1);
    this.cmo_1 = new StringResource('dialog_download_from_playstore_cancel', this.fmi_1);
    this.dmo_1 = new StringResource('accept', this.fmi_1);
    this.emo_1 = new StringResource('also_available_in', this.fmi_1);
    this.fmo_1 = new StringResource('created_partnership', this.fmi_1);
    this.gmo_1 = new StringResource('onboarding_get_started_label', this.fmi_1);
    this.hmo_1 = new StringResource('lets_get_started_label', this.fmi_1);
    this.imo_1 = new StringResource('onboarding_headline1', this.fmi_1);
    this.jmo_1 = new StringResource('onboarding_subheadline1', this.fmi_1);
    this.kmo_1 = new StringResource('onboarding_headline2', this.fmi_1);
    this.lmo_1 = new StringResource('onboarding_subheadline2', this.fmi_1);
    this.mmo_1 = new StringResource('onboarding_headline3', this.fmi_1);
    this.nmo_1 = new StringResource('onboarding_subheadline3', this.fmi_1);
    this.omo_1 = new StringResource('download_continue_stacked_label', this.fmi_1);
    this.pmo_1 = new StringResource('im_an_individual_learner', this.fmi_1);
    this.qmo_1 = new StringResource('im_an_individual_learner_description', this.fmi_1);
    this.rmo_1 = new StringResource('i_want_to_join_my_organization_school', this.fmi_1);
    this.smo_1 = new StringResource('i_want_to_join_my_organization_school_description', this.fmi_1);
    this.tmo_1 = new StringResource('i_want_to_add_my_organization_school', this.fmi_1);
    this.umo_1 = new StringResource('i_want_to_add_my_organization_school_description', this.fmi_1);
    this.vmo_1 = new StringResource('individual_action_title', this.fmi_1);
    this.wmo_1 = new StringResource('create_new_local_account_title', this.fmi_1);
    this.xmo_1 = new StringResource('create_new_local_account_description', this.fmi_1);
    this.ymo_1 = new StringResource('restore_local_account_title', this.fmi_1);
    this.zmo_1 = new StringResource('restore_local_account_description', this.fmi_1);
    this.amp_1 = new StringResource('download_continue_btn_label', this.fmi_1);
    this.bmp_1 = new StringResource('download_wifi_only', this.fmi_1);
    this.cmp_1 = new StringResource('download_calculating', this.fmi_1);
    this.dmp_1 = new StringResource('download_downloading_placeholder', this.fmi_1);
    this.emp_1 = new StringResource('download_summary_title', this.fmi_1);
    this.fmp_1 = new StringResource('download_cancel_label', this.fmi_1);
    this.gmp_1 = new StringResource('download_pause_download', this.fmi_1);
    this.hmp_1 = new StringResource('download_storage_option_device', this.fmi_1);
    this.imp_1 = new StringResource('download_locally_availability', this.fmi_1);
    this.jmp_1 = new StringResource('download_cloud_availability', this.fmi_1);
    this.kmp_1 = new StringResource('insufficient_space', this.fmi_1);
    this.lmp_1 = new StringResource('download_entry_state_paused', this.fmi_1);
    this.mmp_1 = new StringResource('get_app', this.fmi_1);
    this.nmp_1 = new StringResource('no_app_found', this.fmi_1);
    this.omp_1 = new StringResource('entry_details_author', this.fmi_1);
    this.pmp_1 = new StringResource('entry_details_publisher', this.fmi_1);
    this.qmp_1 = new StringResource('entry_details_license', this.fmi_1);
    this.rmp_1 = new StringResource('file_not_found', this.fmi_1);
    this.smp_1 = new StringResource('multiple_choice', this.fmi_1);
    this.tmp_1 = new StringResource('preview', this.fmi_1);
    this.ump_1 = new StringResource('content_creation_storage_option_title', this.fmi_1);
    this.vmp_1 = new StringResource('file_required_prompt', this.fmi_1);
    this.wmp_1 = new StringResource('content_creation_folder_new_message', this.fmi_1);
    this.xmp_1 = new StringResource('content_creation_folder_update_message', this.fmi_1);
    this.ymp_1 = new StringResource('error_message_load_page', this.fmi_1);
    this.zmp_1 = new StringResource('error_message_update_document', this.fmi_1);
    this.amq_1 = new StringResource('supported_files', this.fmi_1);
    this.bmq_1 = new StringResource('content_editor_save_error', this.fmi_1);
    this.cmq_1 = new StringResource('content_entry_export_inprogress', this.fmi_1);
    this.dmq_1 = new StringResource('content_entry_export_message', this.fmi_1);
    this.emq_1 = new StringResource('show_hidden_items', this.fmi_1);
    this.fmq_1 = new StringResource('open_folder', this.fmi_1);
    this.gmq_1 = new StringResource('action_hidden', this.fmi_1);
    this.hmq_1 = new StringResource('invalid', this.fmi_1);
    this.imq_1 = new StringResource('enter_register_code', this.fmi_1);
    this.jmq_1 = new StringResource('bar_chart', this.fmi_1);
    this.kmq_1 = new StringResource('line_chart', this.fmi_1);
    this.lmq_1 = new StringResource('score', this.fmi_1);
    this.mmq_1 = new StringResource('content_total_duration', this.fmi_1);
    this.nmq_1 = new StringResource('content_average_duration', this.fmi_1);
    this.omq_1 = new StringResource('count_session', this.fmi_1);
    this.pmq_1 = new StringResource('interaction_recorded', this.fmi_1);
    this.qmq_1 = new StringResource('number_active_users', this.fmi_1);
    this.rmq_1 = new StringResource('average_usage_time_per_user', this.fmi_1);
    this.smq_1 = new StringResource('number_students_completed', this.fmi_1);
    this.tmq_1 = new StringResource('percent_students_completed', this.fmi_1);
    this.umq_1 = new StringResource('total_attendances', this.fmi_1);
    this.vmq_1 = new StringResource('total_absences', this.fmi_1);
    this.wmq_1 = new StringResource('total_lates', this.fmi_1);
    this.xmq_1 = new StringResource('percent_students_attended', this.fmi_1);
    this.ymq_1 = new StringResource('percent_students_attended_or_late', this.fmi_1);
    this.zmq_1 = new StringResource('total_number_of_classes', this.fmi_1);
    this.amr_1 = new StringResource('number_unique_students_attending', this.fmi_1);
    this.bmr_1 = new StringResource('xapi_day', this.fmi_1);
    this.cmr_1 = new StringResource('xapi_week', this.fmi_1);
    this.dmr_1 = new StringResource('xapi_month', this.fmi_1);
    this.emr_1 = new StringResource('xapi_custom_date', this.fmi_1);
    this.fmr_1 = new StringResource('xapi_content_entry', this.fmi_1);
    this.gmr_1 = new StringResource('xapi_clear', this.fmi_1);
    this.hmr_1 = new StringResource('last_week_date_range', this.fmi_1);
    this.imr_1 = new StringResource('last_two_week_date_range', this.fmi_1);
    this.jmr_1 = new StringResource('last_month_date_range', this.fmi_1);
    this.kmr_1 = new StringResource('last_three_months_date_range', this.fmi_1);
    this.lmr_1 = new StringResource('new_custom_date_range', this.fmi_1);
    this.mmr_1 = new StringResource('selected_custom_range', this.fmi_1);
    this.nmr_1 = new StringResource('time_range', this.fmi_1);
    this.omr_1 = new StringResource('year', this.fmi_1);
    this.pmr_1 = new StringResource('from', this.fmi_1);
    this.qmr_1 = new StringResource('done', this.fmi_1);
    this.rmr_1 = new StringResource('xapi_options_general', this.fmi_1);
    this.smr_1 = new StringResource('xapi_options_report_title', this.fmi_1);
    this.tmr_1 = new StringResource('xapi_options_visual_type', this.fmi_1);
    this.umr_1 = new StringResource('xapi_options_data_set', this.fmi_1);
    this.vmr_1 = new StringResource('xapi_options_series', this.fmi_1);
    this.wmr_1 = new StringResource('xapi_options_axes', this.fmi_1);
    this.xmr_1 = new StringResource('xapi_options_y_axes', this.fmi_1);
    this.ymr_1 = new StringResource('xapi_options_x_axes', this.fmi_1);
    this.zmr_1 = new StringResource('xapi_options_subgroup', this.fmi_1);
    this.ams_1 = new StringResource('xapi_options_filters', this.fmi_1);
    this.bms_1 = new StringResource('xapi_options_who', this.fmi_1);
    this.cms_1 = new StringResource('xapi_options_did', this.fmi_1);
    this.dms_1 = new StringResource('xapi_options_what', this.fmi_1);
    this.ems_1 = new StringResource('xapi_options_when', this.fmi_1);
    this.fms_1 = new StringResource('xapi_options_where', this.fmi_1);
    this.gms_1 = new StringResource('time_range_all', this.fmi_1);
    this.hms_1 = new StringResource('report_filter_edit_field', this.fmi_1);
    this.ims_1 = new StringResource('report_filter_edit_condition', this.fmi_1);
    this.jms_1 = new StringResource('report_filter_edit_values', this.fmi_1);
    this.kms_1 = new StringResource('report', this.fmi_1);
    this.lms_1 = new StringResource('create_a_new_report', this.fmi_1);
    this.mms_1 = new StringResource('edit_report', this.fmi_1);
    this.nms_1 = new StringResource('verb', this.fmi_1);
    this.oms_1 = new StringResource('add_a_new_verb', this.fmi_1);
    this.pms_1 = new StringResource('id_verbentity_urlid', this.fmi_1);
    this.qms_1 = new StringResource('edit_filters', this.fmi_1);
    this.rms_1 = new StringResource('field_person_gender', this.fmi_1);
    this.sms_1 = new StringResource('field_person_age', this.fmi_1);
    this.tms_1 = new StringResource('field_content_completion', this.fmi_1);
    this.ums_1 = new StringResource('field_content_entry', this.fmi_1);
    this.vms_1 = new StringResource('field_content_progress', this.fmi_1);
    this.wms_1 = new StringResource('field_attendance_percentage', this.fmi_1);
    this.xms_1 = new StringResource('condition_is', this.fmi_1);
    this.yms_1 = new StringResource('condition_is_not', this.fmi_1);
    this.zms_1 = new StringResource('condition_greater_than', this.fmi_1);
    this.amt_1 = new StringResource('condition_less_than', this.fmi_1);
    this.bmt_1 = new StringResource('condition_in_list', this.fmi_1);
    this.cmt_1 = new StringResource('condition_not_in_list', this.fmi_1);
    this.dmt_1 = new StringResource('condition_between', this.fmi_1);
    this.emt_1 = new StringResource('add_person_filter', this.fmi_1);
    this.fmt_1 = new StringResource('add_verb_filter', this.fmi_1);
    this.gmt_1 = new StringResource('add_content_filter', this.fmi_1);
    this.hmt_1 = new StringResource('dashboard', this.fmi_1);
    this.imt_1 = new StringResource('activity_import_link', this.fmi_1);
    this.jmt_1 = new StringResource('xapi_hours', this.fmi_1);
    this.kmt_1 = new StringResource('xapi_minutes', this.fmi_1);
    this.lmt_1 = new StringResource('xapi_seconds', this.fmi_1);
    this.mmt_1 = new StringResource('xapi_verb_header', this.fmi_1);
    this.nmt_1 = new StringResource('xapi_result_header', this.fmi_1);
    this.omt_1 = new StringResource('xapi_score', this.fmi_1);
    this.pmt_1 = new StringResource('content_score', this.fmi_1);
    this.qmt_1 = new StringResource('completion_key', this.fmi_1);
    this.rmt_1 = new StringResource('import_title_not_entered', this.fmi_1);
    this.smt_1 = new StringResource('no_account', this.fmi_1);
    this.tmt_1 = new StringResource('enter_url', this.fmi_1);
    this.umt_1 = new StringResource('invalid_link', this.fmi_1);
    this.vmt_1 = new StringResource('invalid_file', this.fmi_1);
    this.wmt_1 = new StringResource('import_link_content_not_supported', this.fmi_1);
    this.xmt_1 = new StringResource('unsupported_file_type', this.fmi_1);
    this.ymt_1 = new StringResource('import_link_big_size', this.fmi_1);
    this.zmt_1 = new StringResource('import_link_error', this.fmi_1);
    this.amu_1 = new StringResource('supported_link', this.fmi_1);
    this.bmu_1 = new StringResource('offline_sharing_enable_bluetooth_prompt', this.fmi_1);
    this.cmu_1 = new StringResource('offline_sharing_enable_wifi_promot', this.fmi_1);
    this.dmu_1 = new StringResource('enable', this.fmi_1);
    this.emu_1 = new StringResource('repo_loading_status_loading_cloud', this.fmi_1);
    this.fmu_1 = new StringResource('repo_loading_status_loading_mirror', this.fmi_1);
    this.gmu_1 = new StringResource('repo_loading_status_failed_noconnection', this.fmi_1);
    this.hmu_1 = new StringResource('repo_loading_status_failed_connection_error', this.fmi_1);
    this.imu_1 = new StringResource('licence_type_cc_by', this.fmi_1);
    this.jmu_1 = new StringResource('licence_type_cc_by_sa', this.fmi_1);
    this.kmu_1 = new StringResource('licence_type_cc_by_sa_nc', this.fmi_1);
    this.lmu_1 = new StringResource('licence_type_cc_by_nc', this.fmi_1);
    this.mmu_1 = new StringResource('licence_type_cc_by_nc_sa', this.fmi_1);
    this.nmu_1 = new StringResource('licence_type_public_domain', this.fmi_1);
    this.omu_1 = new StringResource('licence_type_all_rights', this.fmi_1);
    this.pmu_1 = new StringResource('license_type_cc_0', this.fmi_1);
    this.qmu_1 = new StringResource('syncing', this.fmi_1);
    this.rmu_1 = new StringResource('feed', this.fmi_1);
    this.smu_1 = new StringResource('people', this.fmi_1);
    this.tmu_1 = new StringResource('record_attendance', this.fmi_1);
    this.umu_1 = new StringResource('today', this.fmi_1);
    this.vmu_1 = new StringResource('sort_by', this.fmi_1);
    this.wmu_1 = new StringResource('log', this.fmi_1);
    this.xmu_1 = new StringResource('schedule', this.fmi_1);
    this.ymu_1 = new StringResource('add_a_schedule', this.fmi_1);
    this.zmu_1 = new StringResource('edit_schedule', this.fmi_1);
    this.amv_1 = new StringResource('first_key', this.fmi_1);
    this.bmv_1 = new StringResource('last_key', this.fmi_1);
    this.cmv_1 = new StringResource('last_week', this.fmi_1);
    this.dmv_1 = new StringResource('mark_all', this.fmi_1);
    this.emv_1 = new StringResource('mark_all_present', this.fmi_1);
    this.fmv_1 = new StringResource('mark_all_absent', this.fmi_1);
    this.gmv_1 = new StringResource('present', this.fmi_1);
    this.hmv_1 = new StringResource('absent', this.fmi_1);
    this.imv_1 = new StringResource('attendance_report', this.fmi_1);
    this.jmv_1 = new StringResource('father', this.fmi_1);
    this.kmv_1 = new StringResource('mother', this.fmi_1);
    this.lmv_1 = new StringResource('birthday', this.fmi_1);
    this.mmv_1 = new StringResource('first_names', this.fmi_1);
    this.nmv_1 = new StringResource('basic_details', this.fmi_1);
    this.omv_1 = new StringResource('address', this.fmi_1);
    this.pmv_1 = new StringResource('add_person_to_class', this.fmi_1);
    this.qmv_1 = new StringResource('edit', this.fmi_1);
    this.rmv_1 = new StringResource('clazz', this.fmi_1);
    this.smv_1 = new StringResource('add_a_new_class', this.fmi_1);
    this.tmv_1 = new StringResource('edit_clazz', this.fmi_1);
    this.umv_1 = new StringResource('add_a_class', this.fmi_1);
    this.vmv_1 = new StringResource('join_existing_class', this.fmi_1);
    this.wmv_1 = new StringResource('student_image', this.fmi_1);
    this.xmv_1 = new StringResource('question_key', this.fmi_1);
    this.ymv_1 = new StringResource('add_question', this.fmi_1);
    this.zmv_1 = new StringResource('edit_question', this.fmi_1);
    this.amw_1 = new StringResource('questions', this.fmi_1);
    this.bmw_1 = new StringResource('add_person', this.fmi_1);
    this.cmw_1 = new StringResource('add_class', this.fmi_1);
    this.dmw_1 = new StringResource('class_name', this.fmi_1);
    this.emw_1 = new StringResource('class_description', this.fmi_1);
    this.fmw_1 = new StringResource('to_key', this.fmi_1);
    this.gmw_1 = new StringResource('holiday', this.fmi_1);
    this.hmw_1 = new StringResource('add_a_holiday', this.fmi_1);
    this.imw_1 = new StringResource('edit_holiday', this.fmi_1);
    this.jmw_1 = new StringResource('holidays', this.fmi_1);
    this.kmw_1 = new StringResource('holiday_calendar', this.fmi_1);
    this.lmw_1 = new StringResource('add_a_new_holiday_calendar', this.fmi_1);
    this.mmw_1 = new StringResource('edit_holiday_calendar', this.fmi_1);
    this.nmw_1 = new StringResource('features_enabled', this.fmi_1);
    this.omw_1 = new StringResource('weekly', this.fmi_1);
    this.pmw_1 = new StringResource('once', this.fmi_1);
    this.qmw_1 = new StringResource('daily', this.fmi_1);
    this.rmw_1 = new StringResource('monthly', this.fmi_1);
    this.smw_1 = new StringResource('yearly', this.fmi_1);
    this.tmw_1 = new StringResource('sunday', this.fmi_1);
    this.umw_1 = new StringResource('monday', this.fmi_1);
    this.vmw_1 = new StringResource('tuesday', this.fmi_1);
    this.wmw_1 = new StringResource('wednesday', this.fmi_1);
    this.xmw_1 = new StringResource('thursday', this.fmi_1);
    this.ymw_1 = new StringResource('friday', this.fmi_1);
    this.zmw_1 = new StringResource('saturday', this.fmi_1);
    this.amx_1 = new StringResource('day', this.fmi_1);
    this.bmx_1 = new StringResource('toC', this.fmi_1);
    this.cmx_1 = new StringResource('last_month', this.fmi_1);
    this.dmx_1 = new StringResource('activity_change', this.fmi_1);
    this.emx_1 = new StringResource('change_implemented_if_any', this.fmi_1);
    this.fmx_1 = new StringResource('duration', this.fmi_1);
    this.gmx_1 = new StringResource('how_did_it_go', this.fmi_1);
    this.hmx_1 = new StringResource('notes', this.fmi_1);
    this.imx_1 = new StringResource('activity', this.fmi_1);
    this.jmx_1 = new StringResource('sort_by_name', this.fmi_1);
    this.kmx_1 = new StringResource('sort_by_name_asc', this.fmi_1);
    this.lmx_1 = new StringResource('sort_by_name_desc', this.fmi_1);
    this.mmx_1 = new StringResource('date_enroll', this.fmi_1);
    this.nmx_1 = new StringResource('date_left', this.fmi_1);
    this.omx_1 = new StringResource('enroled', this.fmi_1);
    this.pmx_1 = new StringResource('class_enrolment', this.fmi_1);
    this.qmx_1 = new StringResource('graduated', this.fmi_1);
    this.rmx_1 = new StringResource('dropped_out', this.fmi_1);
    this.smx_1 = new StringResource('moved', this.fmi_1);
    this.tmx_1 = new StringResource('new_leaving_reason', this.fmi_1);
    this.umx_1 = new StringResource('edit_leaving_reason', this.fmi_1);
    this.vmx_1 = new StringResource('edit_enrolment', this.fmi_1);
    this.wmx_1 = new StringResource('new_enrolment', this.fmi_1);
    this.xmx_1 = new StringResource('select_leaving_reason', this.fmi_1);
    this.ymx_1 = new StringResource('add_leaving_reason', this.fmi_1);
    this.zmx_1 = new StringResource('leaving_reason', this.fmi_1);
    this.amy_1 = new StringResource('leaving_reasons', this.fmi_1);
    this.bmy_1 = new StringResource('leaving_reason_manage', this.fmi_1);
    this.cmy_1 = new StringResource('view_profile', this.fmi_1);
    this.dmy_1 = new StringResource('class_enrolment_outcome', this.fmi_1);
    this.emy_1 = new StringResource('class_enrolment_leaving', this.fmi_1);
    this.fmy_1 = new StringResource('in_progress', this.fmi_1);
    this.gmy_1 = new StringResource('outcome', this.fmi_1);
    this.hmy_1 = new StringResource('person_enrolment_in_class', this.fmi_1);
    this.imy_1 = new StringResource('enrolment', this.fmi_1);
    this.jmy_1 = new StringResource('error_start_date_before_clazz_date', this.fmi_1);
    this.kmy_1 = new StringResource('error_start_date_before_previous_enrolment_date', this.fmi_1);
    this.lmy_1 = new StringResource('time_present', this.fmi_1);
    this.mmy_1 = new StringResource('ascending', this.fmi_1);
    this.nmy_1 = new StringResource('descending', this.fmi_1);
    this.omy_1 = new StringResource('sort_by_text', this.fmi_1);
    this.pmy_1 = new StringResource('attendance_high_to_low', this.fmi_1);
    this.qmy_1 = new StringResource('attendance_low_to_high', this.fmi_1);
    this.rmy_1 = new StringResource('teacher', this.fmi_1);
    this.smy_1 = new StringResource('add_a_teacher', this.fmi_1);
    this.tmy_1 = new StringResource('partial', this.fmi_1);
    this.umy_1 = new StringResource('teachers_literal', this.fmi_1);
    this.vmy_1 = new StringResource('participant', this.fmi_1);
    this.wmy_1 = new StringResource('primary_user', this.fmi_1);
    this.xmy_1 = new StringResource('up_key', this.fmi_1);
    this.ymy_1 = new StringResource('down_key', this.fmi_1);
    this.zmy_1 = new StringResource('activity_went_good', this.fmi_1);
    this.amz_1 = new StringResource('activity_went_bad', this.fmi_1);
    this.bmz_1 = new StringResource('activity_enter_any_notes', this.fmi_1);
    this.cmz_1 = new StringResource('uom_frequency_title', this.fmi_1);
    this.dmz_1 = new StringResource('uom_duration_title', this.fmi_1);
    this.emz_1 = new StringResource('uom_boolean_title', this.fmi_1);
    this.fmz_1 = new StringResource('uom_default_title', this.fmi_1);
    this.gmz_1 = new StringResource('add_activity', this.fmi_1);
    this.hmz_1 = new StringResource('add_activity_literal', this.fmi_1);
    this.imz_1 = new StringResource('select_one', this.fmi_1);
    this.jmz_1 = new StringResource('measurement_type', this.fmi_1);
    this.kmz_1 = new StringResource('frequency', this.fmi_1);
    this.lmz_1 = new StringResource('yes_no', this.fmi_1);
    this.mmz_1 = new StringResource('time_period', this.fmi_1);
    this.nmz_1 = new StringResource('location', this.fmi_1);
    this.omz_1 = new StringResource('last_three_months', this.fmi_1);
    this.pmz_1 = new StringResource('export', this.fmi_1);
    this.qmz_1 = new StringResource('date', this.fmi_1);
    this.rmz_1 = new StringResource('average', this.fmi_1);
    this.smz_1 = new StringResource('age', this.fmi_1);
    this.tmz_1 = new StringResource('days', this.fmi_1);
    this.umz_1 = new StringResource('apply', this.fmi_1);
    this.vmz_1 = new StringResource('file_selected', this.fmi_1);
    this.wmz_1 = new StringResource('all', this.fmi_1);
    this.xmz_1 = new StringResource('holiday_calendars', this.fmi_1);
    this.ymz_1 = new StringResource('holiday_calendars_desc', this.fmi_1);
    this.zmz_1 = new StringResource('sel_question_set', this.fmi_1);
    this.an0_1 = new StringResource('sel_question_set_desc', this.fmi_1);
    this.bn0_1 = new StringResource('users', this.fmi_1);
    this.cn0_1 = new StringResource('nomination', this.fmi_1);
    this.dn0_1 = new StringResource('active', this.fmi_1);
    this.en0_1 = new StringResource('class_id', this.fmi_1);
    this.fn0_1 = new StringResource('gender_literal', this.fmi_1);
    this.gn0_1 = new StringResource('country', this.fmi_1);
    this.hn0_1 = new StringResource('connectivity', this.fmi_1);
    this.in0_1 = new StringResource('home_internet_access', this.fmi_1);
    this.jn0_1 = new StringResource('mobile_internet_access', this.fmi_1);
    this.kn0_1 = new StringResource('connectivity_limited', this.fmi_1);
    this.ln0_1 = new StringResource('connectivity_full', this.fmi_1);
    this.mn0_1 = new StringResource('prefer_not_to_say', this.fmi_1);
    this.nn0_1 = new StringResource('sel_question_set_to_use', this.fmi_1);
    this.on0_1 = new StringResource('search', this.fmi_1);
    this.pn0_1 = new StringResource('attendance_percentage', this.fmi_1);
    this.qn0_1 = new StringResource('filter', this.fmi_1);
    this.rn0_1 = new StringResource('over_key', this.fmi_1);
    this.sn0_1 = new StringResource('sync', this.fmi_1);
    this.tn0_1 = new StringResource('not_recorded', this.fmi_1);
    this.un0_1 = new StringResource('groups', this.fmi_1);
    this.vn0_1 = new StringResource('group_setting_desc', this.fmi_1);
    this.wn0_1 = new StringResource('roles', this.fmi_1);
    this.xn0_1 = new StringResource('role', this.fmi_1);
    this.yn0_1 = new StringResource('add_a_new_role', this.fmi_1);
    this.zn0_1 = new StringResource('edit_role', this.fmi_1);
    this.an1_1 = new StringResource('rols_assignment', this.fmi_1);
    this.bn1_1 = new StringResource('role_assignment_setting_desc', this.fmi_1);
    this.cn1_1 = new StringResource('locations', this.fmi_1);
    this.dn1_1 = new StringResource('locations_setting_desc', this.fmi_1);
    this.en1_1 = new StringResource('audit_log', this.fmi_1);
    this.fn1_1 = new StringResource('audit_log_setting_desc', this.fmi_1);
    this.gn1_1 = new StringResource('entry_key', this.fmi_1);
    this.hn1_1 = new StringResource('permission_key', this.fmi_1);
    this.in1_1 = new StringResource('permissions', this.fmi_1);
    this.jn1_1 = new StringResource('role_name', this.fmi_1);
    this.kn1_1 = new StringResource('members_key', this.fmi_1);
    this.ln1_1 = new StringResource('member_key', this.fmi_1);
    this.mn1_1 = new StringResource('role_assignment', this.fmi_1);
    this.nn1_1 = new StringResource('scope_by', this.fmi_1);
    this.on1_1 = new StringResource('assign_to', this.fmi_1);
    this.pn1_1 = new StringResource('person', this.fmi_1);
    this.qn1_1 = new StringResource('add_a_new_person', this.fmi_1);
    this.rn1_1 = new StringResource('edit_person', this.fmi_1);
    this.sn1_1 = new StringResource('permission_person_select', this.fmi_1);
    this.tn1_1 = new StringResource('permission_person_insert', this.fmi_1);
    this.un1_1 = new StringResource('permission_person_update', this.fmi_1);
    this.vn1_1 = new StringResource('permission_person_picture_select', this.fmi_1);
    this.wn1_1 = new StringResource('permission_person_picture_insert', this.fmi_1);
    this.xn1_1 = new StringResource('permission_person_picture_update', this.fmi_1);
    this.yn1_1 = new StringResource('permission_clazz_select', this.fmi_1);
    this.zn1_1 = new StringResource('permission_clazz_insert', this.fmi_1);
    this.an2_1 = new StringResource('permission_clazz_update', this.fmi_1);
    this.bn2_1 = new StringResource('permission_clazz_add_teacher', this.fmi_1);
    this.cn2_1 = new StringResource('permission_clazz_add_student', this.fmi_1);
    this.dn2_1 = new StringResource('permission_attendance_select', this.fmi_1);
    this.en2_1 = new StringResource('permission_attendance_insert', this.fmi_1);
    this.fn2_1 = new StringResource('permission_attendance_update', this.fmi_1);
    this.gn2_1 = new StringResource('permission_activity_select', this.fmi_1);
    this.hn2_1 = new StringResource('permission_activity_insert', this.fmi_1);
    this.in2_1 = new StringResource('permission_activity_update', this.fmi_1);
    this.jn2_1 = new StringResource('permission_sel_question_select', this.fmi_1);
    this.kn2_1 = new StringResource('permission_sel_question_insert', this.fmi_1);
    this.ln2_1 = new StringResource('permission_sel_question_update', this.fmi_1);
    this.mn2_1 = new StringResource('permission_sel_select', this.fmi_1);
    this.nn2_1 = new StringResource('permission_sel_update', this.fmi_1);
    this.on2_1 = new StringResource('custom_fields', this.fmi_1);
    this.pn2_1 = new StringResource('custom_field', this.fmi_1);
    this.qn2_1 = new StringResource('custom_fields_desc', this.fmi_1);
    this.rn2_1 = new StringResource('field_type', this.fmi_1);
    this.sn2_1 = new StringResource('text', this.fmi_1);
    this.tn2_1 = new StringResource('dropdown', this.fmi_1);
    this.un2_1 = new StringResource('options', this.fmi_1);
    this.vn2_1 = new StringResource('option_value', this.fmi_1);
    this.wn2_1 = new StringResource('errors', this.fmi_1);
    this.xn2_1 = new StringResource('shake_feedback', this.fmi_1);
    this.yn2_1 = new StringResource('feedback_hint', this.fmi_1);
    this.zn2_1 = new StringResource('send_feedback', this.fmi_1);
    this.an3_1 = new StringResource('feedback_thanks', this.fmi_1);
    this.bn3_1 = new StringResource('start_date', this.fmi_1);
    this.cn3_1 = new StringResource('end_date', this.fmi_1);
    this.dn3_1 = new StringResource('last_active', this.fmi_1);
    this.en3_1 = new StringResource('save', this.fmi_1);
    this.fn3_1 = new StringResource('change_password', this.fmi_1);
    this.gn3_1 = new StringResource('current_password', this.fmi_1);
    this.hn3_1 = new StringResource('password_unchanged', this.fmi_1);
    this.in3_1 = new StringResource('timezone', this.fmi_1);
    this.jn3_1 = new StringResource('users_settings_desc', this.fmi_1);
    this.kn3_1 = new StringResource('add', this.fmi_1);
    this.ln3_1 = new StringResource('refresh', this.fmi_1);
    this.mn3_1 = new StringResource('school', this.fmi_1);
    this.nn3_1 = new StringResource('add_a_new_school', this.fmi_1);
    this.on3_1 = new StringResource('edit_school', this.fmi_1);
    this.pn3_1 = new StringResource('join_existing_school', this.fmi_1);
    this.qn3_1 = new StringResource('schools', this.fmi_1);
    this.rn3_1 = new StringResource('assignments', this.fmi_1);
    this.sn3_1 = new StringResource('assignment', this.fmi_1);
    this.tn3_1 = new StringResource('none_key', this.fmi_1);
    this.un3_1 = new StringResource('instructions_for_students', this.fmi_1);
    this.vn3_1 = new StringResource('not_started', this.fmi_1);
    this.wn3_1 = new StringResource('percentage_complete', this.fmi_1);
    this.xn3_1 = new StringResource('percentage_score', this.fmi_1);
    this.yn3_1 = new StringResource('started_date', this.fmi_1);
    this.zn3_1 = new StringResource('started', this.fmi_1);
    this.an4_1 = new StringResource('mixed', this.fmi_1);
    this.bn4_1 = new StringResource('store_title', this.fmi_1);
    this.cn4_1 = new StringResource('store_description_short', this.fmi_1);
    this.dn4_1 = new StringResource('store_description_full', this.fmi_1);
    this.en4_1 = new StringResource('due_date', this.fmi_1);
    this.fn4_1 = new StringResource('content', this.fmi_1);
    this.gn4_1 = new StringResource('add_new_content', this.fmi_1);
    this.hn4_1 = new StringResource('add_content', this.fmi_1);
    this.in4_1 = new StringResource('student_progress', this.fmi_1);
    this.jn4_1 = new StringResource('status', this.fmi_1);
    this.kn4_1 = new StringResource('use_device_language', this.fmi_1);
    this.ln4_1 = new StringResource('select_item', this.fmi_1);
    this.mn4_1 = new StringResource('from_to_date', this.fmi_1);
    this.nn4_1 = new StringResource('num_items_with_name', this.fmi_1);
    this.on4_1 = new StringResource('num_items_with_name_with_comma', this.fmi_1);
    this.pn4_1 = new StringResource('add_to', this.fmi_1);
    this.qn4_1 = new StringResource('remove_from', this.fmi_1);
    this.rn4_1 = new StringResource('change_photo', this.fmi_1);
    this.sn4_1 = new StringResource('remove_picture', this.fmi_1);
    this.tn4_1 = new StringResource('take_new_photo_from_camera', this.fmi_1);
    this.un4_1 = new StringResource('select_picture_from_gallery', this.fmi_1);
    this.vn4_1 = new StringResource('select_file', this.fmi_1);
    this.wn4_1 = new StringResource('permission_clazz_assignment_view', this.fmi_1);
    this.xn4_1 = new StringResource('permission_clazz_asignment_edit', this.fmi_1);
    this.yn4_1 = new StringResource('overview', this.fmi_1);
    this.zn4_1 = new StringResource('add_new', this.fmi_1);
    this.an5_1 = new StringResource('staff', this.fmi_1);
    this.bn5_1 = new StringResource('x_teachers_y_students', this.fmi_1);
    this.cn5_1 = new StringResource('call', this.fmi_1);
    this.dn5_1 = new StringResource('organization_id', this.fmi_1);
    this.en5_1 = new StringResource('student', this.fmi_1);
    this.fn5_1 = new StringResource('contact_details', this.fmi_1);
    this.gn5_1 = new StringResource('untitled', this.fmi_1);
    this.hn5_1 = new StringResource('present_late_absent', this.fmi_1);
    this.in5_1 = new StringResource('marked_cap', this.fmi_1);
    this.jn5_1 = new StringResource('submitted_cap', this.fmi_1);
    this.kn5_1 = new StringResource('not_submitted_cap', this.fmi_1);
    this.ln5_1 = new StringResource('submitliteral', this.fmi_1);
    this.mn5_1 = new StringResource('x_percent_attended', this.fmi_1);
    this.nn5_1 = new StringResource('answer', this.fmi_1);
    this.on5_1 = new StringResource('of_content', this.fmi_1);
    this.pn5_1 = new StringResource('nothing_here', this.fmi_1);
    this.qn5_1 = new StringResource('not_answered', this.fmi_1);
    this.rn5_1 = new StringResource('clazz_work', this.fmi_1);
    this.sn5_1 = new StringResource('add_a_new_clazzwork', this.fmi_1);
    this.tn5_1 = new StringResource('edit_clazzwork', this.fmi_1);
    this.un5_1 = new StringResource('clazz_assignment', this.fmi_1);
    this.vn5_1 = new StringResource('new_assignment', this.fmi_1);
    this.wn5_1 = new StringResource('edit_assignment', this.fmi_1);
    this.xn5_1 = new StringResource('total_score', this.fmi_1);
    this.yn5_1 = new StringResource('late_submission', this.fmi_1);
    this.zn5_1 = new StringResource('mark_penalty', this.fmi_1);
    this.an6_1 = new StringResource('late_submission_penalty', this.fmi_1);
    this.bn6_1 = new StringResource('end_of_grace_period', this.fmi_1);
    this.cn6_1 = new StringResource('allow_class_comments', this.fmi_1);
    this.dn6_1 = new StringResource('after_deadline_date_error', this.fmi_1);
    this.en6_1 = new StringResource('points', this.fmi_1);
    this.fn6_1 = new StringResource('minimum_score', this.fmi_1);
    this.gn6_1 = new StringResource('automatic', this.fmi_1);
    this.hn6_1 = new StringResource('student_marks_content', this.fmi_1);
    this.in6_1 = new StringResource('completion_criteria', this.fmi_1);
    this.jn6_1 = new StringResource('mark_complete', this.fmi_1);
    this.kn6_1 = new StringResource('late_penalty', this.fmi_1);
    this.ln6_1 = new StringResource('marked_key', this.fmi_1);
    this.mn6_1 = new StringResource('submitted_key', this.fmi_1);
    this.nn6_1 = new StringResource('not_submitted', this.fmi_1);
    this.on6_1 = new StringResource('visible_from_date', this.fmi_1);
    this.pn6_1 = new StringResource('submission_type', this.fmi_1);
    this.qn6_1 = new StringResource('no_submission_required', this.fmi_1);
    this.rn6_1 = new StringResource('short_text', this.fmi_1);
    this.sn6_1 = new StringResource('attachment', this.fmi_1);
    this.tn6_1 = new StringResource('quiz', this.fmi_1);
    this.un6_1 = new StringResource('allow_private_comments_from_students', this.fmi_1);
    this.vn6_1 = new StringResource('deadline', this.fmi_1);
    this.wn6_1 = new StringResource('class_timezone', this.fmi_1);
    this.xn6_1 = new StringResource('maximum_score', this.fmi_1);
    this.yn6_1 = new StringResource('quiz_questions', this.fmi_1);
    this.zn6_1 = new StringResource('time', this.fmi_1);
    this.an7_1 = new StringResource('submission', this.fmi_1);
    this.bn7_1 = new StringResource('public_comments', this.fmi_1);
    this.cn7_1 = new StringResource('private_comments', this.fmi_1);
    this.dn7_1 = new StringResource('submit_your_answer', this.fmi_1);
    this.en7_1 = new StringResource('add_class_comment', this.fmi_1);
    this.fn7_1 = new StringResource('add_private_comment', this.fmi_1);
    this.gn7_1 = new StringResource('class_comments', this.fmi_1);
    this.hn7_1 = new StringResource('submit', this.fmi_1);
    this.in7_1 = new StringResource('three_num_items_with_name_with_comma', this.fmi_1);
    this.jn7_1 = new StringResource('marking', this.fmi_1);
    this.kn7_1 = new StringResource('return_and_mark_next', this.fmi_1);
    this.ln7_1 = new StringResource('return_only', this.fmi_1);
    this.mn7_1 = new StringResource('workspace', this.fmi_1);
    this.nn7_1 = new StringResource('organisation', this.fmi_1);
    this.on7_1 = new StringResource('use_public_library_site', this.fmi_1);
    this.pn7_1 = new StringResource('create_site', this.fmi_1);
    this.qn7_1 = new StringResource('connect_as_guest', this.fmi_1);
    this.rn7_1 = new StringResource('create_account', this.fmi_1);
    this.sn7_1 = new StringResource('my', this.fmi_1);
    this.tn7_1 = new StringResource('add_another', this.fmi_1);
    this.un7_1 = new StringResource('logged_in_as', this.fmi_1);
    this.vn7_1 = new StringResource('person_exists', this.fmi_1);
    this.wn7_1 = new StringResource('username_too_short', this.fmi_1);
    this.xn7_1 = new StringResource('username_too_long', this.fmi_1);
    this.yn7_1 = new StringResource('username_starts_with_number', this.fmi_1);
    this.zn7_1 = new StringResource('invalid_username', this.fmi_1);
    this.an8_1 = new StringResource('incorrect_current_password', this.fmi_1);
    this.bn8_1 = new StringResource('sel_question_type_free_text', this.fmi_1);
    this.cn8_1 = new StringResource('sel_question_type_multiple_choice', this.fmi_1);
    this.dn8_1 = new StringResource('question_text', this.fmi_1);
    this.en8_1 = new StringResource('question_type', this.fmi_1);
    this.fn8_1 = new StringResource('add_option', this.fmi_1);
    this.gn8_1 = new StringResource('roles_and_permissions', this.fmi_1);
    this.hn8_1 = new StringResource('add_role_permission', this.fmi_1);
    this.in8_1 = new StringResource('scope', this.fmi_1);
    this.jn8_1 = new StringResource('scope_description', this.fmi_1);
    this.kn8_1 = new StringResource('role_description', this.fmi_1);
    this.ln8_1 = new StringResource('assign_role', this.fmi_1);
    this.mn8_1 = new StringResource('more_information', this.fmi_1);
    this.nn8_1 = new StringResource('pending_requests', this.fmi_1);
    this.on8_1 = new StringResource('pending', this.fmi_1);
    this.pn8_1 = new StringResource('please_wait_for_approval', this.fmi_1);
    this.qn8_1 = new StringResource('reject', this.fmi_1);
    this.rn8_1 = new StringResource('ask_your_teacher_for_code', this.fmi_1);
    this.sn8_1 = new StringResource('copied_to_clipboard', this.fmi_1);
    this.tn8_1 = new StringResource('invite_link_desc', this.fmi_1);
    this.un8_1 = new StringResource('copy_link', this.fmi_1);
    this.vn8_1 = new StringResource('copy_code', this.fmi_1);
    this.wn8_1 = new StringResource('share_link', this.fmi_1);
    this.xn8_1 = new StringResource('invite_with_link', this.fmi_1);
    this.yn8_1 = new StringResource('role_not_selected_error', this.fmi_1);
    this.zn8_1 = new StringResource('permission_person_delegate', this.fmi_1);
    this.an9_1 = new StringResource('this_field_is_mandatory', this.fmi_1);
    this.bn9_1 = new StringResource('permission_role_select', this.fmi_1);
    this.cn9_1 = new StringResource('permission_role_insert', this.fmi_1);
    this.dn9_1 = new StringResource('permission_school_select', this.fmi_1);
    this.en9_1 = new StringResource('permission_school_insert', this.fmi_1);
    this.fn9_1 = new StringResource('permission_school_update', this.fmi_1);
    this.gn9_1 = new StringResource('add_student_to_school', this.fmi_1);
    this.hn9_1 = new StringResource('add_staff_to_school', this.fmi_1);
    this.in9_1 = new StringResource('permission_password_reset', this.fmi_1);
    this.jn9_1 = new StringResource('school_code', this.fmi_1);
    this.kn9_1 = new StringResource('invite_code', this.fmi_1);
    this.ln9_1 = new StringResource('entity_code', this.fmi_1);
    this.mn9_1 = new StringResource('join_code_instructions', this.fmi_1);
    this.nn9_1 = new StringResource('record_for_student', this.fmi_1);
    this.on9_1 = new StringResource('moved_x_entries', this.fmi_1);
    this.pn9_1 = new StringResource('end_is_before_start_error', this.fmi_1);
    this.qn9_1 = new StringResource('record_attendance_for_most_recent_occurrence', this.fmi_1);
    this.rn9_1 = new StringResource('add_a_new_occurrence', this.fmi_1);
    this.sn9_1 = new StringResource('active_classes', this.fmi_1);
    this.tn9_1 = new StringResource('terms_and_policies', this.fmi_1);
    this.un9_1 = new StringResource('manage_site_settings', this.fmi_1);
    this.vn9_1 = new StringResource('guest_login_enabled', this.fmi_1);
    this.wn9_1 = new StringResource('registration_allowed', this.fmi_1);
    this.xn9_1 = new StringResource('yes', this.fmi_1);
    this.yn9_1 = new StringResource('no', this.fmi_1);
    this.zn9_1 = new StringResource('edit_site', this.fmi_1);
    this.ana_1 = new StringResource('site', this.fmi_1);
    this.bna_1 = new StringResource('site_link', this.fmi_1);
    this.cna_1 = new StringResource('please_enter_the_linK', this.fmi_1);
    this.dna_1 = new StringResource('or', this.fmi_1);
    this.ena_1 = new StringResource('connect', this.fmi_1);
    this.fna_1 = new StringResource('terms_and_policies_text', this.fmi_1);
    this.gna_1 = new StringResource('edit_terms_and_policies', this.fmi_1);
    this.hna_1 = new StringResource('strings_not_allowed', this.fmi_1);
    this.ina_1 = new StringResource('undo', this.fmi_1);
    this.jna_1 = new StringResource('video', this.fmi_1);
    this.kna_1 = new StringResource('content_editor_create_new_category', this.fmi_1);
    this.lna_1 = new StringResource('content_pieces_completed', this.fmi_1);
    this.mna_1 = new StringResource('content_usage_duration', this.fmi_1);
    this.nna_1 = new StringResource('manage_download', this.fmi_1);
    this.ona_1 = new StringResource('powered_by', this.fmi_1);
    this.pna_1 = new StringResource('invalid_email', this.fmi_1);
    this.qna_1 = new StringResource('select_account', this.fmi_1);
    this.rna_1 = new StringResource('opening_link', this.fmi_1);
    this.sna_1 = new StringResource('select_account_to_continue', this.fmi_1);
    this.tna_1 = new StringResource('you_are_already_in_class', this.fmi_1);
    this.una_1 = new StringResource('you_are_already_in_school', this.fmi_1);
    this.vna_1 = new StringResource('join_class', this.fmi_1);
    this.wna_1 = new StringResource('join_school', this.fmi_1);
    this.xna_1 = new StringResource('what_is_your_date_of_birth', this.fmi_1);
    this.yna_1 = new StringResource('parents_email_address', this.fmi_1);
    this.zna_1 = new StringResource('we_sent_a_message_to_your_parent', this.fmi_1);
    this.anb_1 = new StringResource('toggle_visibility', this.fmi_1);
    this.bnb_1 = new StringResource('parental_consent', this.fmi_1);
    this.cnb_1 = new StringResource('parent_child_register_message_subject', this.fmi_1);
    this.dnb_1 = new StringResource('parent_child_register_message', this.fmi_1);
    this.enb_1 = new StringResource('parent_consent_explanation', this.fmi_1);
    this.fnb_1 = new StringResource('relationship', this.fmi_1);
    this.gnb_1 = new StringResource('i_consent', this.fmi_1);
    this.hnb_1 = new StringResource('i_do_not_consent', this.fmi_1);
    this.inb_1 = new StringResource('revoke_consent', this.fmi_1);
    this.jnb_1 = new StringResource('restore_consent', this.fmi_1);
    this.knb_1 = new StringResource('status_consent_granted', this.fmi_1);
    this.lnb_1 = new StringResource('status_consent_denied', this.fmi_1);
    this.mnb_1 = new StringResource('other_legal_guardian', this.fmi_1);
    this.nnb_1 = new StringResource('manage_parental_consent', this.fmi_1);
    this.onb_1 = new StringResource('view_class_content', this.fmi_1);
    this.pnb_1 = new StringResource('edit_class_content', this.fmi_1);
    this.qnb_1 = new StringResource('view_class_learning_records', this.fmi_1);
    this.rnb_1 = new StringResource('view_contact_details_of_members', this.fmi_1);
    this.snb_1 = new StringResource('edit_contact_details_of_members', this.fmi_1);
    this.tnb_1 = new StringResource('view_socioeconomic_details_of_members', this.fmi_1);
    this.unb_1 = new StringResource('edit_socioeconomic_details_of_members', this.fmi_1);
    this.vnb_1 = new StringResource('add_person_or_group', this.fmi_1);
    this.wnb_1 = new StringResource('lets_get_started', this.fmi_1);
    this.xnb_1 = new StringResource('looks_like_installed_app_from_link', this.fmi_1);
    this.ynb_1 = new StringResource('continue_using_link_recommended', this.fmi_1);
    this.znb_1 = new StringResource('continue_using_the_link', this.fmi_1);
    this.anc_1 = new StringResource('start_from_scratch', this.fmi_1);
    this.bnc_1 = new StringResource('ignore_the_link', this.fmi_1);
    this.cnc_1 = new StringResource('add_permission_for_a_person', this.fmi_1);
    this.dnc_1 = new StringResource('add_permission_for_a_group', this.fmi_1);
    this.enc_1 = new StringResource('add_using_link', this.fmi_1);
    this.fnc_1 = new StringResource('add_using_a_web_link_then', this.fmi_1);
    this.gnc_1 = new StringResource('add_from_gallery', this.fmi_1);
    this.hnc_1 = new StringResource('add_video_or_audio_from_the_device_gallery', this.fmi_1);
    this.inc_1 = new StringResource('add_file', this.fmi_1);
    this.jnc_1 = new StringResource('add_folder', this.fmi_1);
    this.knc_1 = new StringResource('importing', this.fmi_1);
    this.lnc_1 = new StringResource('downloading_content', this.fmi_1);
    this.mnc_1 = new StringResource('deleting_content', this.fmi_1);
    this.nnc_1 = new StringResource('add_folder_description', this.fmi_1);
    this.onc_1 = new StringResource('add_educational_content_using_supported_formats_eg_pdf_xapi_h5p', this.fmi_1);
    this.pnc_1 = new StringResource('current_status_consent_granted', this.fmi_1);
    this.qnc_1 = new StringResource('select_country', this.fmi_1);
    this.rnc_1 = new StringResource('enter_link', this.fmi_1);
    this.snc_1 = new StringResource('add_subject', this.fmi_1);
    this.tnc_1 = new StringResource('share_via', this.fmi_1);
    this.unc_1 = new StringResource('share_apk_file', this.fmi_1);
    this.vnc_1 = new StringResource('recommended_for_advanced_users', this.fmi_1);
    this.wnc_1 = new StringResource('nearby_share', this.fmi_1);
    this.xnc_1 = new StringResource('recommended_for_offline_installation', this.fmi_1);
    this.ync_1 = new StringResource('app_store_link', this.fmi_1);
    this.znc_1 = new StringResource('everything_works_offline', this.fmi_1);
    this.and_1 = new StringResource('swipe_to_next', this.fmi_1);
    this.bnd_1 = new StringResource('content_entries_completed', this.fmi_1);
    this.cnd_1 = new StringResource('content_usage_time', this.fmi_1);
    this.dnd_1 = new StringResource('all_permissions', this.fmi_1);
    this.end_1 = new StringResource('folder', this.fmi_1);
    this.fnd_1 = new StringResource('create_a_new_learning_env', this.fmi_1);
    this.gnd_1 = new StringResource('add_educational_content_to_new_learning_env', this.fmi_1);
    this.hnd_1 = new StringResource('connect_to_an_existing_learning_environment', this.fmi_1);
    this.ind_1 = new StringResource('does_your_class_already_have_learning_env', this.fmi_1);
    this.jnd_1 = new StringResource('use_the_public_lib_env', this.fmi_1);
    this.knd_1 = new StringResource('just_want_to_browse', this.fmi_1);
    this.lnd_1 = new StringResource('revoking_consent_will', this.fmi_1);
    this.mnd_1 = new StringResource('you_must_comply_with_license', this.fmi_1);
    this.nnd_1 = new StringResource('you_can_copypaste_a_link', this.fmi_1);
    this.ond_1 = new StringResource('see_supported_sites', this.fmi_1);
    this.pnd_1 = new StringResource('class_setup', this.fmi_1);
    this.qnd_1 = new StringResource('anyone_with_this_can_join_school', this.fmi_1);
    this.rnd_1 = new StringResource('this_class', this.fmi_1);
    this.snd_1 = new StringResource('from_my_classes', this.fmi_1);
    this.tnd_1 = new StringResource('my_content', this.fmi_1);
    this.und_1 = new StringResource('learning_environment', this.fmi_1);
    this.vnd_1 = new StringResource('grades_class_age', this.fmi_1);
    this.wnd_1 = new StringResource('add_remove_and_modify_grades', this.fmi_1);
    this.xnd_1 = new StringResource('subjects', this.fmi_1);
    this.ynd_1 = new StringResource('add_remove_and_modify_subjects', this.fmi_1);
    this.znd_1 = new StringResource('create_my_account', this.fmi_1);
    this.ane_1 = new StringResource('recommend_it', this.fmi_1);
    this.bne_1 = new StringResource('edit_permissions', this.fmi_1);
    this.cne_1 = new StringResource('add_from_contacts', this.fmi_1);
    this.dne_1 = new StringResource('almost_done', this.fmi_1);
    this.ene_1 = new StringResource('your_username', this.fmi_1);
    this.fne_1 = new StringResource('select_content', this.fmi_1);
    this.gne_1 = new StringResource('search_in', this.fmi_1);
    this.hne_1 = new StringResource('type', this.fmi_1);
    this.ine_1 = new StringResource('please_download_the_app', this.fmi_1);
    this.jne_1 = new StringResource('alternatively_you_can_download_the_apk', this.fmi_1);
    this.kne_1 = new StringResource('full_i_can_download_as_much_as_i_like', this.fmi_1);
    this.lne_1 = new StringResource('limited_i_avoid_downloading_too_much', this.fmi_1);
    this.mne_1 = new StringResource('oops', this.fmi_1);
    this.nne_1 = new StringResource('sorry_something_went_wrong', this.fmi_1);
    this.one_1 = new StringResource('incident_id', this.fmi_1);
    this.pne_1 = new StringResource('error_code', this.fmi_1);
    this.qne_1 = new StringResource('take_me_home', this.fmi_1);
    this.rne_1 = new StringResource('view_clazz', this.fmi_1);
    this.sne_1 = new StringResource('view_clazzes', this.fmi_1);
    this.tne_1 = new StringResource('enrol_and_unenrol_students', this.fmi_1);
    this.une_1 = new StringResource('enrol_and_unenrol_teachers', this.fmi_1);
    this.vne_1 = new StringResource('view_assignments', this.fmi_1);
    this.wne_1 = new StringResource('add_or_edit_assignment', this.fmi_1);
    this.xne_1 = new StringResource('view_basic_profile_of_members', this.fmi_1);
    this.yne_1 = new StringResource('edit_basic_profile_of_members', this.fmi_1);
    this.zne_1 = new StringResource('view_school', this.fmi_1);
    this.anf_1 = new StringResource('edit_clazzes', this.fmi_1);
    this.bnf_1 = new StringResource('add_new_clazz_to_school', this.fmi_1);
    this.cnf_1 = new StringResource('added_to_class_content', this.fmi_1);
    this.dnf_1 = new StringResource('content_already_added_to_class', this.fmi_1);
    this.enf_1 = new StringResource('your_account_needs_approved', this.fmi_1);
    this.fnf_1 = new StringResource('adult_account_required', this.fmi_1);
    this.gnf_1 = new StringResource('blank_report', this.fmi_1);
    this.hnf_1 = new StringResource('attendance_over_time_by_class', this.fmi_1);
    this.inf_1 = new StringResource('percentage_of_students_attending_over_time', this.fmi_1);
    this.jnf_1 = new StringResource('content_completion', this.fmi_1);
    this.knf_1 = new StringResource('number_of_students_completed_time', this.fmi_1);
    this.lnf_1 = new StringResource('content_usage_by_class', this.fmi_1);
    this.mnf_1 = new StringResource('total_content_usage_duration_class', this.fmi_1);
    this.nnf_1 = new StringResource('content_usage_over_time', this.fmi_1);
    this.onf_1 = new StringResource('total_content_duration_gender', this.fmi_1);
    this.pnf_1 = new StringResource('unique_content_users_over_time', this.fmi_1);
    this.qnf_1 = new StringResource('number_of_active_users_over_time', this.fmi_1);
    this.rnf_1 = new StringResource('parent', this.fmi_1);
    this.snf_1 = new StringResource('upload', this.fmi_1);
    this.tnf_1 = new StringResource('selected_file_summary', this.fmi_1);
    this.unf_1 = new StringResource('drag_and_drop_or_click_to_add_file', this.fmi_1);
    this.vnf_1 = new StringResource('extra_active_tab_warning', this.fmi_1);
    this.wnf_1 = new StringResource('saved', this.fmi_1);
    this.xnf_1 = new StringResource('individual', this.fmi_1);
    this.ynf_1 = new StringResource('group', this.fmi_1);
    this.znf_1 = new StringResource('dont_show_before', this.fmi_1);
    this.ang_1 = new StringResource('group_submission', this.fmi_1);
    this.bng_1 = new StringResource('require_file_submission', this.fmi_1);
    this.cng_1 = new StringResource('require_text_submission', this.fmi_1);
    this.dng_1 = new StringResource('maximum', this.fmi_1);
    this.eng_1 = new StringResource('size_limit', this.fmi_1);
    this.fng_1 = new StringResource('size_limit_error', this.fmi_1);
    this.gng_1 = new StringResource('limit', this.fmi_1);
    this.hng_1 = new StringResource('number_of_files', this.fmi_1);
    this.ing_1 = new StringResource('edit_after_submission', this.fmi_1);
    this.jng_1 = new StringResource('allowed_till_deadline', this.fmi_1);
    this.kng_1 = new StringResource('allowed_till_grace', this.fmi_1);
    this.lng_1 = new StringResource('not_allowed', this.fmi_1);
    this.mng_1 = new StringResource('marked_by', this.fmi_1);
    this.nng_1 = new StringResource('peers', this.fmi_1);
    this.ong_1 = new StringResource('peers_to_review', this.fmi_1);
    this.png_1 = new StringResource('file_type', this.fmi_1);
    this.qng_1 = new StringResource('file_type_chosen', this.fmi_1);
    this.rng_1 = new StringResource('file_type_any', this.fmi_1);
    this.sng_1 = new StringResource('file_document', this.fmi_1);
    this.tng_1 = new StringResource('file_image', this.fmi_1);
    this.ung_1 = new StringResource('submit_grade', this.fmi_1);
    this.vng_1 = new StringResource('submit_grade_and_mark_next', this.fmi_1);
    this.wng_1 = new StringResource('graded', this.fmi_1);
    this.xng_1 = new StringResource('score_greater_than_zero', this.fmi_1);
    this.yng_1 = new StringResource('words', this.fmi_1);
    this.zng_1 = new StringResource('characters', this.fmi_1);
    this.anh_1 = new StringResource('class_timezone_set', this.fmi_1);
    this.bnh_1 = new StringResource('maximum_points', this.fmi_1);
    this.cnh_1 = new StringResource('penalty_label', this.fmi_1);
    this.dnh_1 = new StringResource('submissions', this.fmi_1);
    this.enh_1 = new StringResource('add_text', this.fmi_1);
    this.fnh_1 = new StringResource('course_blocks', this.fmi_1);
    this.gnh_1 = new StringResource('add_block', this.fmi_1);
    this.hnh_1 = new StringResource('edit_block', this.fmi_1);
    this.inh_1 = new StringResource('module', this.fmi_1);
    this.jnh_1 = new StringResource('course_module', this.fmi_1);
    this.knh_1 = new StringResource('formatted_text_to_show_to_course_participants', this.fmi_1);
    this.lnh_1 = new StringResource('add_course_block_content_desc', this.fmi_1);
    this.mnh_1 = new StringResource('add_assignment_block_content_desc', this.fmi_1);
    this.nnh_1 = new StringResource('discussion_board', this.fmi_1);
    this.onh_1 = new StringResource('add_discussion_board_desc', this.fmi_1);
    this.pnh_1 = new StringResource('new_module', this.fmi_1);
    this.qnh_1 = new StringResource('edit_module', this.fmi_1);
    this.rnh_1 = new StringResource('indent', this.fmi_1);
    this.snh_1 = new StringResource('unindent', this.fmi_1);
    this.tnh_1 = new StringResource('institution', this.fmi_1);
    this.unh_1 = new StringResource('student_enrolment_policy', this.fmi_1);
    this.vnh_1 = new StringResource('teacher_enrolment_policy', this.fmi_1);
    this.wnh_1 = new StringResource('open_enrolment', this.fmi_1);
    this.xnh_1 = new StringResource('enrolment_requests_must_be_approved', this.fmi_1);
    this.ynh_1 = new StringResource('accept_enrolment_requests_automatically', this.fmi_1);
    this.znh_1 = new StringResource('visibility', this.fmi_1);
    this.ani_1 = new StringResource('hidden_enrolment_via_links_code_or_invitation', this.fmi_1);
    this.bni_1 = new StringResource('visible_for_all', this.fmi_1);
    this.cni_1 = new StringResource('terminology', this.fmi_1);
    this.dni_1 = new StringResource('select_terminology', this.fmi_1);
    this.eni_1 = new StringResource('add_new_terminology', this.fmi_1);
    this.fni_1 = new StringResource('edit_terminology', this.fmi_1);
    this.gni_1 = new StringResource('your_words_for', this.fmi_1);
    this.hni_1 = new StringResource('course_setup', this.fmi_1);
    this.ini_1 = new StringResource('number_of_groups', this.fmi_1);
    this.jni_1 = new StringResource('assign_to_random_groups', this.fmi_1);
    this.kni_1 = new StringResource('add_new_groups', this.fmi_1);
    this.lni_1 = new StringResource('edit_groups', this.fmi_1);
    this.mni_1 = new StringResource('num_replies', this.fmi_1);
    this.nni_1 = new StringResource('topics', this.fmi_1);
    this.oni_1 = new StringResource('add_topic', this.fmi_1);
    this.pni_1 = new StringResource('add_a_reply', this.fmi_1);
    this.qni_1 = new StringResource('messages', this.fmi_1);
    this.rni_1 = new StringResource('message', this.fmi_1);
    this.sni_1 = new StringResource('library', this.fmi_1);
    this.tni_1 = new StringResource('courses', this.fmi_1);
    this.uni_1 = new StringResource('course', this.fmi_1);
    this.vni_1 = new StringResource('reports_and_analytics', this.fmi_1);
    this.wni_1 = new StringResource('course_comments', this.fmi_1);
    this.xni_1 = new StringResource('currently_enroled', this.fmi_1);
    this.yni_1 = new StringResource('past_enrolments', this.fmi_1);
    this.zni_1 = new StringResource('standard', this.fmi_1);
    this.anj_1 = new StringResource('group_number', this.fmi_1);
    this.bnj_1 = new StringResource('add_group', this.fmi_1);
    this.cnj_1 = new StringResource('edit_group', this.fmi_1);
    this.dnj_1 = new StringResource('new_group_set', this.fmi_1);
    this.enj_1 = new StringResource('edit_text', this.fmi_1);
    this.fnj_1 = new StringResource('add_module', this.fmi_1);
    this.gnj_1 = new StringResource('add_a_new_course', this.fmi_1);
    this.hnj_1 = new StringResource('join_existing_course', this.fmi_1);
    this.inj_1 = new StringResource('edit_course', this.fmi_1);
    this.jnj_1 = new StringResource('currently_enrolled', this.fmi_1);
    this.knj_1 = new StringResource('past_enrollments', this.fmi_1);
    this.lnj_1 = new StringResource('unread', this.fmi_1);
    this.mnj_1 = new StringResource('new_chat', this.fmi_1);
    this.nnj_1 = new StringResource('new_group', this.fmi_1);
    this.onj_1 = new StringResource('chat', this.fmi_1);
    this.pnj_1 = new StringResource('you', this.fmi_1);
    this.qnj_1 = new StringResource('edit_topic', this.fmi_1);
    this.rnj_1 = new StringResource('posts', this.fmi_1);
    this.snj_1 = new StringResource('post', this.fmi_1);
    this.tnj_1 = new StringResource('individual_submission', this.fmi_1);
    this.unj_1 = new StringResource('unassigned', this.fmi_1);
    this.vnj_1 = new StringResource('error_too_long_text', this.fmi_1);
    this.wnj_1 = new StringResource('managed_enrolment', this.fmi_1);
    this.xnj_1 = new StringResource('text_file_submission_error', this.fmi_1);
    this.ynj_1 = new StringResource('submit_all_at_once_submission_policy', this.fmi_1);
    this.znj_1 = new StringResource('multiple_submission_allowed_submission_policy', this.fmi_1);
    this.ank_1 = new StringResource('enrolment_policy', this.fmi_1);
    this.bnk_1 = new StringResource('submission_policy', this.fmi_1);
    this.cnk_1 = new StringResource('submission_already_made', this.fmi_1);
    this.dnk_1 = new StringResource('grade_out_of_range', this.fmi_1);
    this.enk_1 = new StringResource('update_grade', this.fmi_1);
    this.fnk_1 = new StringResource('update_grade_and_mark_next', this.fmi_1);
    this.gnk_1 = new StringResource('add_discussion', this.fmi_1);
    this.hnk_1 = new StringResource('edit_discussion', this.fmi_1);
    this.ink_1 = new StringResource('type_here', this.fmi_1);
    this.jnk_1 = new StringResource('deadline_has_passed', this.fmi_1);
    this.knk_1 = new StringResource('already_submitted', this.fmi_1);
    this.lnk_1 = new StringResource('exceeds_word_limit', this.fmi_1);
    this.mnk_1 = new StringResource('exceeds_char_limit', this.fmi_1);
    this.nnk_1 = new StringResource('unassigned_error', this.fmi_1);
    this.onk_1 = new StringResource('enabled', this.fmi_1);
    this.pnk_1 = new StringResource('disabled', this.fmi_1);
    this.qnk_1 = new StringResource('from_my_courses', this.fmi_1);
    this.rnk_1 = new StringResource('assign_reviewers', this.fmi_1);
    this.snk_1 = new StringResource('reviews_per_user_group', this.fmi_1);
    this.tnk_1 = new StringResource('assign_random_reviewers', this.fmi_1);
    this.unk_1 = new StringResource('reviewer', this.fmi_1);
    this.vnk_1 = new StringResource('app_language', this.fmi_1);
    this.wnk_1 = new StringResource('pdf', this.fmi_1);
    this.xnk_1 = new StringResource('panic_button_app', this.fmi_1);
    this.ynk_1 = new StringResource('actions_to_be_taken_in_case_of_emergency', this.fmi_1);
    this.znk_1 = new StringResource('exit_app', this.fmi_1);
    this.anl_1 = new StringResource('delete_app_data_from_device', this.fmi_1);
    this.bnl_1 = new StringResource('more_options', this.fmi_1);
    this.cnl_1 = new StringResource('num_holidays', this.fmi_1);
    this.dnl_1 = new StringResource('hide_app', this.fmi_1);
    this.enl_1 = new StringResource('panic_button_explanation', this.fmi_1);
    this.fnl_1 = new StringResource('hide_app_explanation', this.fmi_1);
    this.gnl_1 = new StringResource('most_recent', this.fmi_1);
    this.hnl_1 = new StringResource('comment', this.fmi_1);
    this.inl_1 = new StringResource('grant_app_permission', this.fmi_1);
    this.jnl_1 = new StringResource('this_app_will_receive', this.fmi_1);
    this.knl_1 = new StringResource('my_profile', this.fmi_1);
    this.lnl_1 = new StringResource('add_another_account', this.fmi_1);
    this.mnl_1 = new StringResource('end_is_before_start', this.fmi_1);
    this.nnl_1 = new StringResource('select_person', this.fmi_1);
    this.onl_1 = new StringResource('your_submission', this.fmi_1);
    this.pnl_1 = new StringResource('edit_content', this.fmi_1);
    this.qnl_1 = new StringResource('edit_folder', this.fmi_1);
    this.rnl_1 = new StringResource('add_new_post', this.fmi_1);
    this.snl_1 = new StringResource('grades_scoring', this.fmi_1);
    this.tnl_1 = new StringResource('mark_comment', this.fmi_1);
    this.unl_1 = new StringResource('mark', this.fmi_1);
    this.vnl_1 = new StringResource('too_high', this.fmi_1);
    this.wnl_1 = new StringResource('required', this.fmi_1);
    this.xnl_1 = new StringResource('expand', this.fmi_1);
    this.ynl_1 = new StringResource('collapse', this.fmi_1);
    this.znl_1 = new StringResource('remove', this.fmi_1);
    this.anm_1 = new StringResource('table_of_contents', this.fmi_1);
    this.bnm_1 = new StringResource('select_date', this.fmi_1);
    this.cnm_1 = new StringResource('link', this.fmi_1);
    this.dnm_1 = new StringResource('time_submitted', this.fmi_1);
    this.enm_1 = new StringResource('group_assignment', this.fmi_1);
    this.fnm_1 = new StringResource('menu', this.fmi_1);
    this.gnm_1 = new StringResource('restarting', this.fmi_1);
    this.hnm_1 = new StringResource('terms_required_if_registration_enabled', this.fmi_1);
    this.inm_1 = new StringResource('drop_files_to_import', this.fmi_1);
    this.jnm_1 = new StringResource('compose_post', this.fmi_1);
    this.knm_1 = new StringResource('password_updated', this.fmi_1);
    this.lnm_1 = new StringResource('html5_content_display_engine', this.fmi_1);
    this.mnm_1 = new StringResource('chrome_recommended', this.fmi_1);
    this.nnm_1 = new StringResource('chrome_recommended_info', this.fmi_1);
    this.onm_1 = new StringResource('internal_webview', this.fmi_1);
    this.pnm_1 = new StringResource('internal_webview_info', this.fmi_1);
    this.qnm_1 = new StringResource('content_not_ready_try_later', this.fmi_1);
    this.rnm_1 = new StringResource('version', this.fmi_1);
    this.snm_1 = new StringResource('licenses', this.fmi_1);
    this.tnm_1 = new StringResource('cannot_record_attendance_for_future_date_time', this.fmi_1);
    this.unm_1 = new StringResource('could_not_load_vlc', this.fmi_1);
    this.vnm_1 = new StringResource('selected', this.fmi_1);
    this.wnm_1 = new StringResource('clear_selection', this.fmi_1);
    this.xnm_1 = new StringResource('move_entries_to_this_folder', this.fmi_1);
    this.ynm_1 = new StringResource('cannot_move_to_subfolder_of_self', this.fmi_1);
    this.znm_1 = new StringResource('cannot_move_already_in_same_folder', this.fmi_1);
    this.ann_1 = new StringResource('move_to', this.fmi_1);
    this.bnn_1 = new StringResource('restore', this.fmi_1);
    this.cnn_1 = new StringResource('delete_permanently', this.fmi_1);
    this.dnn_1 = new StringResource('deleted_items', this.fmi_1);
    this.enn_1 = new StringResource('delete_or_restore_items', this.fmi_1);
    this.fnn_1 = new StringResource('yesterday', this.fmi_1);
    this.gnn_1 = new StringResource('request_to_enrol_already_pending', this.fmi_1);
    this.hnn_1 = new StringResource('request_submitted', this.fmi_1);
    this.inn_1 = new StringResource('canceled_enrolment_request', this.fmi_1);
    this.jnn_1 = new StringResource('enroled_into_name', this.fmi_1);
    this.knn_1 = new StringResource('declined_request_from_name', this.fmi_1);
    this.lnn_1 = new StringResource('view_course', this.fmi_1);
    this.mnn_1 = new StringResource('moderate', this.fmi_1);
    this.nnn_1 = new StringResource('manage_student_enrolments', this.fmi_1);
    this.onn_1 = new StringResource('manage_teacher_enrolments', this.fmi_1);
    this.pnn_1 = new StringResource('view_learning_records', this.fmi_1);
    this.qnn_1 = new StringResource('edit_learning_records', this.fmi_1);
    this.rnn_1 = new StringResource('view_members', this.fmi_1);
    this.snn_1 = new StringResource('copy_invite_code', this.fmi_1);
    this.tnn_1 = new StringResource('direct_enrol_users_onto_courses', this.fmi_1);
    this.unn_1 = new StringResource('could_not_restart', this.fmi_1);
    this.vnn_1 = new StringResource('close_now', this.fmi_1);
    this.wnn_1 = new StringResource('view_all_courses', this.fmi_1);
    this.xnn_1 = new StringResource('edit_all_courses', this.fmi_1);
    this.ynn_1 = new StringResource('moderate_all_courses', this.fmi_1);
    this.znn_1 = new StringResource('manage_student_enrolments_for_all_courses', this.fmi_1);
    this.ano_1 = new StringResource('manage_teacher_enrolments_for_all_courses', this.fmi_1);
    this.bno_1 = new StringResource('view_attendance_records_for_all_courses', this.fmi_1);
    this.cno_1 = new StringResource('edit_attendance_records_for_all_courses', this.fmi_1);
    this.dno_1 = new StringResource('add_new_users', this.fmi_1);
    this.eno_1 = new StringResource('view_all_users', this.fmi_1);
    this.fno_1 = new StringResource('edit_all_users', this.fmi_1);
    this.gno_1 = new StringResource('view_learning_records_for_all_courses', this.fmi_1);
    this.hno_1 = new StringResource('edit_learning_records_for_all_courses', this.fmi_1);
    this.ino_1 = new StringResource('add_new_courses', this.fmi_1);
    this.jno_1 = new StringResource('manage_user_permissions', this.fmi_1);
    this.kno_1 = new StringResource('reset_passwords', this.fmi_1);
    this.lno_1 = new StringResource('upload_failed', this.fmi_1);
    this.mno_1 = new StringResource('opening_name', this.fmi_1);
    this.nno_1 = new StringResource('invalid_invite_code', this.fmi_1);
    this.ono_1 = new StringResource('bulk_import', this.fmi_1);
    this.pno_1 = new StringResource('import_key', this.fmi_1);
    this.qno_1 = new StringResource('imported', this.fmi_1);
    this.rno_1 = new StringResource('you_can_import_users_using_a_csv_file', this.fmi_1);
    this.sno_1 = new StringResource('get_template', this.fmi_1);
    this.tno_1 = new StringResource('line_number', this.fmi_1);
    this.uno_1 = new StringResource('selected_content', this.fmi_1);
    this.vno_1 = new StringResource('edit_content_block', this.fmi_1);
    this.wno_1 = new StringResource('compression', this.fmi_1);
    this.xno_1 = new StringResource('compression_highest', this.fmi_1);
    this.yno_1 = new StringResource('compression_high', this.fmi_1);
    this.zno_1 = new StringResource('compression_medium', this.fmi_1);
    this.anp_1 = new StringResource('compression_low', this.fmi_1);
    this.bnp_1 = new StringResource('compression_lowest', this.fmi_1);
    this.cnp_1 = new StringResource('compression_none', this.fmi_1);
    this.dnp_1 = new StringResource('size_compressed_was', this.fmi_1);
    this.enp_1 = new StringResource('size', this.fmi_1);
    this.fnp_1 = new StringResource('import_error', this.fmi_1);
    this.gnp_1 = new StringResource('upload_error', this.fmi_1);
    this.hnp_1 = new StringResource('offline_items_storage', this.fmi_1);
    this.inp_1 = new StringResource('space_available', this.fmi_1);
    this.jnp_1 = new StringResource('grant_permission', this.fmi_1);
    this.knp_1 = new StringResource('gradebook', this.fmi_1);
    this.lnp_1 = new StringResource('full_screen', this.fmi_1);
    this.mnp_1 = new StringResource('exit_full_screen', this.fmi_1);
    this.nnp_1 = new StringResource('increase_text_size', this.fmi_1);
    this.onp_1 = new StringResource('decrease_text_size', this.fmi_1);
    this.pnp_1 = new StringResource('nothing_here_yet', this.fmi_1);
    this.qnp_1 = new StringResource('signup_with_passkey', this.fmi_1);
    this.rnp_1 = new StringResource('other_options', this.fmi_1);
    this.snp_1 = new StringResource('i_am_teacher', this.fmi_1);
    this.tnp_1 = new StringResource('i_am_parent', this.fmi_1);
    this.unp_1 = new StringResource('select_picture_from_files', this.fmi_1);
    this.vnp_1 = new StringResource('your_date_of_birth', this.fmi_1);
    this.wnp_1 = new StringResource('add_child_profiles', this.fmi_1);
    this.xnp_1 = new StringResource('child_profile', this.fmi_1);
    this.ynp_1 = new StringResource('finish', this.fmi_1);
    this.znp_1 = new StringResource('scan_badge_qr_code', this.fmi_1);
    this.anq_1 = new StringResource('new_user', this.fmi_1);
    this.bnq_1 = new StringResource('existing_user', this.fmi_1);
    this.cnq_1 = new StringResource('personal_account', this.fmi_1);
    this.dnq_1 = new StringResource('signup', this.fmi_1);
    this.enq_1 = new StringResource('access_educational_content_download_offline', this.fmi_1);
    this.fnq_1 = new StringResource('join_learning_space', this.fmi_1);
    this.gnq_1 = new StringResource('learning_space', this.fmi_1);
    this.hnq_1 = new StringResource('eg_for_your_school_organization', this.fmi_1);
    this.inq_1 = new StringResource('new_learning_space', this.fmi_1);
    this.jnq_1 = new StringResource('full_name', this.fmi_1);
    this.knq_1 = new StringResource('which_profile_do_you_want_to_start', this.fmi_1);
    this.lnq_1 = new StringResource('create_passkey_for_faster_and_easier_signin', this.fmi_1);
    this.mnq_1 = new StringResource('create_username_and_password', this.fmi_1);
    this.nnq_1 = new StringResource('create_local_account', this.fmi_1);
    this.onq_1 = new StringResource('with_passkeys_no_complex_passwords_needed', this.fmi_1);
    this.pnq_1 = new StringResource('enter_link_manually', this.fmi_1);
    this.qnq_1 = new StringResource('registration_not_allowed', this.fmi_1);
    this.rnq_1 = new StringResource('add_subtitles', this.fmi_1);
    this.snq_1 = new StringResource('edit_subtitles', this.fmi_1);
    this.tnq_1 = new StringResource('subtitles', this.fmi_1);
    this.unq_1 = new StringResource('progress_key', this.fmi_1);
    this.vnq_1 = new StringResource('response', this.fmi_1);
    this.wnq_1 = new StringResource('true_key', this.fmi_1);
    this.xnq_1 = new StringResource('false_key', this.fmi_1);
    this.ynq_1 = new StringResource('copy', this.fmi_1);
    this.znq_1 = new StringResource('copy_course', this.fmi_1);
    this.anr_1 = new StringResource('copy_of', this.fmi_1);
    this.bnr_1 = new StringResource('invite_via_contact', this.fmi_1);
    this.cnr_1 = new StringResource('invite_to_course', this.fmi_1);
    this.dnr_1 = new StringResource('use_email', this.fmi_1);
    this.enr_1 = new StringResource('use_phone_number', this.fmi_1);
    this.fnr_1 = new StringResource('add_username_email_phone', this.fmi_1);
    this.gnr_1 = new StringResource('no_valid_contact_found', this.fmi_1);
    this.hnr_1 = new StringResource('no_contact_found', this.fmi_1);
    this.inr_1 = new StringResource('decline', this.fmi_1);
    this.jnr_1 = new StringResource('do_you_want_to_join_this_course', this.fmi_1);
    this.knr_1 = new StringResource('invite_has_been_used', this.fmi_1);
    this.lnr_1 = new StringResource('pending_invites', this.fmi_1);
    this.mnr_1 = new StringResource('expires', this.fmi_1);
    this.nnr_1 = new StringResource('reminder', this.fmi_1);
    this.onr_1 = new StringResource('resend', this.fmi_1);
    this.pnr_1 = new StringResource('revoke', this.fmi_1);
    this.qnr_1 = new StringResource('invite_code_redeemed', this.fmi_1);
    this.rnr_1 = new StringResource('invite_code_invalid', this.fmi_1);
    this.snr_1 = new StringResource('invite_declined', this.fmi_1);
    this.tnr_1 = new StringResource('invite_code_already_redeemed', this.fmi_1);
    this.unr_1 = new StringResource('invite_code_expired', this.fmi_1);
    this.vnr_1 = new StringResource('invitation_is_revoked', this.fmi_1);
    this.wnr_1 = new StringResource('security', this.fmi_1);
    this.xnr_1 = new StringResource('manage_account', this.fmi_1);
    this.ynr_1 = new StringResource('passkeys', this.fmi_1);
    this.znr_1 = new StringResource('manage', this.fmi_1);
    this.ans_1 = new StringResource('created', this.fmi_1);
    this.bns_1 = new StringResource('create_passkey', this.fmi_1);
    this.cns_1 = new StringResource('last_updated', this.fmi_1);
    this.dns_1 = new StringResource('delete_this_passkey', this.fmi_1);
    this.ens_1 = new StringResource('loss_access_passkey_dialog', this.fmi_1);
    this.fns_1 = new StringResource('sign_in_faster_next_time', this.fmi_1);
    this.gns_1 = new StringResource('secure_passkey_detail_text', this.fmi_1);
    this.hns_1 = new StringResource('invitations_sent', this.fmi_1);
    this.ins_1 = new StringResource('invitation_sent', this.fmi_1);
    this.jns_1 = new StringResource('storage_and_data', this.fmi_1);
    this.kns_1 = new StringResource('storage_and_data_subtitle', this.fmi_1);
    this.lns_1 = new StringResource('local_sharing', this.fmi_1);
    this.mns_1 = new StringResource('local_sharing_subtitle', this.fmi_1);
    this.nns_1 = new StringResource('available_neighbors', this.fmi_1);
    this.ons_1 = new StringResource('device_name', this.fmi_1);
  }
  var strings_instance;
  function strings_getInstance() {
    if (strings_instance == null)
      new strings();
    return strings_instance;
  }
  function plurals() {
    plurals_instance = this;
    var tmp = this;
    var tmp_0 = require('localization/comustadmobilecore_pluralsJson.json');
    tmp.pns_1 = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    var tmp_1 = this;
    var tmp_2 = require('localization/comustadmobilecore_pluralsJson_rw.json');
    var tmp_3 = new SupportedLocale('rw', (!(tmp_2 == null) ? typeof tmp_2 === 'string' : false) ? tmp_2 : THROW_CCE());
    var tmp_4 = require('localization/comustadmobilecore_pluralsJson_ne.json');
    var tmp_5 = new SupportedLocale('ne', (!(tmp_4 == null) ? typeof tmp_4 === 'string' : false) ? tmp_4 : THROW_CCE());
    var tmp_6 = require('localization/comustadmobilecore_pluralsJson_ar.json');
    var tmp_7 = new SupportedLocale('ar', (!(tmp_6 == null) ? typeof tmp_6 === 'string' : false) ? tmp_6 : THROW_CCE());
    var tmp_8 = require('localization/comustadmobilecore_pluralsJson_bn.json');
    var tmp_9 = new SupportedLocale('bn', (!(tmp_8 == null) ? typeof tmp_8 === 'string' : false) ? tmp_8 : THROW_CCE());
    var tmp_10 = require('localization/comustadmobilecore_pluralsJson_fr.json');
    var tmp_11 = new SupportedLocale('fr', (!(tmp_10 == null) ? typeof tmp_10 === 'string' : false) ? tmp_10 : THROW_CCE());
    var tmp_12 = require('localization/comustadmobilecore_pluralsJson_fa.json');
    var tmp_13 = new SupportedLocale('fa', (!(tmp_12 == null) ? typeof tmp_12 === 'string' : false) ? tmp_12 : THROW_CCE());
    var tmp_14 = require('localization/comustadmobilecore_pluralsJson_nb-NO.json');
    var tmp_15 = new SupportedLocale('nb-NO', (!(tmp_14 == null) ? typeof tmp_14 === 'string' : false) ? tmp_14 : THROW_CCE());
    var tmp_16 = require('localization/comustadmobilecore_pluralsJson_it.json');
    var tmp_17 = new SupportedLocale('it', (!(tmp_16 == null) ? typeof tmp_16 === 'string' : false) ? tmp_16 : THROW_CCE());
    var tmp_18 = require('localization/comustadmobilecore_pluralsJson_my.json');
    var tmp_19 = new SupportedLocale('my', (!(tmp_18 == null) ? typeof tmp_18 === 'string' : false) ? tmp_18 : THROW_CCE());
    var tmp_20 = require('localization/comustadmobilecore_pluralsJson_ps.json');
    var tmp_21 = new SupportedLocale('ps', (!(tmp_20 == null) ? typeof tmp_20 === 'string' : false) ? tmp_20 : THROW_CCE());
    var tmp_22 = require('localization/comustadmobilecore_pluralsJson_tg.json');
    var tmp_23 = new SupportedLocale('tg', (!(tmp_22 == null) ? typeof tmp_22 === 'string' : false) ? tmp_22 : THROW_CCE());
    var tmp_24 = require('localization/comustadmobilecore_pluralsJson_ru.json');
    tmp_1.qns_1 = new SupportedLocales(listOf([tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, new SupportedLocale('ru', (!(tmp_24 == null) ? typeof tmp_24 === 'string' : false) ? tmp_24 : THROW_CCE())]));
    this.rns_1 = new Impl(this.qns_1, this.pns_1);
    this.sns_1 = new PluralsResource('number_of_attempts', this.rns_1);
    this.tns_1 = new PluralsResource('duration_hours', this.rns_1);
    this.uns_1 = new PluralsResource('duration_minutes', this.rns_1);
    this.vns_1 = new PluralsResource('duration_seconds', this.rns_1);
    this.wns_1 = new PluralsResource('items_selected', this.rns_1);
    this.xns_1 = new PluralsResource('items_deleted', this.rns_1);
    this.yns_1 = new PluralsResource('items_restored', this.rns_1);
    this.zns_1 = new PluralsResource('are_you_sure_you_want_to_permanently_delete', this.rns_1);
  }
  var plurals_instance;
  function plurals_getInstance() {
    if (plurals_instance == null)
      new plurals();
    return plurals_instance;
  }
  function MR() {
    MR_instance = this;
    this.ant_1 = '6bd6ecab361e4d7d09ae87ae656ec4ed';
    this.bnt_1 = strings_getInstance().fmi_1.nmd(plurals_getInstance().rns_1);
  }
  var MR_instance;
  function MR_getInstance() {
    if (MR_instance == null)
      new MR();
    return MR_instance;
  }
  function AccountRegisterOptions(makeAccountActive, parentJoin) {
    makeAccountActive = makeAccountActive === VOID ? true : makeAccountActive;
    parentJoin = parentJoin === VOID ? null : parentJoin;
    this.cnt_1 = makeAccountActive;
    this.dnt_1 = parentJoin;
  }
  protoOf(AccountRegisterOptions).toString = function () {
    return 'AccountRegisterOptions(makeAccountActive=' + this.cnt_1 + ', parentJoin=' + this.dnt_1 + ')';
  };
  protoOf(AccountRegisterOptions).hashCode = function () {
    var result = getBooleanHashCode(this.cnt_1);
    result = imul(result, 31) + (this.dnt_1 == null ? 0 : this.dnt_1.hashCode()) | 0;
    return result;
  };
  protoOf(AccountRegisterOptions).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AccountRegisterOptions))
      return false;
    var tmp0_other_with_cast = other instanceof AccountRegisterOptions ? other : THROW_CCE();
    if (!(this.cnt_1 === tmp0_other_with_cast.cnt_1))
      return false;
    if (!equals(this.dnt_1, tmp0_other_with_cast.dnt_1))
      return false;
    return true;
  };
  function AdultAccountRequiredException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, AdultAccountRequiredException);
  }
  function _get_dataLayer__43yv12($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gnt_1;
    dataLayer$factory_0();
    return this_0.t2();
  }
  function $setAuthCOROUTINE$1(_this__u8e3s4, personUid, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.pnt_1 = _this__u8e3s4;
    this.qnt_1 = personUid;
    this.rnt_1 = password;
  }
  protoOf($setAuthCOROUTINE$1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = doublePbkdf2HashAsBase64(this.pnt_1, this.rnt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.snt_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = _get_dataLayer__43yv12(this.pnt_1).wk2().a7f();
            var this_0 = new PersonAuth2();
            this_0.cg0_1 = this.qnt_1;
            var tmp_1 = this_0;
            tmp_1.dg0_1 = 'PBKDF2x2';
            this_0.eg0_1 = this.snt_1;
            suspendResult = tmp_0.yfz(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function AuthManager(learningSpace, di) {
    this.ent_1 = learningSpace;
    this.fnt_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.ent_1;
    var trigger = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.gnt_1 = Instance(this_0, tmp$ret$3, null).a5d(this, dataLayer$factory());
  }
  protoOf(AuthManager).a57 = function () {
    return this.fnt_1;
  };
  protoOf(AuthManager).tnt = function (personUid, password, $completion) {
    var tmp = new $setAuthCOROUTINE$1(this, personUid, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function dataLayer$factory() {
    return getPropertyCallableRef('dataLayer', 1, KProperty1, function (receiver) {
      return _get_dataLayer__43yv12(receiver);
    }, null);
  }
  function dataLayer$factory_0() {
    return getPropertyCallableRef('dataLayer', 1, KProperty1, function (receiver) {
      return _get_dataLayer__43yv12(receiver);
    }, null);
  }
  function ConsentNotGrantedException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, ConsentNotGrantedException);
  }
  function Companion() {
  }
  var Companion_instance_48;
  function Companion_getInstance_16() {
    return Companion_instance_48;
  }
  function $serializer() {
    $serializer_instance = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.LearningSpace', this, 1);
    tmp0_serialDesc.t4f('url', false);
    this.unt_1 = tmp0_serialDesc;
  }
  protoOf($serializer).q44 = function () {
    return this.unt_1;
  };
  protoOf($serializer).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer).s44 = function (decoder) {
    var tmp0_desc = this.unt_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return LearningSpace_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer).vnt = function (encoder, value) {
    var tmp0_desc = this.unt_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.wnt_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer).r44 = function (encoder, value) {
    return this.vnt(encoder, value instanceof LearningSpace ? value : THROW_CCE());
  };
  var $serializer_instance;
  function $serializer_getInstance_11() {
    if ($serializer_instance == null)
      new $serializer();
    return $serializer_instance;
  }
  function LearningSpace_init_$Init$(seen1, url, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_11().unt_1);
    }
    $this.wnt_1 = url;
    var tmp = $this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.xnt_1 = lazy(tmp_0, LearningSpace$_init_$lambda_beny7x($this));
    return $this;
  }
  function LearningSpace_init_$Create$(seen1, url, serializationConstructorMarker) {
    return LearningSpace_init_$Init$(seen1, url, serializationConstructorMarker, objectCreate(protoOf(LearningSpace)));
  }
  function LearningSpace$isLocal$delegate$lambda(this$0) {
    return function () {
      return endsWith(Url(this$0.wnt_1).y30_1, '.local');
    };
  }
  function LearningSpace$_init_$lambda_beny7x(this$0) {
    return function () {
      return endsWith(Url(this$0.wnt_1).y30_1, '.local');
    };
  }
  function LearningSpace(url) {
    this.wnt_1 = url;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.xnt_1 = lazy(tmp_0, LearningSpace$isLocal$delegate$lambda(this));
  }
  protoOf(LearningSpace).ynt = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.xnt_1;
    isLocal$factory();
    return this_0.t2();
  };
  protoOf(LearningSpace).toString = function () {
    return 'LearningSpace(url=' + this.wnt_1 + ')';
  };
  protoOf(LearningSpace).hashCode = function () {
    return getStringHashCode(this.wnt_1);
  };
  protoOf(LearningSpace).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LearningSpace))
      return false;
    var tmp0_other_with_cast = other instanceof LearningSpace ? other : THROW_CCE();
    if (!(this.wnt_1 === tmp0_other_with_cast.wnt_1))
      return false;
    return true;
  };
  function isLocal$factory() {
    return getPropertyCallableRef('isLocal', 1, KProperty1, function (receiver) {
      return receiver.ynt();
    }, null);
  }
  function Companion_0() {
    Companion_instance_49 = this;
    this.znt_1 = new LearningSpaceScope();
  }
  var Companion_instance_49;
  function Companion_getInstance_17() {
    if (Companion_instance_49 == null)
      new Companion_0();
    return Companion_instance_49;
  }
  function LearningSpaceScope() {
    Companion_getInstance_17();
    var tmp = this;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp.anu_1 = LinkedHashMap_init_$Create$();
  }
  protoOf(LearningSpaceScope).bnu = function (context) {
    // Inline function 'kotlin.collections.getOrPut' call
    var this_0 = this.anu_1;
    var key = context.wnt_1;
    var value = this_0.q(key);
    var tmp;
    if (value == null) {
      // Inline function 'com.ustadmobile.core.account.LearningSpaceScope.getRegistry.<anonymous>' call
      var answer = new StandardScopeRegistry();
      this_0.s(key, answer);
      tmp = answer;
    } else {
      tmp = value;
    }
    return tmp;
  };
  protoOf(LearningSpaceScope).h59 = function (context) {
    return this.bnu(context instanceof LearningSpace ? context : THROW_CCE());
  };
  function Pbkdf2Params(iterations, keyLength) {
    iterations = iterations === VOID ? 10000 : iterations;
    keyLength = keyLength === VOID ? 512 : keyLength;
    this.cnu_1 = iterations;
    this.dnu_1 = keyLength;
  }
  protoOf(Pbkdf2Params).toString = function () {
    return 'Pbkdf2Params(iterations=' + this.cnu_1 + ', keyLength=' + this.dnu_1 + ')';
  };
  protoOf(Pbkdf2Params).hashCode = function () {
    var result = this.cnu_1;
    result = imul(result, 31) + this.dnu_1 | 0;
    return result;
  };
  protoOf(Pbkdf2Params).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Pbkdf2Params))
      return false;
    var tmp0_other_with_cast = other instanceof Pbkdf2Params ? other : THROW_CCE();
    if (!(this.cnu_1 === tmp0_other_with_cast.cnu_1))
      return false;
    if (!(this.dnu_1 === tmp0_other_with_cast.dnu_1))
      return false;
    return true;
  };
  function Companion_1() {
  }
  protoOf(Companion_1).n4r = function () {
    return $serializer_getInstance_12();
  };
  var Companion_instance_50;
  function Companion_getInstance_18() {
    return Companion_instance_50;
  }
  function $serializer_0() {
    $serializer_instance_0 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.RegisterRequest', this, 5);
    tmp0_serialDesc.t4f('person', false);
    tmp0_serialDesc.t4f('newPassword', false);
    tmp0_serialDesc.t4f('parent', false);
    tmp0_serialDesc.t4f('learningSpaceUrl', false);
    tmp0_serialDesc.t4f('langCode', true);
    this.enu_1 = tmp0_serialDesc;
  }
  protoOf($serializer_0).q44 = function () {
    return this.enu_1;
  };
  protoOf($serializer_0).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance(), StringSerializer_getInstance(), get_nullable($serializer_getInstance_0()), StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_0).s44 = function (decoder) {
    var tmp0_desc = this.enu_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.i48(tmp0_desc);
    if (tmp9_input.x48()) {
      tmp4_local0 = tmp9_input.u48(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.w48(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.s48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.u48(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.w48(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.s48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.j48(tmp0_desc);
    return RegisterRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_0).fnu = function (encoder, value) {
    var tmp0_desc = this.enu_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance(), value.gnu_1);
    tmp1_output.w49(tmp0_desc, 1, value.hnu_1);
    tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_0(), value.inu_1);
    tmp1_output.w49(tmp0_desc, 3, value.jnu_1);
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.knu_1 === 'en')) {
      tmp1_output.w49(tmp0_desc, 4, value.knu_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_0).r44 = function (encoder, value) {
    return this.fnu(encoder, value instanceof RegisterRequest ? value : THROW_CCE());
  };
  var $serializer_instance_0;
  function $serializer_getInstance_12() {
    if ($serializer_instance_0 == null)
      new $serializer_0();
    return $serializer_instance_0;
  }
  function RegisterRequest_init_$Init$(seen1, person, newPassword, parent, learningSpaceUrl, langCode, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_12().enu_1);
    }
    $this.gnu_1 = person;
    $this.hnu_1 = newPassword;
    $this.inu_1 = parent;
    $this.jnu_1 = learningSpaceUrl;
    if (0 === (seen1 & 16))
      $this.knu_1 = 'en';
    else
      $this.knu_1 = langCode;
    return $this;
  }
  function RegisterRequest_init_$Create$(seen1, person, newPassword, parent, learningSpaceUrl, langCode, serializationConstructorMarker) {
    return RegisterRequest_init_$Init$(seen1, person, newPassword, parent, learningSpaceUrl, langCode, serializationConstructorMarker, objectCreate(protoOf(RegisterRequest)));
  }
  function RegisterRequest(person, newPassword, parent, learningSpaceUrl, langCode) {
    langCode = langCode === VOID ? 'en' : langCode;
    this.gnu_1 = person;
    this.hnu_1 = newPassword;
    this.inu_1 = parent;
    this.jnu_1 = learningSpaceUrl;
    this.knu_1 = langCode;
  }
  protoOf(RegisterRequest).toString = function () {
    return 'RegisterRequest(person=' + this.gnu_1 + ', newPassword=' + this.hnu_1 + ', parent=' + this.inu_1 + ', learningSpaceUrl=' + this.jnu_1 + ', langCode=' + this.knu_1 + ')';
  };
  protoOf(RegisterRequest).hashCode = function () {
    var result = this.gnu_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.hnu_1) | 0;
    result = imul(result, 31) + (this.inu_1 == null ? 0 : this.inu_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.jnu_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.knu_1) | 0;
    return result;
  };
  protoOf(RegisterRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterRequest))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterRequest ? other : THROW_CCE();
    if (!this.gnu_1.equals(tmp0_other_with_cast.gnu_1))
      return false;
    if (!(this.hnu_1 === tmp0_other_with_cast.hnu_1))
      return false;
    if (!equals(this.inu_1, tmp0_other_with_cast.inu_1))
      return false;
    if (!(this.jnu_1 === tmp0_other_with_cast.jnu_1))
      return false;
    if (!(this.knu_1 === tmp0_other_with_cast.knu_1))
      return false;
    return true;
  };
  function UnauthorizedException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, UnauthorizedException);
  }
  function Companion_2() {
  }
  var Companion_instance_51;
  function Companion_getInstance_19() {
    return Companion_instance_51;
  }
  function $serializer_1() {
    $serializer_instance_1 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.UserSessionWithPersonAndLearningSpace', this, 4);
    tmp0_serialDesc.t4f('userSession', false);
    tmp0_serialDesc.t4f('person', false);
    tmp0_serialDesc.t4f('learningSpace', false);
    tmp0_serialDesc.t4f('personPicture', true);
    this.lnu_1 = tmp0_serialDesc;
  }
  protoOf($serializer_1).q44 = function () {
    return this.lnu_1;
  };
  protoOf($serializer_1).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_1(), $serializer_getInstance(), $serializer_getInstance_11(), get_nullable($serializer_getInstance_2())];
  };
  protoOf($serializer_1).s44 = function (decoder) {
    var tmp0_desc = this.lnu_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.u48(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.u48(tmp0_desc, 2, $serializer_getInstance_11(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.u48(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.u48(tmp0_desc, 2, $serializer_getInstance_11(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return UserSessionWithPersonAndLearningSpace_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_1).mnu = function (encoder, value) {
    var tmp0_desc = this.lnu_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_1(), value.nnu_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance(), value.onu_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_11(), value.pnu_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.qnu_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, $serializer_getInstance_2(), value.qnu_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_1).r44 = function (encoder, value) {
    return this.mnu(encoder, value instanceof UserSessionWithPersonAndLearningSpace ? value : THROW_CCE());
  };
  var $serializer_instance_1;
  function $serializer_getInstance_13() {
    if ($serializer_instance_1 == null)
      new $serializer_1();
    return $serializer_instance_1;
  }
  function UserSessionWithPersonAndLearningSpace_init_$Init$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_13().lnu_1);
    }
    $this.nnu_1 = userSession;
    $this.onu_1 = person;
    $this.pnu_1 = learningSpace;
    if (0 === (seen1 & 8))
      $this.qnu_1 = null;
    else
      $this.qnu_1 = personPicture;
    return $this;
  }
  function UserSessionWithPersonAndLearningSpace_init_$Create$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker) {
    return UserSessionWithPersonAndLearningSpace_init_$Init$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker, objectCreate(protoOf(UserSessionWithPersonAndLearningSpace)));
  }
  function UserSessionWithPersonAndLearningSpace(userSession, person, learningSpace, personPicture) {
    personPicture = personPicture === VOID ? null : personPicture;
    this.nnu_1 = userSession;
    this.onu_1 = person;
    this.pnu_1 = learningSpace;
    this.qnu_1 = personPicture;
  }
  protoOf(UserSessionWithPersonAndLearningSpace).rnu = function () {
    var displayUrl = removeSuffix(removePrefix(removePrefix(this.pnu_1.wnt_1, 'http://'), 'https://'), '/');
    return '' + this.onu_1.g96_1 + '@' + displayUrl;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).snu = function () {
    return toUmAccount(this.onu_1, this.pnu_1.wnt_1);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).tnu = function () {
    var tmp0_elvis_lhs = this.onu_1.g96_1;
    return new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(this.pnu_1.wnt_1, tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs));
  };
  protoOf(UserSessionWithPersonAndLearningSpace).unu = function (userSession, person, learningSpace, personPicture) {
    return new UserSessionWithPersonAndLearningSpace(userSession, person, learningSpace, personPicture);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).vnu = function (userSession, person, learningSpace, personPicture, $super) {
    userSession = userSession === VOID ? this.nnu_1 : userSession;
    person = person === VOID ? this.onu_1 : person;
    learningSpace = learningSpace === VOID ? this.pnu_1 : learningSpace;
    personPicture = personPicture === VOID ? this.qnu_1 : personPicture;
    return $super === VOID ? this.unu(userSession, person, learningSpace, personPicture) : $super.unu.call(this, userSession, person, learningSpace, personPicture);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).toString = function () {
    return 'UserSessionWithPersonAndLearningSpace(userSession=' + this.nnu_1 + ', person=' + this.onu_1 + ', learningSpace=' + this.pnu_1 + ', personPicture=' + this.qnu_1 + ')';
  };
  protoOf(UserSessionWithPersonAndLearningSpace).hashCode = function () {
    var result = hashCode(this.nnu_1);
    result = imul(result, 31) + this.onu_1.hashCode() | 0;
    result = imul(result, 31) + this.pnu_1.hashCode() | 0;
    result = imul(result, 31) + (this.qnu_1 == null ? 0 : this.qnu_1.hashCode()) | 0;
    return result;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UserSessionWithPersonAndLearningSpace))
      return false;
    var tmp0_other_with_cast = other instanceof UserSessionWithPersonAndLearningSpace ? other : THROW_CCE();
    if (!equals(this.nnu_1, tmp0_other_with_cast.nnu_1))
      return false;
    if (!this.onu_1.equals(tmp0_other_with_cast.onu_1))
      return false;
    if (!this.pnu_1.equals(tmp0_other_with_cast.pnu_1))
      return false;
    if (!equals(this.qnu_1, tmp0_other_with_cast.qnu_1))
      return false;
    return true;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp = a.rnu();
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.rnu();
    return compareValues(tmp, tmp$ret$1);
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation) {
    this.env_1 = this$0;
    this.fnv_1 = $learningSpace;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).hnv = function (learningSpaceSessions, $completion) {
    var tmp = this.inv(learningSpaceSessions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.hnv((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.env_1.nnv_1;
            while (true) {
              var prevValue = this_0.t2();
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = prevValue.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (!element.pnu_1.equals(this.fnv_1)) {
                  destination.i1(element);
                }
              }
              var this_1 = this.gnv_1;
              var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
              var tmp0_iterator_0 = this_1.w();
              while (tmp0_iterator_0.f()) {
                var item = tmp0_iterator_0.e();
                var tmp0_elvis_lhs = item.gik_1;
                var tmp_0 = tmp0_elvis_lhs == null ? new UserSession() : tmp0_elvis_lhs;
                var tmp1_elvis_lhs = item.eik_1;
                destination_0.i1(new UserSessionWithPersonAndLearningSpace(tmp_0, tmp1_elvis_lhs == null ? new Person() : tmp1_elvis_lhs, this.fnv_1, item.fik_1));
              }
              var tmp_1 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda$lambda;
              var nextValue = plus(destination, sortedWith(destination_0, new sam$kotlin_Comparator$0(tmp_1)));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).inv = function (learningSpaceSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this.env_1, this.fnv_1, completion);
    i.gnv_1 = learningSpaceSessions;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this$0, $learningSpace, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation);
    var l = function (learningSpaceSessions, $completion) {
      return i.hnv(learningSpaceSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation) {
    this.cnw_1 = this$0;
    this.dnw_1 = $learningSpace;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var this_0 = this.cnw_1.knv_1;
            var context = this.dnw_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.fnw_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.fnw_1.b7f().zii();
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this.cnw_1, this.dnw_1, null);
            suspendResult = tmp_5.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda(this.cnw_1, this.dnw_1, completion);
    i.enw_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda_0(this$0, $learningSpace, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda(this$0, resultContinuation) {
    this.onw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda).qnw = function (learningSpacesWithSessions, $completion) {
    var tmp = this.rnw(learningSpacesWithSessions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qnw((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_iterator = this.pnw_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            launch(this.onw_1.tnv_1, VOID, VOID, UstadAccountManager$slambda$slambda$slambda$slambda_0(this.onw_1, element, null));
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).rnw = function (learningSpacesWithSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this.onw_1, completion);
    i.pnw_1 = learningSpacesWithSessions;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (learningSpacesWithSessions, $completion) {
      return i.qnw(learningSpacesWithSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda(this$0, resultContinuation) {
    this.anx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(UstadAccountManager$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = collectLatest(this.anx_1.mnv_1, UstadAccountManager$slambda$slambda$slambda_0(this.anx_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda).l78 = function (completion) {
    return new UstadAccountManager$slambda$slambda(this.anx_1, completion);
  };
  function UstadAccountManager$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$lambda($personAndPictureFromDb) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_safe_receiver = $personAndPictureFromDb;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg5_1;
      tmp.h96_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h96_1;
      var tmp_0 = $this$shallowCopy;
      var tmp2_safe_receiver = $personAndPictureFromDb;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.zg5_1;
      tmp_0.i96_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.i96_1;
      return Unit_instance;
    };
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda_1($session, this$0, resultContinuation) {
    this.jnx_1 = $session;
    this.knx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).mnx = function (personAndPictureFromDb, $completion) {
    var tmp = this.nnx(personAndPictureFromDb, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.mnx((p1 == null ? true : p1 instanceof PersonAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_safe_receiver = this.lnx_1;
          var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg5_1;
          var nameChanged = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ckr()) === this.jnx_1.onu_1.ckr());
          var tmp2_safe_receiver = this.lnx_1;
          var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ag6_1;
          var tmp_0 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.h97_1;
          var tmp4_safe_receiver = this.jnx_1.qnu_1;
          var pictureUriChanged = !(tmp_0 == (tmp4_safe_receiver == null ? null : tmp4_safe_receiver.h97_1));
          if (nameChanged ? true : pictureUriChanged) {
            var tmp_1;
            if (nameChanged) {
              tmp_1 = shallowCopy(this.jnx_1.onu_1, UstadAccountManager$slambda$slambda$slambda$slambda$lambda(this.lnx_1));
            } else {
              tmp_1 = this.jnx_1.onu_1;
            }
            var tmp_2 = tmp_1;
            var tmp_3;
            if (pictureUriChanged) {
              var tmp5_safe_receiver = this.lnx_1;
              tmp_3 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.ag6_1;
            } else {
              tmp_3 = this.jnx_1.qnu_1;
            }
            this.knx_1.onx(this.jnx_1.vnu(VOID, tmp_2, VOID, tmp_3));
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).nnx = function (personAndPictureFromDb, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1(this.jnx_1, this.knx_1, completion);
    i.lnx_1 = personAndPictureFromDb;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda_2($session, this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1($session, this$0, resultContinuation);
    var l = function (personAndPictureFromDb, $completion) {
      return i.mnx(personAndPictureFromDb, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.xnx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).any = function (session, $completion) {
    var tmp = this.bny(session, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.any(p1 instanceof UserSessionWithPersonAndLearningSpace ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var this_0 = this.xnx_1.knv_1;
            var context = this.ynx_1.pnu_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.znx_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.znx_1.n7d().gcl(this.ynx_1.nnu_1.wij_1);
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda_2(this.ynx_1, this.xnx_1, null);
            suspendResult = tmp_5.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).bny = function (session, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this.xnx_1, completion);
    i.ynx_1 = session;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (session, $completion) {
      return i.any(session, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda_1(this$0, resultContinuation) {
    this.kny_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(UstadAccountManager$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = collectLatest(this.kny_1.lnv_1, UstadAccountManager$slambda$slambda$slambda_2(this.kny_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda_1).l78 = function (completion) {
    return new UstadAccountManager$slambda$slambda_1(this.kny_1, completion);
  };
  function UstadAccountManager$slambda$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadAccountManager$registerWithPasskey$slambda$slambda($repo, $person, resultContinuation) {
    this.tny_1 = $repo;
    this.uny_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = this.tny_1.n7d().mg4(this.uny_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wny_1 = suspendResult;
            if (this.wny_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.tny_1.n7d().insertAsync(this.uny_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).yny = function (it, completion) {
    var i = new UstadAccountManager$registerWithPasskey$slambda$slambda(this.tny_1, this.uny_1, completion);
    i.vny_1 = it;
    return i;
  };
  function UstadAccountManager$registerWithPasskey$slambda$slambda_0($repo, $person, resultContinuation) {
    var i = new UstadAccountManager$registerWithPasskey$slambda$slambda($repo, $person, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda(this$0, resultContinuation) {
    this.hnz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda).lnz = function (response, $completion) {
    var tmp = this.c3i(response, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$register$slambda$slambda).he = function (p1, $completion) {
    return this.lnz(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.inz_1.j3b().f30_1 === 200) {
              var tmp_0 = this;
              tmp_0.knz_1 = _get_json__d8whur(this.hnz_1);
              this.hd_1 = 1;
              suspendResult = bodyAsText(this.inz_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.jnz_1 = new Pair(null, this.inz_1.j3b().f30_1);
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var string = suspendResult;
            var this_0 = this.knz_1.t45();
            var this_1 = serializer(this_0, createKType(getKClass(Person), arrayOf([]), false));
            var ARGUMENT = this.knz_1.s45(isInterface(this_1, KSerializer) ? this_1 : THROW_CCE(), string);
            this.jnz_1 = new Pair(ARGUMENT, 200);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.jnz_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda$slambda).c3i = function (response, completion) {
    var i = new UstadAccountManager$register$slambda$slambda(this.hnz_1, completion);
    i.inz_1 = response;
    return i;
  };
  function UstadAccountManager$register$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$register$slambda$slambda(this$0, resultContinuation);
    var l = function (response, $completion) {
      return i.lnz(response, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation) {
    this.unz_1 = $db;
    this.vnz_1 = $registeredPerson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda_1).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = this.unz_1.n7d().mg4(this.vnz_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.xnz_1 = suspendResult;
            if (this.xnz_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.unz_1.n7d().insertAsync(this.vnz_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).yny = function (it, completion) {
    var i = new UstadAccountManager$register$slambda$slambda_1(this.unz_1, this.vnz_1, completion);
    i.wnz_1 = it;
    return i;
  };
  function UstadAccountManager$register$slambda$slambda_2($db, $registeredPerson, resultContinuation) {
    var i = new UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$loginWithPasskey$slambda$lambda($loginResponse) {
    return function () {
      return 'passkeyres : ' + $loginResponse;
    };
  }
  function _get_createNewLocalAccountUseCase__gbdxzu($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.onv_1;
    createNewLocalAccountUseCase$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pnv_1;
    httpClient$factory_0();
    return this_0.t2();
  }
  function _get_json__d8whur($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qnv_1;
    json$factory_0();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rnv_1;
    apiUrlConfig$factory_0();
    return this_0.t2();
  }
  function makeNewTempGuestSession($this, learningSpaceUrl, currentDb) {
    // Inline function 'kotlin.also' call
    // Inline function 'kotlin.apply' call
    var this_0 = new UserSession();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    var tmp = this_0;
    var tmp_0 = get_doorPrimaryKeyManager(currentDb);
    tmp.rij_1 = tmp_0.n62(679);
    this_0.xij_1 = get_doorWrapperNodeId(currentDb);
    this_0.yij_1 = systemTimeInMillis();
    var tmp_1 = this_0;
    tmp_1.dik_1 = 8 | 4;
    var tmp_2 = this_0;
    tmp_2.aik_1 = 1;
    var this_1 = new UserSessionWithPersonAndLearningSpace(this_0, Companion_getInstance_20().ynz_1, new LearningSpace(learningSpaceUrl));
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    launch($this.tnv_1, VOID, VOID, UstadAccountManager$makeNewTempGuestSession$slambda_0(currentDb, this_1, null));
    return this_1;
  }
  function assertNotClosed($this) {
    if ($this.snv_1.kotlinx$atomicfu$value)
      throw IllegalStateException_init_$Create$('UstadAccountManager is closed');
  }
  function addActiveLearningSpace($this, learningSpace, commit, $completion) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.mnv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.addActiveLearningSpace.<anonymous>' call
        var nextValue = plus(prevValue, listOf_0(learningSpace));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
    return Unit_instance;
  }
  function removeActiveLearningSpace($this, learningSpace, commit) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.mnv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.removeActiveLearningSpace.<anonymous>' call
        // Inline function 'kotlin.collections.filter' call
        // Inline function 'kotlin.collections.filterTo' call
        var destination = ArrayList_init_$Create$();
        var tmp0_iterator = prevValue.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.account.UstadAccountManager.removeActiveLearningSpace.<anonymous>.<anonymous>' call
          if (!element.equals(learningSpace)) {
            destination.i1(element);
          }
        }
        var nextValue = destination;
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
  }
  function removeActiveLearningSpace$default($this, learningSpace, commit, $super) {
    commit = commit === VOID ? true : commit;
    return removeActiveLearningSpace($this, learningSpace, commit);
  }
  function commitActiveEndpointsToPref($this) {
    var tmp = Default_getInstance();
    var tmp_0 = ListSerializer(serializer_0(StringCompanionObject_instance));
    // Inline function 'kotlin.collections.map' call
    var this_0 = toSet($this.mnv_1.t2());
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.commitActiveEndpointsToPref.<anonymous>' call
      var tmp$ret$0 = item.wnt_1;
      destination.i1(tmp$ret$0);
    }
    var json = tmp.r45(tmp_0, toList(destination));
    // Inline function 'com.russhwolf.settings.set' call
    var this_1 = $this.jnv_1;
    var key = 'accountmgr.endpointswithsessions';
    this_1.xm7(key, json);
  }
  function getSiteFromDbOrLoadFromHttp($this, repo, $completion) {
    var tmp = new $getSiteFromDbOrLoadFromHttpCOROUTINE$7($this, repo, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_3() {
    Companion_instance_52 = this;
    var tmp = this;
    // Inline function 'kotlin.apply' call
    var this_0 = new Person();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.Companion.GUEST_PERSON.<anonymous>' call
    this_0.f96_1 = new Long(0, 0);
    this_0.h96_1 = 'Guest';
    this_0.i96_1 = 'User';
    tmp.ynz_1 = this_0;
    this.znz_1 = 'accountmgr.activesession';
    this.ao0_1 = 'accountmgr.activeendpoint';
    this.bo0_1 = 'accountmgr.endpointswithsessions';
    this.co0_1 = 'http://localhost/';
    this.do0_1 = 'com.ustadmobile';
    this.eo0_1 = 'com.ustadmobile.AUTH_GET_TOKEN';
  }
  var Companion_instance_52;
  function Companion_getInstance_20() {
    if (Companion_instance_52 == null)
      new Companion_3();
    return Companion_instance_52;
  }
  function sam$kotlin_Comparator$0(function_0) {
    this.ro0_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0).pa = function (a, b) {
    return this.ro0_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
    return this.pa(a, b);
  };
  function sam$kotlinx_coroutines_flow_FlowCollector$0(function_0) {
    this.so0_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).t1d = function (value, $completion) {
    return this.so0_1(value, $completion);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(function_0) {
    this.to0_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0).uo0 = function (endpointUrl) {
    return this.to0_1(endpointUrl);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(function_0) {
    this.vo0_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0).uo0 = function (endpointUrl) {
    return this.vo0_1(endpointUrl);
  };
  function UstadAccountManager$slambda(this$0, resultContinuation) {
    this.eo1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.eo1_1.nnv_1, UstadAccountManager$slambda$slambda_0(this.eo1_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda(this.eo1_1, completion);
    i.fo1_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda_1(this$0, resultContinuation) {
    this.oo1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.oo1_1.lnv_1, UstadAccountManager$slambda$slambda_2(this.oo1_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda_1).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda_1(this.oo1_1, completion);
    i.po1_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$makeNewTempGuestSession$slambda($currentDb, $it, resultContinuation) {
    this.yo1_1 = $currentDb;
    this.zo1_1 = $it;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.yo1_1.b7f().yii(this.zo1_1.nnu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$makeNewTempGuestSession$slambda(this.yo1_1, this.zo1_1, completion);
    i.ao2_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$makeNewTempGuestSession$slambda_0($currentDb, $it, resultContinuation) {
    var i = new UstadAccountManager$makeNewTempGuestSession$slambda($currentDb, $it, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$activeSessionCount$lambda(it) {
    return true;
  }
  function UstadAccountManager$registerWithPasskey$slambda($learningSpaceUrl, this$0, $passkeyResult, $person, resultContinuation) {
    this.jo2_1 = $learningSpaceUrl;
    this.ko2_1 = this$0;
    this.lo2_1 = $passkeyResult;
    this.mo2_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$registerWithPasskey$slambda).u1m = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.oo2_1 = new LearningSpace(this.jo2_1);
            var tmp_0 = this;
            var this_0 = this.ko2_1.knv_1;
            var context = this.oo2_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(SavePersonPasskeyUseCase), arrayOf([]), false));
            tmp_0.po2_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.hd_1 = 1;
            suspendResult = this.po2_1.vo2(this.lo2_1, this.mo2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_5 = this;
            var this_1 = this.ko2_1.knv_1;
            var context_0 = this.oo2_1;
            var trigger_0 = this_1.d57();
            var tmp_6 = Companion_instance_0;
            var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_8 = get_direct(On(this_1, tmp_6.h57(isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), context_0), trigger_0)).f58();
            var tmp_9 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_5.qo2_1 = tmp_8.d58(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), null).vk2();
            this.hd_1 = 2;
            suspendResult = this.ko2_1.wo2(this.mo2_1, this.jo2_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ro2_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = withDoorTransactionAsync(this.qo2_1, VOID, UstadAccountManager$registerWithPasskey$slambda$slambda_0(this.qo2_1, this.mo2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var this_2 = this.ko2_1.knv_1;
            var context_1 = this.oo2_1;
            var trigger_1 = this_2.d57();
            var tmp_10 = Companion_instance_0;
            var tmp_11 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_12 = get_direct(On(this_2, tmp_10.h57(isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE(), context_1), trigger_1)).f58();
            var tmp_13 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_12.d58(isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE(), 1);
            this.ko2_1.onx(this.ro2_1);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$registerWithPasskey$slambda(this.jo2_1, this.ko2_1, this.lo2_1, this.mo2_1, completion);
    i.no2_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$registerWithPasskey$slambda_0($learningSpaceUrl, this$0, $passkeyResult, $person, resultContinuation) {
    var i = new UstadAccountManager$registerWithPasskey$slambda($learningSpaceUrl, this$0, $passkeyResult, $person, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.u1m($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda(this$0, $learningSpaceUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    this.fo3_1 = this$0;
    this.go3_1 = $learningSpaceUrl;
    this.ho3_1 = $accountRegisterOptions;
    this.io3_1 = $person;
    this.jo3_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda).vo3 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$register$slambda).he = function (p1, $completion) {
    return this.vo3((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            assertNotClosed(this.fo3_1);
            this.lo3_1 = new LearningSpace(this.go3_1);
            this.mo3_1 = this.ho3_1.dnt_1;
            var tmp_0 = this;
            var this_0 = _get_httpClient__2ty1zc(this.fo3_1);
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.go3_1, '/') + '/auth/register');
            contentType(this_1, Application_getInstance().v2r_1);
            setBodyJson(this_1, _get_json__d8whur(this.fo3_1), Companion_instance_50.n4r(), new RegisterRequest(this.io3_1, this.jo3_1, this.mo3_1, this.go3_1));
            this_1.w38_1 = Companion_getInstance().m2x_1;
            tmp_0.no3_1 = new HttpStatement(this_1, this_0);
            this.hd_1 = 1;
            suspendResult = this.no3_1.g3z(UstadAccountManager$register$slambda$slambda_0(this.fo3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.oo3_1 = suspendResult;
            this.po3_1 = this.oo3_1.y6();
            this.qo3_1 = this.oo3_1.z6();
            if (this.qo3_1 === 200 ? !(this.po3_1 == null) : false) {
              var tmp_1 = this;
              var this_2 = this.fo3_1.knv_1;
              var context = this.lo3_1;
              var trigger = this_2.d57();
              var tmp_2 = Companion_instance_0;
              var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
              var tmp_4 = get_direct(On(this_2, tmp_2.h57(isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), context), trigger)).f58();
              var tmp_5 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
              tmp_1.so3_1 = tmp_4.d58(isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE(), null).vk2();
              this.hd_1 = 2;
              suspendResult = getSiteFromDbOrLoadFromHttp(this.fo3_1, this.so3_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.qo3_1 === 409) {
                var tmp_6 = this;
                throw IllegalStateException_init_$Create$('Conflict: username already taken');
              } else {
                var tmp_7 = this;
                throw Exception_init_$Create$('register request: non-OK status code: ' + this.qo3_1);
              }
            }

          case 2:
            this.hd_1 = 3;
            suspendResult = this.fo3_1.wo2(this.po3_1, this.go3_1, this.jo3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.to3_1 = suspendResult;
            var tmp_8 = this;
            var this_3 = this.fo3_1.knv_1;
            var context_0 = this.lo3_1;
            var trigger_0 = this_3.d57();
            var tmp_9 = Companion_instance_0;
            var tmp_10 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_11 = get_direct(On(this_3, tmp_9.h57(isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE(), context_0), trigger_0)).f58();
            var tmp_12 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_8.uo3_1 = tmp_11.d58(isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE(), 1);
            this.hd_1 = 4;
            suspendResult = withDoorTransactionAsync(this.uo3_1, VOID, UstadAccountManager$register$slambda$slambda_2(this.uo3_1, this.po3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            if (this.ho3_1.cnt_1) {
              this.fo3_1.onx(this.to3_1);
            }

            this.ro3_1 = this.po3_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return this.ro3_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$register$slambda(this.fo3_1, this.go3_1, this.ho3_1, this.io3_1, this.jo3_1, completion);
    i.ko3_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$register$slambda_0(this$0, $learningSpaceUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    var i = new UstadAccountManager$register$slambda(this$0, $learningSpaceUrl, $accountRegisterOptions, $person, $password, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.vo3($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$addSession$slambda(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation) {
    this.eo4_1 = this$0;
    this.fo4_1 = $learningSpace;
    this.go4_1 = $person;
    this.ho4_1 = $password;
    this.io4_1 = $authManager;
    this.jo4_1 = $dataLayer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$addSession$slambda).wo4 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$addSession$slambda).he = function (p1, $completion) {
    return this.wo4(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$addSession$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var this_0 = this.eo4_1.knv_1;
            var context = this.fo4_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(NodeIdAndAuth), arrayOf([]), false));
            tmp_0.lo4_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).q64_1;
            var tmp_5 = this;
            tmp_5.mo4_1 = new UserSession();
            var tmp_6 = this;
            tmp_6.no4_1 = this.mo4_1;
            this.no4_1.xij_1 = this.lo4_1;
            this.no4_1.wij_1 = this.go4_1.f96_1;
            this.no4_1.yij_1 = systemTimeInMillis();
            var tmp_7 = this.no4_1;
            tmp_7.dik_1 = 1;
            var tmp_8 = this.no4_1;
            tmp_8.aik_1 = 1;
            this.oo4_1 = this.ho4_1;
            if (this.oo4_1 == null) {
              this.po4_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_9 = this;
              tmp_9.qo4_1 = this.oo4_1;
              var tmp_10 = this;
              tmp_10.ro4_1 = this.qo4_1;
              this.hd_1 = 1;
              suspendResult = encryptPbkdf2(this.io4_1, this.ro4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.so4_1 = suspendResult;
            this.po4_1 = toHexString(this.so4_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.to4_1 = this.po4_1;
            this.no4_1.cik_1 = this.to4_1;
            this.hd_1 = 3;
            suspendResult = this.jo4_1.wk2().b7f().yii(this.no4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.uo4_1 = suspendResult;
            this.no4_1.rij_1 = this.uo4_1;
            this.vo4_1 = this.mo4_1;
            this.hd_1 = 4;
            suspendResult = this.jo4_1.sk2_1.f7e().yh3(this.go4_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var personPicture = suspendResult;
            return to(this.vo4_1, personPicture);
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$addSession$slambda).yny = function (it, completion) {
    var i = new UstadAccountManager$addSession$slambda(this.eo4_1, this.fo4_1, this.go4_1, this.ho4_1, this.io4_1, this.jo4_1, completion);
    i.ko4_1 = it;
    return i;
  };
  function UstadAccountManager$addSession$slambda_0(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation) {
    var i = new UstadAccountManager$addSession$slambda(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation);
    var l = function (it, $completion) {
      return i.wo4(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$endSession$lambda($session) {
    return function (it) {
      return it === $session.pnu_1.wnt_1;
    };
  }
  function UstadAccountManager$loginWithPasskey$slambda(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation) {
    this.fo5_1 = this$0;
    this.go5_1 = $currentServerUrl;
    this.ho5_1 = $passkeyWebAuthNResponse;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$loginWithPasskey$slambda).wo5 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$loginWithPasskey$slambda).he = function (p1, $completion) {
    return this.wo5((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$loginWithPasskey$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            assertNotClosed(this.fo5_1);
            var tmp_0 = this;
            tmp_0.jo5_1 = _get_httpClient__2ty1zc(this.fo5_1);
            var tmp_1 = this;
            tmp_1.ko5_1 = this.jo5_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, removeSuffix(this.go5_1, '/') + '/api/passkey/verifypasskey');
            setBodyJson(this_0, _get_json__d8whur(this.fo5_1), Companion_instance_93.n4r(), this.ho5_1);
            parameter(this_0, 'rpId', Url(_get_apiUrlConfig__mldllg(this.fo5_1).xo5_1).y30_1);
            tmp_2.lo5_1 = this_0;
            this.lo5_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_3 = this;
            tmp_3.mo5_1 = this.ko5_1;
            var tmp_4 = this;
            tmp_4.no5_1 = this.lo5_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.no5_1, this.mo5_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.oo5_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.oo5_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.po5_1 = suspendResult;
            var tmp_5 = Napier_getInstance();
            tmp_5.k5e(VOID, VOID, UstadAccountManager$loginWithPasskey$slambda$lambda(this.po5_1));
            var tmp_6 = this;
            var this_1 = _get_json__d8whur(this.fo5_1);
            var string = this.po5_1;
            var this_2 = this_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(PasskeyVerifyResult), arrayOf([]), false));
            tmp_6.qo5_1 = this_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), string);
            if (!this.qo5_1.bo6_1) {
              throw new UnauthorizedException('Account not found');
            }

            this.ro5_1 = new UmAccount(this.qo5_1.co6_1);
            this.ro5_1.yky_1 = this.go5_1;
            var tmp_7 = this;
            var this_4 = this.fo5_1.knv_1;
            var context = new LearningSpace(this.go5_1);
            var trigger = this_4.d57();
            var tmp_8 = Companion_instance_0;
            var tmp_9 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_10 = get_direct(On(this_4, tmp_8.h57(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), context), trigger)).f58();
            var tmp_11 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_7.so5_1 = tmp_10.d58(isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE(), null).vk2();
            this.hd_1 = 3;
            suspendResult = this.so5_1.n7d().lg4(this.qo5_1.co6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.to5_1 = suspendResult;
            var tmp_12 = this;
            var tmp_13;
            if (this.to5_1 == null) {
              throw IllegalStateException_init_$Create$('Cannot find person in repo/db');
            } else {
              tmp_13 = this.to5_1;
            }

            tmp_12.uo5_1 = tmp_13;
            this.vo5_1 = ensureNotNull(this.uo5_1.zg5_1);
            this.ro5_1.ckz_1 = this.vo5_1.n96_1;
            this.hd_1 = 4;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.fo5_1, this.so5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            suspendResult = this.fo5_1.wo2(this.vo5_1, this.go5_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            this.fo5_1.onx(newSession);
            return this.ro5_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$loginWithPasskey$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$loginWithPasskey$slambda(this.fo5_1, this.go5_1, this.ho5_1, completion);
    i.io5_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$loginWithPasskey$slambda_0(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation) {
    var i = new UstadAccountManager$loginWithPasskey$slambda(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.wo5($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    this.no6_1 = this$0;
    this.oo6_1 = $endpointUrl;
    this.po6_1 = $username;
    this.qo6_1 = $password;
    this.ro6_1 = $maxDateOfBirth;
    this.so6_1 = $dontSetCurrentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$login$slambda).wo5 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$login$slambda).he = function (p1, $completion) {
    return this.wo5((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$login$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            assertNotClosed(this.no6_1);
            var tmp_0 = this;
            var this_0 = get_direct(this.no6_1.knv_1);
            var context = new LearningSpace(this.oo6_1);
            var tmp_1 = this_0.f58();
            var tmp_2 = Companion_instance_0;
            var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_4 = tmp_1.c58(tmp_2.h57(isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), context)).f58();
            var tmp_5 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.uo6_1 = tmp_4.d58(isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE(), null);
            var tmp_6 = this;
            var tmp_7 = this.uo6_1.tk2_1;
            var tmp0_safe_receiver = (!(tmp_7 == null) ? isInterface(tmp_7, DoorDatabaseRepository) : false) ? tmp_7 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j39();
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v65_1;
            var tmp_8;
            if (tmp2_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Could not open repo for endpoint ' + this.oo6_1);
            } else {
              tmp_8 = tmp2_elvis_lhs;
            }

            tmp_6.vo6_1 = tmp_8;
            var tmp_9 = this;
            tmp_9.wo6_1 = _get_httpClient__2ty1zc(this.no6_1);
            var tmp_10 = this;
            tmp_10.xo6_1 = this.wo6_1;
            var tmp_11 = this;
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.oo6_1, '/') + '/auth/login');
            parameter(this_1, 'username', this.po6_1);
            parameter(this_1, 'password', this.qo6_1);
            parameter(this_1, 'maxDateOfBirth', this.ro6_1);
            header(this_1, 'X-nid', this.vo6_1);
            set_expectSuccess(this_1, false);
            tmp_11.yo6_1 = this_1;
            this.yo6_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_12 = this;
            tmp_12.zo6_1 = this.xo6_1;
            var tmp_13 = this;
            tmp_13.ao7_1 = this.yo6_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.ao7_1, this.zo6_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.bo7_1 = suspendResult;
            if (this.bo7_1.j3b().f30_1 === 403) {
              throw new UnauthorizedException('Access denied');
            } else if (this.bo7_1.j3b().equals(Companion_getInstance_0().q2z_1)) {
              throw new ConsentNotGrantedException('Parental consent required but not granted');
            } else if (this.bo7_1.j3b().equals(Companion_getInstance_0().f2z_1)) {
              throw new AdultAccountRequiredException('Adult account required, credentials for child account');
            } else if (!(this.bo7_1.j3b().f30_1 === 200)) {
              throw IllegalStateException_init_$Create$('Server error - response ' + this.bo7_1.j3b().f30_1);
            }

            var tmp_14 = this;
            tmp_14.co7_1 = _get_json__d8whur(this.no6_1);
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.bo7_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.do7_1 = suspendResult;
            var tmp_15 = this;
            var this_2 = this.co7_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(UmAccount), arrayOf([]), false));
            tmp_15.eo7_1 = this.co7_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), this.do7_1);
            this.eo7_1.yky_1 = this.oo6_1;
            this.hd_1 = 3;
            suspendResult = this.uo6_1.wk2().n7d().lg4(this.eo7_1.vky_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.fo7_1 = suspendResult;
            var tmp_16 = this;
            var tmp_17;
            if (this.fo7_1 == null) {
              throw IllegalStateException_init_$Create$('Cannot find person in repo/db');
            } else {
              tmp_17 = this.fo7_1;
            }

            tmp_16.go7_1 = tmp_17;
            this.ho7_1 = ensureNotNull(this.go7_1.zg5_1);
            this.eo7_1.ckz_1 = this.ho7_1.n96_1;
            this.hd_1 = 4;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.no6_1, this.uo6_1.wk2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            suspendResult = this.no6_1.wo2(this.ho7_1, this.oo6_1, this.qo6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            if (!this.so6_1) {
              this.no6_1.onx(newSession);
            }

            return this.eo7_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$login$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$login$slambda(this.no6_1, this.oo6_1, this.po6_1, this.qo6_1, this.ro6_1, this.so6_1, completion);
    i.to6_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$login$slambda_0(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    var i = new UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.wo5($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $activeSessionsListCOROUTINE$2(_this__u8e3s4, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qo7_1 = _this__u8e3s4;
    this.ro7_1 = endpointFilter;
  }
  protoOf($activeSessionsListCOROUTINE$2).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.qo7_1.mnv_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.ro7_1.uo0(element.wnt_1)) {
                destination.i1(element);
              }
            }

            tmp_0.so7_1 = destination;
            var tmp_1 = this;
            tmp_1.to7_1 = this.so7_1;
            var tmp_2 = this;
            tmp_2.uo7_1 = ArrayList_init_$Create$();
            this.vo7_1 = this.to7_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.vo7_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.wo7_1 = this.vo7_1.e();
            var tmp_3 = this;
            tmp_3.xo7_1 = this.wo7_1;
            var tmp_4 = this;
            var this_1 = this.qo7_1.knv_1;
            var context = this.xo7_1;
            var trigger = this_1.d57();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_1, tmp_5.h57(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).f58();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.yo7_1 = tmp_7.d58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.yo7_1.b7f().aij(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var this_2 = suspendResult;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator_0 = this_2.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(withLearningSpace(item, this.xo7_1));
            }

            var list = destination_0;
            addAll(this.uo7_1, list);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.uo7_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $activeSessionCountCOROUTINE$3(_this__u8e3s4, maxDateOfBirth, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ho8_1 = _this__u8e3s4;
    this.io8_1 = maxDateOfBirth;
    this.jo8_1 = endpointFilter;
  }
  protoOf($activeSessionCountCOROUTINE$3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.ho8_1.mnv_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.jo8_1.uo0(element.wnt_1)) {
                destination.i1(element);
              }
            }

            tmp_0.ko8_1 = destination;
            var tmp_1 = this;
            tmp_1.lo8_1 = 0;
            this.mo8_1 = this.lo8_1;
            this.no8_1 = this.ko8_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.no8_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.oo8_1 = this.no8_1.e();
            var tmp_2 = this;
            tmp_2.po8_1 = this.mo8_1;
            var tmp_3 = this;
            tmp_3.qo8_1 = this.oo8_1;
            var tmp_4 = this;
            var this_1 = this.ho8_1.knv_1;
            var context = this.qo8_1;
            var trigger = this_1.d57();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_1, tmp_5.h57(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).f58();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.ro8_1 = tmp_7.d58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.ro8_1.b7f().bij(this.io8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            this.mo8_1 = this.po8_1 + ARGUMENT | 0;
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.mo8_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $addSessionCOROUTINE$4(_this__u8e3s4, person, learningSpaceUrl, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ao9_1 = _this__u8e3s4;
    this.bo9_1 = person;
    this.co9_1 = learningSpaceUrl;
    this.do9_1 = password;
  }
  protoOf($addSessionCOROUTINE$4).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            assertNotClosed(this.ao9_1);
            this.eo9_1 = new LearningSpace(this.co9_1);
            var tmp_0 = this;
            var this_0 = this.ao9_1.knv_1;
            var context = this.eo9_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.fo9_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            if (!this.ao9_1.mnv_1.t2().a1(this.eo9_1)) {
              this.hd_1 = 1;
              suspendResult = addActiveLearningSpace(this.ao9_1, this.eo9_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            commitActiveEndpointsToPref(this.ao9_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp_5 = this;
            var this_1 = this.ao9_1.knv_1;
            var context_0 = this.eo9_1;
            var trigger_0 = this_1.d57();
            var tmp_6 = Companion_instance_0;
            var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_8 = get_direct(On(this_1, tmp_6.h57(isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), context_0), trigger_0)).f58();
            var tmp_9 = typeToken(createKType(getKClass(AuthManager), arrayOf([]), false));
            tmp_5.go9_1 = tmp_8.d58(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), null);
            this.hd_1 = 3;
            var tmp_10 = this.fo9_1.wk2();
            suspendResult = withDoorTransactionAsync(tmp_10, VOID, UstadAccountManager$addSession$slambda_0(this.ao9_1, this.eo9_1, this.bo9_1, this.do9_1, this.go9_1, this.fo9_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp0_container = suspendResult;
            var userSession = tmp0_container.y6();
            var personPicture = tmp0_container.z6();
            return new UserSessionWithPersonAndLearningSpace(userSession, this.bo9_1, this.eo9_1, personPicture);
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $endSessionCOROUTINE$6(_this__u8e3s4, session, endStatus, endReason, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.po9_1 = _this__u8e3s4;
    this.qo9_1 = session;
    this.ro9_1 = endStatus;
    this.so9_1 = endReason;
  }
  protoOf($endSessionCOROUTINE$6).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.po9_1.knv_1;
            var context = this.qo9_1.pnu_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.to9_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.hd_1 = 1;
            suspendResult = this.to9_1.wk2().b7f().cij(this.qo9_1.nnu_1.rij_1, this.ro9_1, this.so9_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (this.po9_1.uo9().nnu_1.rij_1.equals(this.qo9_1.nnu_1.rij_1) ? this.po9_1.uo9().pnu_1.equals(this.qo9_1.pnu_1) : false) {
              this.po9_1.onx(makeNewTempGuestSession(this.po9_1, this.qo9_1.pnu_1.wnt_1, this.to9_1.wk2()));
            }

            this.hd_1 = 2;
            var tmp_5 = UstadAccountManager$endSession$lambda(this.qo9_1);
            suspendResult = this.po9_1.vo9(new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(tmp_5), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            if (ARGUMENT.c1()) {
              removeActiveLearningSpace$default(this.po9_1, this.qo9_1.pnu_1);
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $getSiteFromDbOrLoadFromHttpCOROUTINE$7(_this__u8e3s4, repo, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.no0_1 = _this__u8e3s4;
    this.oo0_1 = repo;
  }
  protoOf($getSiteFromDbOrLoadFromHttpCOROUTINE$7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.oo0_1;
            var tmp_2 = (isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : THROW_CCE()).x5i();
            tmp_0.po0_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : THROW_CCE();
            this.hd_1 = 1;
            suspendResult = this.po0_1.v7e().lhn(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qo0_1 = suspendResult;
            if (this.qo0_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.oo0_1.v7e().lhn(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            if (suspendResult == null)
              throw IllegalStateException_init_$Create$('Internal error: no Site in database and could not fetch it from server');
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $startGuestSessionCOROUTINE$9(_this__u8e3s4, learningSpaceUrl, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.eoa_1 = _this__u8e3s4;
    this.foa_1 = learningSpaceUrl;
  }
  protoOf($startGuestSessionCOROUTINE$9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.eoa_1.knv_1;
            var context = new LearningSpace(this.foa_1);
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.goa_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.hd_1 = 1;
            var tmp_5 = this.goa_1.wk2();
            var this_1 = new Person();
            this_1.g96_1 = null;
            this_1.h96_1 = 'Guest';
            this_1.i96_1 = 'User';
            var tmp_6 = this_1;
            tmp_6.u96_1 = 2;
            suspendResult = insertPersonAndGroup(tmp_5, this_1, 1 | 16, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hoa_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.eoa_1, this.goa_1.wk2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.eoa_1.wo2(this.hoa_1, this.foa_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var guestSession = suspendResult;
            this.eoa_1.onx(guestSession);
            return guestSession;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UstadAccountManager(settings, di) {
    Companion_getInstance_20();
    this.jnv_1 = settings;
    this.knv_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = this.knv_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(CreateNewLocalAccountUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.onv_1 = Instance(this_0, tmp$ret$0, null).a5d(this, createNewLocalAccountUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = this.knv_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.pnv_1 = Instance(this_1, tmp$ret$2, null).a5d(this, httpClient$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = this.knv_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.qnv_1 = Instance(this_2, tmp$ret$4, null).a5d(this, json$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_3 = this.knv_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.rnv_1 = Instance(this_3, tmp$ret$6, null).a5d(this, apiUrlConfig$factory());
    this.snv_1 = atomic$boolean$1(false);
    this.tnv_1 = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
    var tmp0_elvis_lhs = this.jnv_1.ym7('accountmgr.activeendpoint');
    var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg(this).yo5_1 : tmp0_elvis_lhs;
    var currentEndpointStr = tmp1_elvis_lhs == null ? 'http://localhost/' : tmp1_elvis_lhs;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_4 = get_direct(this.knv_1);
    var context = new LearningSpace(currentEndpointStr);
    var tmp_7 = this_4.f58();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_8 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var tmp$ret$9 = tmp_8.h57(tmp$ret$8, context);
    var tmp_10 = tmp_7.c58(tmp$ret$9).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$11 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    var currentDb = tmp_10.d58(tmp$ret$11, 1);
    var tmp2_safe_receiver = this.jnv_1.ym7('accountmgr.activesession');
    var tmp_12;
    if (tmp2_safe_receiver == null) {
      tmp_12 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
      var this_5 = _get_json__d8whur(this);
      // Inline function 'kotlinx.serialization.serializer' call
      var this_6 = this_5.t45();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_7 = serializer(this_6, createKType(getKClass(UserSessionWithPersonAndLearningSpace), arrayOf([]), true));
      var tmp$ret$14 = isInterface(this_7, KSerializer) ? this_7 : THROW_CCE();
      tmp_12 = this_5.s45(tmp$ret$14, tmp2_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp_12;
    var initUserSession = tmp3_elvis_lhs == null ? makeNewTempGuestSession(this, currentEndpointStr, currentDb) : tmp3_elvis_lhs;
    this.lnv_1 = MutableStateFlow(initUserSession);
    var tmp4_safe_receiver = this.jnv_1.ym7('accountmgr.endpointswithsessions');
    var tmp_13;
    if (tmp4_safe_receiver == null) {
      tmp_13 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      tmp_13 = _get_json__d8whur(this).s45(ListSerializer(serializer_0(StringCompanionObject_instance)), tmp4_safe_receiver);
    }
    var tmp5_elvis_lhs = tmp_13;
    var initEndpoints = tmp5_elvis_lhs == null ? listOf_0(currentEndpointStr) : tmp5_elvis_lhs;
    var tmp_14 = this;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(initEndpoints, 10));
    var tmp0_iterator = initEndpoints.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      var tmp$ret$20 = new LearningSpace(item);
      destination.i1(tmp$ret$20);
    }
    tmp_14.mnv_1 = MutableStateFlow(destination);
    this.nnv_1 = MutableStateFlow(listOf_0(initUserSession));
    launch(this.tnv_1, VOID, VOID, UstadAccountManager$slambda_0(this, null));
    launch(this.tnv_1, VOID, VOID, UstadAccountManager$slambda_2(this, null));
  }
  protoOf(UstadAccountManager).onx = function (value) {
    this.lnv_1.x1k(value);
    // Inline function 'kotlinx.serialization.encodeToString' call
    var this_0 = _get_json__d8whur(this);
    // Inline function 'kotlinx.serialization.serializer' call
    var this_1 = this_0.t45();
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_2 = serializer(this_1, createKType(getKClass(UserSessionWithPersonAndLearningSpace), arrayOf([]), false));
    var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
    var activeAccountJson = this_0.r45(tmp$ret$1, value);
    // Inline function 'com.russhwolf.settings.set' call
    var this_3 = this.jnv_1;
    var key = 'accountmgr.activesession';
    this_3.xm7(key, activeAccountJson);
    // Inline function 'com.russhwolf.settings.set' call
    var this_4 = this.jnv_1;
    var key_0 = 'accountmgr.activeendpoint';
    var value_0 = value.pnu_1.wnt_1;
    this_4.xm7(key_0, value_0);
  };
  protoOf(UstadAccountManager).uo9 = function () {
    return this.lnv_1.t2();
  };
  protoOf(UstadAccountManager).ioa = function () {
    return asStateFlow(this.lnv_1);
  };
  protoOf(UstadAccountManager).joa = function () {
    return this.lnv_1.t2().snu();
  };
  protoOf(UstadAccountManager).koa = function () {
    return asStateFlow(this.nnv_1);
  };
  protoOf(UstadAccountManager).loa = function () {
    return this.lnv_1.t2().pnu_1;
  };
  protoOf(UstadAccountManager).vo9 = function (endpointFilter, $completion) {
    var tmp = new $activeSessionsListCOROUTINE$2(this, endpointFilter, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).moa = function (maxDateOfBirth, endpointFilter, $completion) {
    var tmp = new $activeSessionCountCOROUTINE$3(this, maxDateOfBirth, endpointFilter, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).noa = function (maxDateOfBirth, endpointFilter, $completion, $super) {
    maxDateOfBirth = maxDateOfBirth === VOID ? new Long(0, 0) : maxDateOfBirth;
    var tmp;
    if (endpointFilter === VOID) {
      var tmp_0 = UstadAccountManager$activeSessionCount$lambda;
      tmp = new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(tmp_0);
    } else {
      tmp = endpointFilter;
    }
    endpointFilter = tmp;
    return $super === VOID ? this.moa(maxDateOfBirth, endpointFilter, $completion) : $super.moa.call(this, maxDateOfBirth, endpointFilter, $completion);
  };
  protoOf(UstadAccountManager).ooa = function (learningSpaceUrl, passkeyResult, person, personPicture, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$registerWithPasskey$slambda_0(learningSpaceUrl, this, passkeyResult, person, null), $completion);
  };
  protoOf(UstadAccountManager).poa = function (person, password, learningSpaceUrl, accountRegisterOptions, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$register$slambda_0(this, learningSpaceUrl, accountRegisterOptions, person, password, null), $completion);
  };
  protoOf(UstadAccountManager).qoa = function (person, password, learningSpaceUrl, accountRegisterOptions, $completion, $super) {
    accountRegisterOptions = accountRegisterOptions === VOID ? new AccountRegisterOptions() : accountRegisterOptions;
    return $super === VOID ? this.poa(person, password, learningSpaceUrl, accountRegisterOptions, $completion) : $super.poa.call(this, person, password, learningSpaceUrl, accountRegisterOptions, $completion);
  };
  protoOf(UstadAccountManager).wo2 = function (person, learningSpaceUrl, password, $completion) {
    var tmp = new $addSessionCOROUTINE$4(this, person, learningSpaceUrl, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).roa = function (session, endStatus, endReason, $completion) {
    var tmp = new $endSessionCOROUTINE$6(this, session, endStatus, endReason, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).soa = function (session, endStatus, endReason, $completion, $super) {
    var tmp;
    if (endStatus === VOID) {
      tmp = 4;
    } else {
      tmp = endStatus;
    }
    endStatus = tmp;
    var tmp_0;
    if (endReason === VOID) {
      tmp_0 = 1;
    } else {
      tmp_0 = endReason;
    }
    endReason = tmp_0;
    return $super === VOID ? this.roa(session, endStatus, endReason, $completion) : $super.roa.call(this, session, endStatus, endReason, $completion);
  };
  protoOf(UstadAccountManager).toa = function (passkeyWebAuthNResponse, currentServerUrl, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$loginWithPasskey$slambda_0(this, currentServerUrl, passkeyWebAuthNResponse, null), $completion);
  };
  protoOf(UstadAccountManager).uoa = function (username, password, endpointUrl, maxDateOfBirth, dontSetCurrentSession, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$login$slambda_0(this, endpointUrl, username, password, maxDateOfBirth, dontSetCurrentSession, null), $completion);
  };
  protoOf(UstadAccountManager).voa = function (learningSpaceUrl, $completion) {
    var tmp = new $startGuestSessionCOROUTINE$9(this, learningSpaceUrl, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function createNewLocalAccountUseCase$factory() {
    return getPropertyCallableRef('createNewLocalAccountUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewLocalAccountUseCase__gbdxzu(receiver);
    }, null);
  }
  function httpClient$factory() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc(receiver);
    }, null);
  }
  function json$factory() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return _get_json__d8whur(receiver);
    }, null);
  }
  function apiUrlConfig$factory() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg(receiver);
    }, null);
  }
  function createNewLocalAccountUseCase$factory_0() {
    return getPropertyCallableRef('createNewLocalAccountUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewLocalAccountUseCase__gbdxzu(receiver);
    }, null);
  }
  function httpClient$factory_0() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc(receiver);
    }, null);
  }
  function json$factory_0() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return _get_json__d8whur(receiver);
    }, null);
  }
  function apiUrlConfig$factory_0() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg(receiver);
    }, null);
  }
  function Companion_4() {
    this.woa_1 = 101;
  }
  var Companion_instance_53;
  function Companion_getInstance_21() {
    return Companion_instance_53;
  }
  function Companion_5() {
  }
  protoOf(Companion_5).n4r = function () {
    return AnchorSerializer_getInstance();
  };
  var Companion_instance_54;
  function Companion_getInstance_22() {
    return Companion_instance_54;
  }
  function Anchor(content, href) {
    content = content === VOID ? '' : content;
    href = href === VOID ? '' : href;
    this.xoa_1 = content;
    this.yoa_1 = href;
  }
  function deserializeDynamic($this, reader) {
    var href = reader.m7d(null, 'href');
    // Inline function 'kotlin.text.trim' call
    var this_0 = xhtmlContentToText(reader);
    var text = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
    return new Anchor(text, href == null ? '' : href);
  }
  function AnchorSerializer() {
    AnchorSerializer_instance = this;
    this.zoa_1 = buildClassSerialDescriptor('a', []);
  }
  protoOf(AnchorSerializer).q44 = function () {
    return this.zoa_1;
  };
  protoOf(AnchorSerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic(this, decoder.nlf());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.zoa_1;
      var composite = decoder.i48(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.AnchorSerializer.deserialize.<anonymous>' call
      var result = composite.v48(AnchorSerializer_getInstance().zoa_1, 0, Companion_instance_54.n4r());
      composite.j48(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(AnchorSerializer).aob = function (encoder, value) {
    encoder.z49(Companion_instance_54.n4r(), value);
  };
  protoOf(AnchorSerializer).r44 = function (encoder, value) {
    return this.aob(encoder, value instanceof Anchor ? value : THROW_CCE());
  };
  var AnchorSerializer_instance;
  function AnchorSerializer_getInstance() {
    if (AnchorSerializer_instance == null)
      new AnchorSerializer();
    return AnchorSerializer_instance;
  }
  function Companion_6() {
  }
  protoOf(Companion_6).n4r = function () {
    return BodySerializer_instance;
  };
  var Companion_instance_55;
  function Companion_getInstance_23() {
    return Companion_instance_55;
  }
  function Body(navigationElements) {
    this.bob_1 = navigationElements;
  }
  function BodySerializer() {
  }
  protoOf(BodySerializer).q44 = function () {
    return buildClassSerialDescriptor('body', []);
  };
  protoOf(BodySerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = this.cob(decoder, decoder.nlf());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.q44();
      var composite = decoder.i48(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.BodySerializer.deserialize.<anonymous>' call
      var result = composite.v48(BodySerializer_instance.q44(), 0, Companion_instance_55.n4r());
      composite.j48(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(BodySerializer).cob = function (decoder, reader) {
    var xml = this.dob(decoder);
    // Inline function 'kotlin.collections.mutableListOf' call
    var navElementList = ArrayList_init_$Create$();
    // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
    var descriptor = this.q44();
    var composite = decoder.i48(descriptor);
    while (!(reader.e().equals(EventType_END_ELEMENT_getInstance()) ? reader.dc().ll9() === 'body' : false)) {
      if (reader.ul5().equals(EventType_START_ELEMENT_getInstance()) ? reader.ml5() === 'nav' : false) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = xml.alk(Companion_instance_57.n4r(), reader);
        navElementList.i1(element);
      }
    }
    var result = Unit_instance;
    composite.j48(descriptor);
    return new Body(toList(navElementList));
  };
  protoOf(BodySerializer).eob = function (encoder, value) {
    encoder.z49(Companion_instance_55.n4r(), value);
  };
  protoOf(BodySerializer).r44 = function (encoder, value) {
    return this.eob(encoder, value instanceof Body ? value : THROW_CCE());
  };
  protoOf(BodySerializer).dob = function (decoder) {
    return (isInterface(decoder, XmlInput) ? decoder : THROW_CCE()).wlh();
  };
  var BodySerializer_instance;
  function BodySerializer_getInstance() {
    return BodySerializer_instance;
  }
  function Companion_7() {
  }
  var Companion_instance_56;
  function Companion_getInstance_24() {
    return Companion_instance_56;
  }
  function $serializer_2() {
    $serializer_instance_2 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.ListItem', this, 3);
    tmp0_serialDesc.t4f('anchor', true);
    tmp0_serialDesc.t4f('span', true);
    tmp0_serialDesc.t4f('orderedList', true);
    tmp0_serialDesc.v4f(new XmlSerialName('li', 'http://www.w3.org/1999/xhtml'));
    this.fob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_2).q44 = function () {
    return this.fob_1;
  };
  protoOf($serializer_2).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(AnchorSerializer_getInstance()), get_nullable(SpanSerializer_getInstance()), get_nullable($serializer_getInstance_17())];
  };
  protoOf($serializer_2).s44 = function (decoder) {
    var tmp0_desc = this.fob_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.w48(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.w48(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, $serializer_getInstance_17(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.w48(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.w48(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, $serializer_getInstance_17(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return ListItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_2).gob = function (encoder, value) {
    var tmp0_desc = this.fob_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.hob_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, AnchorSerializer_getInstance(), value.hob_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.iob_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, SpanSerializer_getInstance(), value.iob_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.job_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_17(), value.job_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_2).r44 = function (encoder, value) {
    return this.gob(encoder, value instanceof ListItem ? value : THROW_CCE());
  };
  var $serializer_instance_2;
  function $serializer_getInstance_14() {
    if ($serializer_instance_2 == null)
      new $serializer_2();
    return $serializer_instance_2;
  }
  function ListItem_init_$Init$(seen1, anchor, span, orderedList, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_14().fob_1);
    }
    if (0 === (seen1 & 1))
      $this.hob_1 = null;
    else
      $this.hob_1 = anchor;
    if (0 === (seen1 & 2))
      $this.iob_1 = null;
    else
      $this.iob_1 = span;
    if (0 === (seen1 & 4))
      $this.job_1 = null;
    else
      $this.job_1 = orderedList;
    return $this;
  }
  function ListItem_init_$Create$(seen1, anchor, span, orderedList, serializationConstructorMarker) {
    return ListItem_init_$Init$(seen1, anchor, span, orderedList, serializationConstructorMarker, objectCreate(protoOf(ListItem)));
  }
  function ListItem(anchor, span, orderedList) {
    anchor = anchor === VOID ? null : anchor;
    span = span === VOID ? null : span;
    orderedList = orderedList === VOID ? null : orderedList;
    this.hob_1 = anchor;
    this.iob_1 = span;
    this.job_1 = orderedList;
  }
  function Companion_8() {
  }
  protoOf(Companion_8).n4r = function () {
    return $serializer_getInstance_15();
  };
  var Companion_instance_57;
  function Companion_getInstance_25() {
    return Companion_instance_57;
  }
  function $serializer_3() {
    $serializer_instance_3 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavElement', this, 2);
    tmp0_serialDesc.t4f('epubType', true);
    tmp0_serialDesc.u4f(new XmlSerialName('type', 'http://www.idpf.org/2007/ops'));
    tmp0_serialDesc.t4f('orderedList', false);
    tmp0_serialDesc.v4f(new XmlSerialName('nav', 'http://www.w3.org/1999/xhtml'));
    this.kob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_3).q44 = function () {
    return this.kob_1;
  };
  protoOf($serializer_3).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), $serializer_getInstance_17()];
  };
  protoOf($serializer_3).s44 = function (decoder) {
    var tmp0_desc = this.kob_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return NavElement_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_3).lob = function (encoder, value) {
    var tmp0_desc = this.kob_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.mob_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.mob_1);
    }
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_17(), value.nob_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_3).r44 = function (encoder, value) {
    return this.lob(encoder, value instanceof NavElement ? value : THROW_CCE());
  };
  var $serializer_instance_3;
  function $serializer_getInstance_15() {
    if ($serializer_instance_3 == null)
      new $serializer_3();
    return $serializer_instance_3;
  }
  function NavElement_init_$Init$(seen1, epubType, orderedList, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_15().kob_1);
    }
    if (0 === (seen1 & 1))
      $this.mob_1 = null;
    else
      $this.mob_1 = epubType;
    $this.nob_1 = orderedList;
    return $this;
  }
  function NavElement_init_$Create$(seen1, epubType, orderedList, serializationConstructorMarker) {
    return NavElement_init_$Init$(seen1, epubType, orderedList, serializationConstructorMarker, objectCreate(protoOf(NavElement)));
  }
  function NavElement() {
  }
  function Companion_9() {
    this.oob_1 = 'http://www.w3.org/1999/xhtml';
    this.pob_1 = 'http://www.idpf.org/2007/ops';
  }
  var Companion_instance_58;
  function Companion_getInstance_26() {
    return Companion_instance_58;
  }
  function $serializer_4() {
    $serializer_instance_4 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavigationDocument', this, 1);
    tmp0_serialDesc.t4f('bodyElement', false);
    tmp0_serialDesc.v4f(new XmlSerialName('html', 'http://www.w3.org/1999/xhtml'));
    this.qob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_4).q44 = function () {
    return this.qob_1;
  };
  protoOf($serializer_4).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BodySerializer_instance];
  };
  protoOf($serializer_4).s44 = function (decoder) {
    var tmp0_desc = this.qob_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, BodySerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, BodySerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return NavigationDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_4).rob = function (encoder, value) {
    var tmp0_desc = this.qob_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, BodySerializer_instance, value.sob_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_4).r44 = function (encoder, value) {
    return this.rob(encoder, value instanceof NavigationDocument ? value : THROW_CCE());
  };
  var $serializer_instance_4;
  function $serializer_getInstance_16() {
    if ($serializer_instance_4 == null)
      new $serializer_4();
    return $serializer_instance_4;
  }
  function NavigationDocument_init_$Init$(seen1, bodyElement, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_16().qob_1);
    }
    $this.sob_1 = bodyElement;
    return $this;
  }
  function NavigationDocument_init_$Create$(seen1, bodyElement, serializationConstructorMarker) {
    return NavigationDocument_init_$Init$(seen1, bodyElement, serializationConstructorMarker, objectCreate(protoOf(NavigationDocument)));
  }
  function NavigationDocument(bodyElement) {
    this.sob_1 = bodyElement;
  }
  function Companion_10() {
    Companion_instance_59 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.tob_1 = [new ArrayListSerializer($serializer_getInstance_14())];
  }
  var Companion_instance_59;
  function Companion_getInstance_27() {
    if (Companion_instance_59 == null)
      new Companion_10();
    return Companion_instance_59;
  }
  function $serializer_5() {
    $serializer_instance_5 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.OrderedList', this, 1);
    tmp0_serialDesc.t4f('listItems', false);
    tmp0_serialDesc.v4f(new XmlSerialName('ol', 'http://www.w3.org/1999/xhtml'));
    this.uob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_5).q44 = function () {
    return this.uob_1;
  };
  protoOf($serializer_5).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_27().tob_1[0]];
  };
  protoOf($serializer_5).s44 = function (decoder) {
    var tmp0_desc = this.uob_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_27().tob_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return OrderedList_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_5).vob = function (encoder, value) {
    var tmp0_desc = this.uob_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_27().tob_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.wob_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_5).r44 = function (encoder, value) {
    return this.vob(encoder, value instanceof OrderedList ? value : THROW_CCE());
  };
  var $serializer_instance_5;
  function $serializer_getInstance_17() {
    if ($serializer_instance_5 == null)
      new $serializer_5();
    return $serializer_instance_5;
  }
  function OrderedList_init_$Init$(seen1, listItems, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_17().uob_1);
    }
    $this.wob_1 = listItems;
    return $this;
  }
  function OrderedList_init_$Create$(seen1, listItems, serializationConstructorMarker) {
    return OrderedList_init_$Init$(seen1, listItems, serializationConstructorMarker, objectCreate(protoOf(OrderedList)));
  }
  function OrderedList() {
  }
  function Companion_11() {
  }
  protoOf(Companion_11).n4r = function () {
    return SpanSerializer_getInstance();
  };
  var Companion_instance_60;
  function Companion_getInstance_28() {
    return Companion_instance_60;
  }
  function Span(content) {
    content = content === VOID ? '' : content;
    this.xob_1 = content;
  }
  function deserializeDynamic_0($this, reader) {
    // Inline function 'kotlin.text.trim' call
    var this_0 = xhtmlContentToText(reader);
    var text = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
    return new Span(text);
  }
  function SpanSerializer() {
    SpanSerializer_instance = this;
    this.yob_1 = buildClassSerialDescriptor('span', []);
  }
  protoOf(SpanSerializer).q44 = function () {
    return this.yob_1;
  };
  protoOf(SpanSerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic_0(this, decoder.nlf());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = AnchorSerializer_getInstance().zoa_1;
      var composite = decoder.i48(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.SpanSerializer.deserialize.<anonymous>' call
      var result = composite.v48(AnchorSerializer_getInstance().zoa_1, 0, Companion_instance_60.n4r());
      composite.j48(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(SpanSerializer).zob = function (encoder, value) {
    encoder.z49(Companion_instance_60.n4r(), value);
  };
  protoOf(SpanSerializer).r44 = function (encoder, value) {
    return this.zob(encoder, value instanceof Span ? value : THROW_CCE());
  };
  var SpanSerializer_instance;
  function SpanSerializer_getInstance() {
    if (SpanSerializer_instance == null)
      new SpanSerializer();
    return SpanSerializer_instance;
  }
  function $serializer_6() {
    $serializer_instance_6 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Content', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('src', false);
    tmp0_serialDesc.v4f(new XmlSerialName('content', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.aoc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_6).q44 = function () {
    return this.aoc_1;
  };
  protoOf($serializer_6).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_6).s44 = function (decoder) {
    var tmp0_desc = this.aoc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return Content_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_6).boc = function (encoder, value) {
    var tmp0_desc = this.aoc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.coc_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.coc_1);
    }
    tmp1_output.w49(tmp0_desc, 1, value.doc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_6).r44 = function (encoder, value) {
    return this.boc(encoder, value instanceof Content ? value : THROW_CCE());
  };
  var $serializer_instance_6;
  function $serializer_getInstance_18() {
    if ($serializer_instance_6 == null)
      new $serializer_6();
    return $serializer_instance_6;
  }
  function Content_init_$Init$(seen1, id, src, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_18().aoc_1);
    }
    if (0 === (seen1 & 1))
      $this.coc_1 = null;
    else
      $this.coc_1 = id;
    $this.doc_1 = src;
    return $this;
  }
  function Content_init_$Create$(seen1, id, src, serializationConstructorMarker) {
    return Content_init_$Init$(seen1, id, src, serializationConstructorMarker, objectCreate(protoOf(Content)));
  }
  function Content() {
  }
  function Companion_12() {
    Companion_instance_61 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.eoc_1 = [new ArrayListSerializer($serializer_getInstance_25())];
  }
  var Companion_instance_61;
  function Companion_getInstance_29() {
    if (Companion_instance_61 == null)
      new Companion_12();
    return Companion_instance_61;
  }
  function $serializer_7() {
    $serializer_instance_7 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.DocTitle', this, 1);
    tmp0_serialDesc.t4f('texts', false);
    tmp0_serialDesc.v4f(new XmlSerialName('docTitle', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.foc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_7).q44 = function () {
    return this.foc_1;
  };
  protoOf($serializer_7).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_29().eoc_1[0]];
  };
  protoOf($serializer_7).s44 = function (decoder) {
    var tmp0_desc = this.foc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_29().eoc_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return DocTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_7).goc = function (encoder, value) {
    var tmp0_desc = this.foc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_29().eoc_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.hoc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_7).r44 = function (encoder, value) {
    return this.goc(encoder, value instanceof DocTitle ? value : THROW_CCE());
  };
  var $serializer_instance_7;
  function $serializer_getInstance_19() {
    if ($serializer_instance_7 == null)
      new $serializer_7();
    return $serializer_instance_7;
  }
  function DocTitle_init_$Init$(seen1, texts, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_19().foc_1);
    }
    $this.hoc_1 = texts;
    return $this;
  }
  function DocTitle_init_$Create$(seen1, texts, serializationConstructorMarker) {
    return DocTitle_init_$Init$(seen1, texts, serializationConstructorMarker, objectCreate(protoOf(DocTitle)));
  }
  function DocTitle() {
  }
  function Companion_13() {
    Companion_instance_62 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ioc_1 = [new ArrayListSerializer($serializer_getInstance_35())];
  }
  var Companion_instance_62;
  function Companion_getInstance_30() {
    if (Companion_instance_62 == null)
      new Companion_13();
    return Companion_instance_62;
  }
  function $serializer_8() {
    $serializer_instance_8 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Head', this, 1);
    tmp0_serialDesc.t4f('metadata', true);
    tmp0_serialDesc.v4f(new XmlSerialName('head', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.joc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_8).q44 = function () {
    return this.joc_1;
  };
  protoOf($serializer_8).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_30().ioc_1[0]];
  };
  protoOf($serializer_8).s44 = function (decoder) {
    var tmp0_desc = this.joc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_30().ioc_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return Head_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_8).koc = function (encoder, value) {
    var tmp0_desc = this.joc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_30().ioc_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.loc_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.loc_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_8).r44 = function (encoder, value) {
    return this.koc(encoder, value instanceof Head ? value : THROW_CCE());
  };
  var $serializer_instance_8;
  function $serializer_getInstance_20() {
    if ($serializer_instance_8 == null)
      new $serializer_8();
    return $serializer_instance_8;
  }
  function Head_init_$Init$(seen1, metadata, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_20().joc_1);
    }
    if (0 === (seen1 & 1))
      $this.loc_1 = emptyList();
    else
      $this.loc_1 = metadata;
    return $this;
  }
  function Head_init_$Create$(seen1, metadata, serializationConstructorMarker) {
    return Head_init_$Init$(seen1, metadata, serializationConstructorMarker, objectCreate(protoOf(Head)));
  }
  function Head(metadata) {
    Companion_getInstance_30();
    metadata = metadata === VOID ? emptyList() : metadata;
    this.loc_1 = metadata;
  }
  function $serializer_9() {
    $serializer_instance_9 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavLabel', this, 1);
    tmp0_serialDesc.t4f('text', false);
    tmp0_serialDesc.v4f(new XmlSerialName('navLabel', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.moc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_9).q44 = function () {
    return this.moc_1;
  };
  protoOf($serializer_9).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_25()];
  };
  protoOf($serializer_9).s44 = function (decoder) {
    var tmp0_desc = this.moc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, $serializer_getInstance_25(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, $serializer_getInstance_25(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return NavLabel_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_9).noc = function (encoder, value) {
    var tmp0_desc = this.moc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_25(), value.ooc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_9).r44 = function (encoder, value) {
    return this.noc(encoder, value instanceof NavLabel ? value : THROW_CCE());
  };
  var $serializer_instance_9;
  function $serializer_getInstance_21() {
    if ($serializer_instance_9 == null)
      new $serializer_9();
    return $serializer_instance_9;
  }
  function NavLabel_init_$Init$(seen1, text, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_21().moc_1);
    }
    $this.ooc_1 = text;
    return $this;
  }
  function NavLabel_init_$Create$(seen1, text, serializationConstructorMarker) {
    return NavLabel_init_$Init$(seen1, text, serializationConstructorMarker, objectCreate(protoOf(NavLabel)));
  }
  function NavLabel() {
  }
  function Companion_14() {
    Companion_instance_63 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.poc_1 = [new ArrayListSerializer($serializer_getInstance_23())];
  }
  var Companion_instance_63;
  function Companion_getInstance_31() {
    if (Companion_instance_63 == null)
      new Companion_14();
    return Companion_instance_63;
  }
  function $serializer_10() {
    $serializer_instance_10 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavMap', this, 1);
    tmp0_serialDesc.t4f('navPoints', false);
    tmp0_serialDesc.v4f(new XmlSerialName('navMap', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.qoc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_10).q44 = function () {
    return this.qoc_1;
  };
  protoOf($serializer_10).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_31().poc_1[0]];
  };
  protoOf($serializer_10).s44 = function (decoder) {
    var tmp0_desc = this.qoc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_31().poc_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return NavMap_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_10).roc = function (encoder, value) {
    var tmp0_desc = this.qoc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_31().poc_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.soc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_10).r44 = function (encoder, value) {
    return this.roc(encoder, value instanceof NavMap ? value : THROW_CCE());
  };
  var $serializer_instance_10;
  function $serializer_getInstance_22() {
    if ($serializer_instance_10 == null)
      new $serializer_10();
    return $serializer_instance_10;
  }
  function NavMap_init_$Init$(seen1, navPoints, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_22().qoc_1);
    }
    $this.soc_1 = navPoints;
    return $this;
  }
  function NavMap_init_$Create$(seen1, navPoints, serializationConstructorMarker) {
    return NavMap_init_$Init$(seen1, navPoints, serializationConstructorMarker, objectCreate(protoOf(NavMap)));
  }
  function NavMap() {
  }
  function Companion_15() {
    Companion_instance_64 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.toc_1 = [new ArrayListSerializer($serializer_getInstance_21()), null, null, null];
  }
  var Companion_instance_64;
  function Companion_getInstance_32() {
    if (Companion_instance_64 == null)
      new Companion_15();
    return Companion_instance_64;
  }
  function $serializer_11() {
    $serializer_instance_11 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavPoint', this, 4);
    tmp0_serialDesc.t4f('navLabels', false);
    tmp0_serialDesc.t4f('content', false);
    tmp0_serialDesc.t4f('id', false);
    tmp0_serialDesc.t4f('childPoints', false);
    tmp0_serialDesc.v4f(new XmlSerialName('navPoint', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.uoc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_11).q44 = function () {
    return this.uoc_1;
  };
  protoOf($serializer_11).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_32().toc_1[0], $serializer_getInstance_18(), StringSerializer_getInstance(), new ArrayListSerializer($serializer_getInstance_23())];
  };
  protoOf($serializer_11).s44 = function (decoder) {
    var tmp0_desc = this.uoc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    var tmp9_cached = Companion_getInstance_32().toc_1;
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.u48(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.u48(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.u48(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.u48(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return NavPoint_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_11).voc = function (encoder, value) {
    var tmp0_desc = this.uoc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_32().toc_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.woc_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_18(), value.xoc_1);
    tmp1_output.w49(tmp0_desc, 2, value.yoc_1);
    tmp1_output.y49(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), value.zoc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_11).r44 = function (encoder, value) {
    return this.voc(encoder, value instanceof NavPoint ? value : THROW_CCE());
  };
  var $serializer_instance_11;
  function $serializer_getInstance_23() {
    if ($serializer_instance_11 == null)
      new $serializer_11();
    return $serializer_instance_11;
  }
  function NavPoint_init_$Init$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_23().uoc_1);
    }
    $this.woc_1 = navLabels;
    $this.xoc_1 = content;
    $this.yoc_1 = id;
    $this.zoc_1 = childPoints;
    return $this;
  }
  function NavPoint_init_$Create$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker) {
    return NavPoint_init_$Init$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker, objectCreate(protoOf(NavPoint)));
  }
  function NavPoint() {
  }
  function Companion_16() {
    this.aod_1 = 'http://www.daisy.org/z3986/2005/ncx/';
    this.bod_1 = 'application/x-dtbncx+xml';
  }
  var Companion_instance_65;
  function Companion_getInstance_33() {
    return Companion_instance_65;
  }
  function $serializer_12() {
    $serializer_instance_12 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NcxDocument', this, 3);
    tmp0_serialDesc.t4f('head', false);
    tmp0_serialDesc.t4f('docTitle', false);
    tmp0_serialDesc.t4f('navMap', false);
    tmp0_serialDesc.v4f(new XmlSerialName('ncx', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.cod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_12).q44 = function () {
    return this.cod_1;
  };
  protoOf($serializer_12).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_20(), $serializer_getInstance_19(), $serializer_getInstance_22()];
  };
  protoOf($serializer_12).s44 = function (decoder) {
    var tmp0_desc = this.cod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.u48(tmp0_desc, 0, $serializer_getInstance_20(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, $serializer_getInstance_22(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.u48(tmp0_desc, 0, $serializer_getInstance_20(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, $serializer_getInstance_22(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return NcxDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_12).dod = function (encoder, value) {
    var tmp0_desc = this.cod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_20(), value.eod_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_19(), value.fod_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_22(), value.god_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_12).r44 = function (encoder, value) {
    return this.dod(encoder, value instanceof NcxDocument ? value : THROW_CCE());
  };
  var $serializer_instance_12;
  function $serializer_getInstance_24() {
    if ($serializer_instance_12 == null)
      new $serializer_12();
    return $serializer_instance_12;
  }
  function NcxDocument_init_$Init$(seen1, head, docTitle, navMap, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_24().cod_1);
    }
    $this.eod_1 = head;
    $this.fod_1 = docTitle;
    $this.god_1 = navMap;
    return $this;
  }
  function NcxDocument_init_$Create$(seen1, head, docTitle, navMap, serializationConstructorMarker) {
    return NcxDocument_init_$Init$(seen1, head, docTitle, navMap, serializationConstructorMarker, objectCreate(protoOf(NcxDocument)));
  }
  function NcxDocument(head, docTitle, navMap) {
    this.eod_1 = head;
    this.fod_1 = docTitle;
    this.god_1 = navMap;
  }
  function Companion_17() {
  }
  var Companion_instance_66;
  function Companion_getInstance_34() {
    return Companion_instance_66;
  }
  function $serializer_13() {
    $serializer_instance_13 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Text', this, 1);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('text', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.hod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_13).q44 = function () {
    return this.hod_1;
  };
  protoOf($serializer_13).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_13).s44 = function (decoder) {
    var tmp0_desc = this.hod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return Text_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_13).iod = function (encoder, value) {
    var tmp0_desc = this.hod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.jod_1 === '')) {
      tmp1_output.w49(tmp0_desc, 0, value.jod_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_13).r44 = function (encoder, value) {
    return this.iod(encoder, value instanceof Text ? value : THROW_CCE());
  };
  var $serializer_instance_13;
  function $serializer_getInstance_25() {
    if ($serializer_instance_13 == null)
      new $serializer_13();
    return $serializer_instance_13;
  }
  function Text_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_25().hod_1);
    }
    if (0 === (seen1 & 1))
      $this.jod_1 = '';
    else
      $this.jod_1 = content;
    return $this;
  }
  function Text_init_$Create$(seen1, content, serializationConstructorMarker) {
    return Text_init_$Init$(seen1, content, serializationConstructorMarker, objectCreate(protoOf(Text)));
  }
  function Text(content) {
    content = content === VOID ? '' : content;
    this.jod_1 = content;
  }
  function Companion_18() {
  }
  var Companion_instance_67;
  function Companion_getInstance_35() {
    return Companion_instance_67;
  }
  function $serializer_14() {
    $serializer_instance_14 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcCreator', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('creator', 'http://purl.org/dc/elements/1.1/'));
    this.kod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_14).q44 = function () {
    return this.kod_1;
  };
  protoOf($serializer_14).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_14).s44 = function (decoder) {
    var tmp0_desc = this.kod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return DcCreator_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_14).lod = function (encoder, value) {
    var tmp0_desc = this.kod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.mod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.mod_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.nod_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.nod_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_14).r44 = function (encoder, value) {
    return this.lod(encoder, value instanceof DcCreator ? value : THROW_CCE());
  };
  var $serializer_instance_14;
  function $serializer_getInstance_26() {
    if ($serializer_instance_14 == null)
      new $serializer_14();
    return $serializer_instance_14;
  }
  function DcCreator_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_26().kod_1);
    }
    if (0 === (seen1 & 1))
      $this.mod_1 = null;
    else
      $this.mod_1 = id;
    if (0 === (seen1 & 2))
      $this.nod_1 = '';
    else
      $this.nod_1 = content;
    return $this;
  }
  function DcCreator_init_$Create$(seen1, id, content, serializationConstructorMarker) {
    return DcCreator_init_$Init$(seen1, id, content, serializationConstructorMarker, objectCreate(protoOf(DcCreator)));
  }
  function DcCreator(id, content) {
    id = id === VOID ? null : id;
    content = content === VOID ? '' : content;
    this.mod_1 = id;
    this.nod_1 = content;
  }
  function Companion_19() {
  }
  var Companion_instance_68;
  function Companion_getInstance_36() {
    return Companion_instance_68;
  }
  function $serializer_15() {
    $serializer_instance_15 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcDescription', this, 2);
    tmp0_serialDesc.t4f('lang', true);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('description', 'http://purl.org/dc/elements/1.1/'));
    this.ood_1 = tmp0_serialDesc;
  }
  protoOf($serializer_15).q44 = function () {
    return this.ood_1;
  };
  protoOf($serializer_15).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_15).s44 = function (decoder) {
    var tmp0_desc = this.ood_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return DcDescription_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_15).pod = function (encoder, value) {
    var tmp0_desc = this.ood_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.qod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.qod_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.rod_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.rod_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_15).r44 = function (encoder, value) {
    return this.pod(encoder, value instanceof DcDescription ? value : THROW_CCE());
  };
  var $serializer_instance_15;
  function $serializer_getInstance_27() {
    if ($serializer_instance_15 == null)
      new $serializer_15();
    return $serializer_instance_15;
  }
  function DcDescription_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_27().ood_1);
    }
    if (0 === (seen1 & 1))
      $this.qod_1 = null;
    else
      $this.qod_1 = lang;
    if (0 === (seen1 & 2))
      $this.rod_1 = '';
    else
      $this.rod_1 = content;
    return $this;
  }
  function DcDescription_init_$Create$(seen1, lang, content, serializationConstructorMarker) {
    return DcDescription_init_$Init$(seen1, lang, content, serializationConstructorMarker, objectCreate(protoOf(DcDescription)));
  }
  function DcDescription(lang, content) {
    lang = lang === VOID ? null : lang;
    content = content === VOID ? '' : content;
    this.qod_1 = lang;
    this.rod_1 = content;
  }
  function Companion_20() {
  }
  var Companion_instance_69;
  function Companion_getInstance_37() {
    return Companion_instance_69;
  }
  function $serializer_16() {
    $serializer_instance_16 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcIdentifier', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('identifier', 'http://purl.org/dc/elements/1.1/'));
    this.sod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_16).q44 = function () {
    return this.sod_1;
  };
  protoOf($serializer_16).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_16).s44 = function (decoder) {
    var tmp0_desc = this.sod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return DcIdentifier_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_16).tod = function (encoder, value) {
    var tmp0_desc = this.sod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.uod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.uod_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.vod_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.vod_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_16).r44 = function (encoder, value) {
    return this.tod(encoder, value instanceof DcIdentifier ? value : THROW_CCE());
  };
  var $serializer_instance_16;
  function $serializer_getInstance_28() {
    if ($serializer_instance_16 == null)
      new $serializer_16();
    return $serializer_instance_16;
  }
  function DcIdentifier_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_28().sod_1);
    }
    if (0 === (seen1 & 1))
      $this.uod_1 = null;
    else
      $this.uod_1 = id;
    if (0 === (seen1 & 2))
      $this.vod_1 = '';
    else
      $this.vod_1 = content;
    return $this;
  }
  function DcIdentifier_init_$Create$(seen1, id, content, serializationConstructorMarker) {
    return DcIdentifier_init_$Init$(seen1, id, content, serializationConstructorMarker, objectCreate(protoOf(DcIdentifier)));
  }
  function DcIdentifier(id, content) {
    id = id === VOID ? null : id;
    content = content === VOID ? '' : content;
    this.uod_1 = id;
    this.vod_1 = content;
  }
  function $serializer_17() {
    $serializer_instance_17 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcLanguage', this, 1);
    tmp0_serialDesc.t4f('content', false);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('language', 'http://purl.org/dc/elements/1.1/'));
    this.wod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_17).q44 = function () {
    return this.wod_1;
  };
  protoOf($serializer_17).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_17).s44 = function (decoder) {
    var tmp0_desc = this.wod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return DcLanguage_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_17).xod = function (encoder, value) {
    var tmp0_desc = this.wod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.yod_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_17).r44 = function (encoder, value) {
    return this.xod(encoder, value instanceof DcLanguage ? value : THROW_CCE());
  };
  var $serializer_instance_17;
  function $serializer_getInstance_29() {
    if ($serializer_instance_17 == null)
      new $serializer_17();
    return $serializer_instance_17;
  }
  function DcLanguage_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_29().wod_1);
    }
    $this.yod_1 = content;
    return $this;
  }
  function DcLanguage_init_$Create$(seen1, content, serializationConstructorMarker) {
    return DcLanguage_init_$Init$(seen1, content, serializationConstructorMarker, objectCreate(protoOf(DcLanguage)));
  }
  function DcLanguage() {
  }
  function Companion_21() {
  }
  var Companion_instance_70;
  function Companion_getInstance_38() {
    return Companion_instance_70;
  }
  function $serializer_18() {
    $serializer_instance_18 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcTitle', this, 2);
    tmp0_serialDesc.t4f('lang', true);
    tmp0_serialDesc.u4f(new XmlSerialName(VOID, VOID, 'xml'));
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('title', 'http://purl.org/dc/elements/1.1/'));
    this.zod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_18).q44 = function () {
    return this.zod_1;
  };
  protoOf($serializer_18).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_18).s44 = function (decoder) {
    var tmp0_desc = this.zod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return DcTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_18).aoe = function (encoder, value) {
    var tmp0_desc = this.zod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.boe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.boe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.coe_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.coe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_18).r44 = function (encoder, value) {
    return this.aoe(encoder, value instanceof DcTitle ? value : THROW_CCE());
  };
  var $serializer_instance_18;
  function $serializer_getInstance_30() {
    if ($serializer_instance_18 == null)
      new $serializer_18();
    return $serializer_instance_18;
  }
  function DcTitle_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_30().zod_1);
    }
    if (0 === (seen1 & 1))
      $this.boe_1 = null;
    else
      $this.boe_1 = lang;
    if (0 === (seen1 & 2))
      $this.coe_1 = '';
    else
      $this.coe_1 = content;
    return $this;
  }
  function DcTitle_init_$Create$(seen1, lang, content, serializationConstructorMarker) {
    return DcTitle_init_$Init$(seen1, lang, content, serializationConstructorMarker, objectCreate(protoOf(DcTitle)));
  }
  function DcTitle(lang, content) {
    lang = lang === VOID ? null : lang;
    content = content === VOID ? '' : content;
    this.boe_1 = lang;
    this.coe_1 = content;
  }
  function $serializer_19() {
    $serializer_instance_19 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Item', this, 4);
    tmp0_serialDesc.t4f('id', false);
    tmp0_serialDesc.t4f('href', false);
    tmp0_serialDesc.t4f('properties', true);
    tmp0_serialDesc.t4f('mediaType', false);
    tmp0_serialDesc.u4f(new XmlSerialName('media-type'));
    tmp0_serialDesc.v4f(new XmlSerialName('item', 'http://www.idpf.org/2007/opf'));
    this.doe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_19).q44 = function () {
    return this.doe_1;
  };
  protoOf($serializer_19).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_19).s44 = function (decoder) {
    var tmp0_desc = this.doe_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return Item_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_19).eoe = function (encoder, value) {
    var tmp0_desc = this.doe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.foe_1);
    tmp1_output.w49(tmp0_desc, 1, value.goe_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.hoe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.hoe_1);
    }
    tmp1_output.w49(tmp0_desc, 3, value.ioe_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_19).r44 = function (encoder, value) {
    return this.eoe(encoder, value instanceof Item ? value : THROW_CCE());
  };
  var $serializer_instance_19;
  function $serializer_getInstance_31() {
    if ($serializer_instance_19 == null)
      new $serializer_19();
    return $serializer_instance_19;
  }
  function Item_init_$Init$(seen1, id, href, properties, mediaType, serializationConstructorMarker, $this) {
    if (!(11 === (11 & seen1))) {
      throwMissingFieldException(seen1, 11, $serializer_getInstance_31().doe_1);
    }
    $this.foe_1 = id;
    $this.goe_1 = href;
    if (0 === (seen1 & 4))
      $this.hoe_1 = null;
    else
      $this.hoe_1 = properties;
    $this.ioe_1 = mediaType;
    return $this;
  }
  function Item_init_$Create$(seen1, id, href, properties, mediaType, serializationConstructorMarker) {
    return Item_init_$Init$(seen1, id, href, properties, mediaType, serializationConstructorMarker, objectCreate(protoOf(Item)));
  }
  function Item() {
  }
  function Companion_22() {
  }
  var Companion_instance_71;
  function Companion_getInstance_39() {
    return Companion_instance_71;
  }
  function $serializer_20() {
    $serializer_instance_20 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.ItemRef', this, 1);
    tmp0_serialDesc.t4f('idRef', true);
    tmp0_serialDesc.u4f(new XmlSerialName('idref'));
    tmp0_serialDesc.v4f(new XmlSerialName('itemref', 'http://www.idpf.org/2007/opf'));
    this.joe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_20).q44 = function () {
    return this.joe_1;
  };
  protoOf($serializer_20).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_20).s44 = function (decoder) {
    var tmp0_desc = this.joe_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return ItemRef_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_20).koe = function (encoder, value) {
    var tmp0_desc = this.joe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.loe_1 === '')) {
      tmp1_output.w49(tmp0_desc, 0, value.loe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_20).r44 = function (encoder, value) {
    return this.koe(encoder, value instanceof ItemRef ? value : THROW_CCE());
  };
  var $serializer_instance_20;
  function $serializer_getInstance_32() {
    if ($serializer_instance_20 == null)
      new $serializer_20();
    return $serializer_instance_20;
  }
  function ItemRef_init_$Init$(seen1, idRef, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_32().joe_1);
    }
    if (0 === (seen1 & 1))
      $this.loe_1 = '';
    else
      $this.loe_1 = idRef;
    return $this;
  }
  function ItemRef_init_$Create$(seen1, idRef, serializationConstructorMarker) {
    return ItemRef_init_$Init$(seen1, idRef, serializationConstructorMarker, objectCreate(protoOf(ItemRef)));
  }
  function ItemRef(idRef) {
    idRef = idRef === VOID ? '' : idRef;
    this.loe_1 = idRef;
  }
  function Companion_23() {
    Companion_instance_72 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.moe_1 = [new ArrayListSerializer($serializer_getInstance_31())];
  }
  var Companion_instance_72;
  function Companion_getInstance_40() {
    if (Companion_instance_72 == null)
      new Companion_23();
    return Companion_instance_72;
  }
  function $serializer_21() {
    $serializer_instance_21 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Manifest', this, 1);
    tmp0_serialDesc.t4f('items', true);
    tmp0_serialDesc.v4f(new XmlSerialName('manifest', 'http://www.idpf.org/2007/opf'));
    this.noe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_21).q44 = function () {
    return this.noe_1;
  };
  protoOf($serializer_21).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_40().moe_1[0]];
  };
  protoOf($serializer_21).s44 = function (decoder) {
    var tmp0_desc = this.noe_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_40().moe_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return Manifest_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_21).ooe = function (encoder, value) {
    var tmp0_desc = this.noe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_40().moe_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.poe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.poe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_21).r44 = function (encoder, value) {
    return this.ooe(encoder, value instanceof Manifest ? value : THROW_CCE());
  };
  var $serializer_instance_21;
  function $serializer_getInstance_33() {
    if ($serializer_instance_21 == null)
      new $serializer_21();
    return $serializer_instance_21;
  }
  function Manifest_init_$Init$(seen1, items, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_33().noe_1);
    }
    if (0 === (seen1 & 1))
      $this.poe_1 = emptyList();
    else
      $this.poe_1 = items;
    return $this;
  }
  function Manifest_init_$Create$(seen1, items, serializationConstructorMarker) {
    return Manifest_init_$Init$(seen1, items, serializationConstructorMarker, objectCreate(protoOf(Manifest)));
  }
  function Manifest(items) {
    Companion_getInstance_40();
    items = items === VOID ? emptyList() : items;
    this.poe_1 = items;
  }
  function Companion_24() {
  }
  var Companion_instance_73;
  function Companion_getInstance_41() {
    return Companion_instance_73;
  }
  function $serializer_22() {
    $serializer_instance_22 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Meta', this, 2);
    tmp0_serialDesc.t4f('name', true);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.v4f(new XmlSerialName('meta', 'http://www.idpf.org/2007/opf'));
    this.qoe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_22).q44 = function () {
    return this.qoe_1;
  };
  protoOf($serializer_22).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_22).s44 = function (decoder) {
    var tmp0_desc = this.qoe_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return Meta_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_22).roe = function (encoder, value) {
    var tmp0_desc = this.qoe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.soe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.soe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.toe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.toe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_22).r44 = function (encoder, value) {
    return this.roe(encoder, value instanceof Meta ? value : THROW_CCE());
  };
  var $serializer_instance_22;
  function $serializer_getInstance_34() {
    if ($serializer_instance_22 == null)
      new $serializer_22();
    return $serializer_instance_22;
  }
  function Meta_init_$Init$(seen1, name, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_34().qoe_1);
    }
    if (0 === (seen1 & 1))
      $this.soe_1 = null;
    else
      $this.soe_1 = name;
    if (0 === (seen1 & 2))
      $this.toe_1 = null;
    else
      $this.toe_1 = content;
    return $this;
  }
  function Meta_init_$Create$(seen1, name, content, serializationConstructorMarker) {
    return Meta_init_$Init$(seen1, name, content, serializationConstructorMarker, objectCreate(protoOf(Meta)));
  }
  function Meta(name, content) {
    name = name === VOID ? null : name;
    content = content === VOID ? null : content;
    this.soe_1 = name;
    this.toe_1 = content;
  }
  function Companion_25() {
    Companion_instance_74 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.uoe_1 = [new ArrayListSerializer($serializer_getInstance_30()), new ArrayListSerializer($serializer_getInstance_26()), new ArrayListSerializer($serializer_getInstance_29()), new ArrayListSerializer($serializer_getInstance_27()), new ArrayListSerializer($serializer_getInstance_28()), new ArrayListSerializer($serializer_getInstance_34())];
  }
  var Companion_instance_74;
  function Companion_getInstance_42() {
    if (Companion_instance_74 == null)
      new Companion_25();
    return Companion_instance_74;
  }
  function $serializer_23() {
    $serializer_instance_23 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Metadata', this, 6);
    tmp0_serialDesc.t4f('titles', true);
    tmp0_serialDesc.t4f('creators', true);
    tmp0_serialDesc.t4f('languages', true);
    tmp0_serialDesc.t4f('descriptions', true);
    tmp0_serialDesc.t4f('identifiers', true);
    tmp0_serialDesc.t4f('metas', true);
    tmp0_serialDesc.v4f(new XmlSerialName('metadata', 'http://www.idpf.org/2007/opf'));
    this.voe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_23).q44 = function () {
    return this.voe_1;
  };
  protoOf($serializer_23).k4g = function () {
    var tmp0_cached = Companion_getInstance_42().uoe_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [tmp0_cached[0], tmp0_cached[1], tmp0_cached[2], tmp0_cached[3], tmp0_cached[4], tmp0_cached[5]];
  };
  protoOf($serializer_23).s44 = function (decoder) {
    var tmp0_desc = this.voe_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.i48(tmp0_desc);
    var tmp11_cached = Companion_getInstance_42().uoe_1;
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.u48(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.u48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.u48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.u48(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.u48(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.u48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.u48(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.u48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.u48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.u48(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.u48(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.u48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return Metadata_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_23).woe = function (encoder, value) {
    var tmp0_desc = this.voe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_42().uoe_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.xoe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.xoe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !equals(value.yoe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.yoe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !equals(value.zoe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.zoe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !equals(value.aof_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 3, tmp2_cached[3], value.aof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !equals(value.bof_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 4, tmp2_cached[4], value.bof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !equals(value.cof_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 5, tmp2_cached[5], value.cof_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_23).r44 = function (encoder, value) {
    return this.woe(encoder, value instanceof Metadata ? value : THROW_CCE());
  };
  var $serializer_instance_23;
  function $serializer_getInstance_35() {
    if ($serializer_instance_23 == null)
      new $serializer_23();
    return $serializer_instance_23;
  }
  function Metadata_init_$Init$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_35().voe_1);
    }
    if (0 === (seen1 & 1))
      $this.xoe_1 = emptyList();
    else
      $this.xoe_1 = titles;
    if (0 === (seen1 & 2))
      $this.yoe_1 = emptyList();
    else
      $this.yoe_1 = creators;
    if (0 === (seen1 & 4))
      $this.zoe_1 = emptyList();
    else
      $this.zoe_1 = languages;
    if (0 === (seen1 & 8))
      $this.aof_1 = emptyList();
    else
      $this.aof_1 = descriptions;
    if (0 === (seen1 & 16))
      $this.bof_1 = emptyList();
    else
      $this.bof_1 = identifiers;
    if (0 === (seen1 & 32))
      $this.cof_1 = emptyList();
    else
      $this.cof_1 = metas;
    return $this;
  }
  function Metadata_init_$Create$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker) {
    return Metadata_init_$Init$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker, objectCreate(protoOf(Metadata)));
  }
  function Metadata(titles, creators, languages, descriptions, identifiers, metas) {
    Companion_getInstance_42();
    titles = titles === VOID ? emptyList() : titles;
    creators = creators === VOID ? emptyList() : creators;
    languages = languages === VOID ? emptyList() : languages;
    descriptions = descriptions === VOID ? emptyList() : descriptions;
    identifiers = identifiers === VOID ? emptyList() : identifiers;
    metas = metas === VOID ? emptyList() : metas;
    this.xoe_1 = titles;
    this.yoe_1 = creators;
    this.zoe_1 = languages;
    this.aof_1 = descriptions;
    this.bof_1 = identifiers;
    this.cof_1 = metas;
  }
  function Companion_26() {
    this.dof_1 = 'http://www.idpf.org/2007/opf';
    this.eof_1 = 'http://purl.org/dc/elements/1.1/';
  }
  protoOf(Companion_26).n4r = function () {
    return $serializer_getInstance_36();
  };
  var Companion_instance_75;
  function Companion_getInstance_43() {
    return Companion_instance_75;
  }
  function $serializer_24() {
    $serializer_instance_24 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.PackageDocument', this, 5);
    tmp0_serialDesc.t4f('version', true);
    tmp0_serialDesc.t4f('uniqueIdentifier', true);
    tmp0_serialDesc.u4f(new XmlSerialName('unique-identifier'));
    tmp0_serialDesc.t4f('metadata', true);
    tmp0_serialDesc.t4f('manifest', true);
    tmp0_serialDesc.t4f('spine', true);
    tmp0_serialDesc.v4f(new XmlSerialName('package', 'http://www.idpf.org/2007/opf'));
    this.fof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_24).q44 = function () {
    return this.fof_1;
  };
  protoOf($serializer_24).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), $serializer_getInstance_35(), $serializer_getInstance_33(), $serializer_getInstance_37()];
  };
  protoOf($serializer_24).s44 = function (decoder) {
    var tmp0_desc = this.fof_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.i48(tmp0_desc);
    if (tmp9_input.x48()) {
      tmp4_local0 = tmp9_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.u48(tmp0_desc, 2, $serializer_getInstance_35(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, $serializer_getInstance_33(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.u48(tmp0_desc, 4, $serializer_getInstance_37(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.u48(tmp0_desc, 2, $serializer_getInstance_35(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, $serializer_getInstance_33(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.u48(tmp0_desc, 4, $serializer_getInstance_37(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.j48(tmp0_desc);
    return PackageDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_24).gof = function (encoder, value) {
    var tmp0_desc = this.fof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.hof_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.hof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.iof_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.iof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !equals(value.jof_1, new Metadata())) {
      tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_35(), value.jof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !equals(value.kof_1, new Manifest())) {
      tmp1_output.y49(tmp0_desc, 3, $serializer_getInstance_33(), value.kof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !equals(value.lof_1, new Spine())) {
      tmp1_output.y49(tmp0_desc, 4, $serializer_getInstance_37(), value.lof_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_24).r44 = function (encoder, value) {
    return this.gof(encoder, value instanceof PackageDocument ? value : THROW_CCE());
  };
  var $serializer_instance_24;
  function $serializer_getInstance_36() {
    if ($serializer_instance_24 == null)
      new $serializer_24();
    return $serializer_instance_24;
  }
  function PackageDocument_init_$Init$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_36().fof_1);
    }
    if (0 === (seen1 & 1))
      $this.hof_1 = null;
    else
      $this.hof_1 = version;
    if (0 === (seen1 & 2))
      $this.iof_1 = '';
    else
      $this.iof_1 = uniqueIdentifier;
    if (0 === (seen1 & 4))
      $this.jof_1 = new Metadata();
    else
      $this.jof_1 = metadata;
    if (0 === (seen1 & 8))
      $this.kof_1 = new Manifest();
    else
      $this.kof_1 = manifest;
    if (0 === (seen1 & 16))
      $this.lof_1 = new Spine();
    else
      $this.lof_1 = spine;
    return $this;
  }
  function PackageDocument_init_$Create$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker) {
    return PackageDocument_init_$Init$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker, objectCreate(protoOf(PackageDocument)));
  }
  function PackageDocument(version, uniqueIdentifier, metadata, manifest, spine) {
    version = version === VOID ? null : version;
    uniqueIdentifier = uniqueIdentifier === VOID ? '' : uniqueIdentifier;
    metadata = metadata === VOID ? new Metadata() : metadata;
    manifest = manifest === VOID ? new Manifest() : manifest;
    spine = spine === VOID ? new Spine() : spine;
    this.hof_1 = version;
    this.iof_1 = uniqueIdentifier;
    this.jof_1 = metadata;
    this.kof_1 = manifest;
    this.lof_1 = spine;
  }
  protoOf(PackageDocument).mof = function () {
    var whitespaceRegex = Regex_init_$Create$('\\s+');
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.kof_1.poe_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
        var tmp0_safe_receiver = element.hoe_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          // Inline function 'kotlin.text.split' call
          tmp = whitespaceRegex.y9(tmp0_safe_receiver, 0);
        }
        var tmp1_safe_receiver = tmp;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a1('cover-image');
        if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
          tmp$ret$2 = element;
          break $l$block;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp2_elvis_lhs_0 = tmp$ret$2;
    var tmp_0;
    if (tmp2_elvis_lhs_0 == null) {
      var tmp$ret$4;
      $l$block_0: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_0 = this.jof_1.cof_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
          if (element_0.soe_1 === 'cover') {
            tmp$ret$4 = element_0;
            break $l$block_0;
          }
        }
        tmp$ret$4 = null;
      }
      var tmp0_safe_receiver_0 = tmp$ret$4;
      var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.toe_1;
      var tmp_1;
      if (tmp1_safe_receiver_0 == null) {
        tmp_1 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
        var tmp$ret$6;
        $l$block_1: {
          // Inline function 'kotlin.collections.firstOrNull' call
          var tmp0_iterator_1 = this.kof_1.poe_1.w();
          while (tmp0_iterator_1.f()) {
            var element_1 = tmp0_iterator_1.e();
            // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>.<anonymous>' call
            if (element_1.foe_1 === tmp1_safe_receiver_0) {
              tmp$ret$6 = element_1;
              break $l$block_1;
            }
          }
          tmp$ret$6 = null;
        }
        tmp_1 = tmp$ret$6;
      }
      tmp_0 = tmp_1;
    } else {
      tmp_0 = tmp2_elvis_lhs_0;
    }
    return tmp_0;
  };
  protoOf(PackageDocument).nof = function () {
    var whiteSpaceRegex = Regex_init_$Create$('\\s+');
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.kof_1.poe_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
      var tmp0_safe_receiver = element.hoe_1;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.text.split' call
        tmp = whiteSpaceRegex.y9(tmp0_safe_receiver, 0);
      }
      var tmp1_safe_receiver = tmp;
      var tmp_0;
      if (tmp1_safe_receiver == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
        tmp_0 = tmp1_safe_receiver.a1('toc') ? true : tmp1_safe_receiver.a1('nav');
      }
      var tmp2_elvis_lhs = tmp_0;
      if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
        destination.i1(element);
      }
    }
    var tocCandidates = destination;
    var tmp0_safe_receiver_0 = this.lof_1.pof_1;
    var tmp_1;
    if (tmp0_safe_receiver_0 == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
      var tmp$ret$7;
      $l$block: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_0 = this.kof_1.poe_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
          if (element_0.foe_1 === tmp0_safe_receiver_0) {
            tmp$ret$7 = element_0;
            break $l$block;
          }
        }
        tmp$ret$7 = null;
      }
      var tmp0_safe_receiver_1 = tmp$ret$7;
      var tmp_2;
      if (tmp0_safe_receiver_1 == null) {
        tmp_2 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
        tmp_2 = listOf_0(tmp0_safe_receiver_1);
      }
      var tmp1_elvis_lhs = tmp_2;
      tmp_1 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
    }
    var tmp1_elvis_lhs_0 = tmp_1;
    var spineNcxCandidate = tmp1_elvis_lhs_0 == null ? emptyList() : tmp1_elvis_lhs_0;
    var allTocCandidates = plus(tocCandidates, spineNcxCandidate);
    var tmp$ret$13;
    $l$block_0: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator_1 = allTocCandidates.w();
      while (tmp0_iterator_1.f()) {
        var element_1 = tmp0_iterator_1.e();
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
        var tmp0_safe_receiver_2 = element_1.hoe_1;
        var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : contains(tmp0_safe_receiver_2, 'nav');
        if (tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1) {
          tmp$ret$13 = element_1;
          break $l$block_0;
        }
      }
      tmp$ret$13 = null;
    }
    var tmp2_elvis_lhs_0 = tmp$ret$13;
    return tmp2_elvis_lhs_0 == null ? firstOrNull(allTocCandidates) : tmp2_elvis_lhs_0;
  };
  function Companion_27() {
    Companion_instance_76 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.qof_1 = [new ArrayListSerializer($serializer_getInstance_32()), null];
  }
  var Companion_instance_76;
  function Companion_getInstance_44() {
    if (Companion_instance_76 == null)
      new Companion_27();
    return Companion_instance_76;
  }
  function $serializer_25() {
    $serializer_instance_25 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Spine', this, 2);
    tmp0_serialDesc.t4f('itemRefs', true);
    tmp0_serialDesc.t4f('toc', true);
    tmp0_serialDesc.v4f(new XmlSerialName('spine', 'http://www.idpf.org/2007/opf'));
    this.rof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_25).q44 = function () {
    return this.rof_1;
  };
  protoOf($serializer_25).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_44().qof_1[0], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_25).s44 = function (decoder) {
    var tmp0_desc = this.rof_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_44().qof_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return Spine_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_25).sof = function (encoder, value) {
    var tmp0_desc = this.rof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_44().qof_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.oof_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.oof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.pof_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.pof_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_25).r44 = function (encoder, value) {
    return this.sof(encoder, value instanceof Spine ? value : THROW_CCE());
  };
  var $serializer_instance_25;
  function $serializer_getInstance_37() {
    if ($serializer_instance_25 == null)
      new $serializer_25();
    return $serializer_instance_25;
  }
  function Spine_init_$Init$(seen1, itemRefs, toc, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_37().rof_1);
    }
    if (0 === (seen1 & 1))
      $this.oof_1 = emptyList();
    else
      $this.oof_1 = itemRefs;
    if (0 === (seen1 & 2))
      $this.pof_1 = null;
    else
      $this.pof_1 = toc;
    return $this;
  }
  function Spine_init_$Create$(seen1, itemRefs, toc, serializationConstructorMarker) {
    return Spine_init_$Init$(seen1, itemRefs, toc, serializationConstructorMarker, objectCreate(protoOf(Spine)));
  }
  function Spine(itemRefs, toc) {
    Companion_getInstance_44();
    itemRefs = itemRefs === VOID ? emptyList() : itemRefs;
    toc = toc === VOID ? null : toc;
    this.oof_1 = itemRefs;
    this.pof_1 = toc;
  }
  function Companion_28() {
    Companion_instance_77 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.tof_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_39())];
  }
  var Companion_instance_77;
  function Companion_getInstance_45() {
    if (Companion_instance_77 == null)
      new Companion_28();
    return Companion_instance_77;
  }
  function $serializer_26() {
    $serializer_instance_26 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifest', this, 3);
    tmp0_serialDesc.t4f('version', false);
    tmp0_serialDesc.t4f('metadata', false);
    tmp0_serialDesc.t4f('entries', false);
    this.uof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_26).q44 = function () {
    return this.uof_1;
  };
  protoOf($serializer_26).k4g = function () {
    var tmp0_cached = Companion_getInstance_45().tof_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), tmp0_cached[1], tmp0_cached[2]];
  };
  protoOf($serializer_26).s44 = function (decoder) {
    var tmp0_desc = this.uof_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.i48(tmp0_desc);
    var tmp8_cached = Companion_getInstance_45().tof_1;
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return ContentManifest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_26).vof = function (encoder, value) {
    var tmp0_desc = this.uof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_45().tof_1;
    tmp1_output.r49(tmp0_desc, 0, value.wof_1);
    tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.xof_1);
    tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.yof_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_26).r44 = function (encoder, value) {
    return this.vof(encoder, value instanceof ContentManifest ? value : THROW_CCE());
  };
  var $serializer_instance_26;
  function $serializer_getInstance_38() {
    if ($serializer_instance_26 == null)
      new $serializer_26();
    return $serializer_instance_26;
  }
  function ContentManifest_init_$Init$(seen1, version, metadata, entries, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_38().uof_1);
    }
    $this.wof_1 = version;
    $this.xof_1 = metadata;
    $this.yof_1 = entries;
    return $this;
  }
  function ContentManifest_init_$Create$(seen1, version, metadata, entries, serializationConstructorMarker) {
    return ContentManifest_init_$Init$(seen1, version, metadata, entries, serializationConstructorMarker, objectCreate(protoOf(ContentManifest)));
  }
  function ContentManifest(version, metadata, entries) {
    Companion_getInstance_45();
    this.wof_1 = version;
    this.xof_1 = metadata;
    this.yof_1 = entries;
  }
  protoOf(ContentManifest).toString = function () {
    return 'ContentManifest(version=' + this.wof_1 + ', metadata=' + this.xof_1 + ', entries=' + this.yof_1 + ')';
  };
  protoOf(ContentManifest).hashCode = function () {
    var result = this.wof_1;
    result = imul(result, 31) + hashCode(this.xof_1) | 0;
    result = imul(result, 31) + hashCode(this.yof_1) | 0;
    return result;
  };
  protoOf(ContentManifest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentManifest))
      return false;
    var tmp0_other_with_cast = other instanceof ContentManifest ? other : THROW_CCE();
    if (!(this.wof_1 === tmp0_other_with_cast.wof_1))
      return false;
    if (!equals(this.xof_1, tmp0_other_with_cast.xof_1))
      return false;
    if (!equals(this.yof_1, tmp0_other_with_cast.yof_1))
      return false;
    return true;
  };
  function Companion_29() {
    Companion_instance_78 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.zof_1 = [null, null, null, null, null, null, new StringValuesSerializer(), new StringValuesSerializer(), null];
  }
  var Companion_instance_78;
  function Companion_getInstance_46() {
    if (Companion_instance_78 == null)
      new Companion_29();
    return Companion_instance_78;
  }
  function $serializer_27() {
    $serializer_instance_27 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifestEntry', this, 9);
    tmp0_serialDesc.t4f('uri', false);
    tmp0_serialDesc.t4f('storageSize', false);
    tmp0_serialDesc.t4f('ignoreQueryParams', true);
    tmp0_serialDesc.t4f('status', true);
    tmp0_serialDesc.t4f('method', true);
    tmp0_serialDesc.t4f('integrity', false);
    tmp0_serialDesc.t4f('requestHeaders', true);
    tmp0_serialDesc.t4f('responseHeaders', false);
    tmp0_serialDesc.t4f('bodyDataUrl', false);
    this.aog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_27).q44 = function () {
    return this.aog_1;
  };
  protoOf($serializer_27).k4g = function () {
    var tmp0_cached = Companion_getInstance_46().zof_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), LongSerializer_getInstance(), BooleanSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[6], tmp0_cached[7], StringSerializer_getInstance()];
  };
  protoOf($serializer_27).s44 = function (decoder) {
    var tmp0_desc = this.aog_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = false;
    var tmp7_local3 = 0;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_input = decoder.i48(tmp0_desc);
    var tmp14_cached = Companion_getInstance_46().zof_1;
    if (tmp13_input.x48()) {
      tmp4_local0 = tmp13_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.k48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.n48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.s48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.s48(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.u48(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.u48(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.s48(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.k48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.n48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.s48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.s48(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.u48(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.u48(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.s48(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.j48(tmp0_desc);
    return ContentManifestEntry_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);
  };
  protoOf($serializer_27).bog = function (encoder, value) {
    var tmp0_desc = this.aog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_46().zof_1;
    tmp1_output.w49(tmp0_desc, 0, value.cog_1);
    tmp1_output.s49(tmp0_desc, 1, value.dog_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.eog_1 === true)) {
      tmp1_output.o49(tmp0_desc, 2, value.eog_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.fog_1 === 200)) {
      tmp1_output.r49(tmp0_desc, 3, value.fog_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.gog_1 === 'GET')) {
      tmp1_output.w49(tmp0_desc, 4, value.gog_1);
    }
    tmp1_output.w49(tmp0_desc, 5, value.hog_1);
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !equals(value.iog_1, emptyStringValues())) {
      tmp1_output.y49(tmp0_desc, 6, tmp2_cached[6], value.iog_1);
    }
    tmp1_output.y49(tmp0_desc, 7, tmp2_cached[7], value.jog_1);
    tmp1_output.w49(tmp0_desc, 8, value.kog_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_27).r44 = function (encoder, value) {
    return this.bog(encoder, value instanceof ContentManifestEntry ? value : THROW_CCE());
  };
  var $serializer_instance_27;
  function $serializer_getInstance_39() {
    if ($serializer_instance_27 == null)
      new $serializer_27();
    return $serializer_instance_27;
  }
  function ContentManifestEntry_init_$Init$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker, $this) {
    if (!(419 === (419 & seen1))) {
      throwMissingFieldException(seen1, 419, $serializer_getInstance_39().aog_1);
    }
    $this.cog_1 = uri;
    $this.dog_1 = storageSize;
    if (0 === (seen1 & 4))
      $this.eog_1 = true;
    else
      $this.eog_1 = ignoreQueryParams;
    if (0 === (seen1 & 8))
      $this.fog_1 = 200;
    else
      $this.fog_1 = status;
    if (0 === (seen1 & 16))
      $this.gog_1 = 'GET';
    else
      $this.gog_1 = method;
    $this.hog_1 = integrity;
    if (0 === (seen1 & 64))
      $this.iog_1 = emptyStringValues();
    else
      $this.iog_1 = requestHeaders;
    $this.jog_1 = responseHeaders;
    $this.kog_1 = bodyDataUrl;
    return $this;
  }
  function ContentManifestEntry_init_$Create$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker) {
    return ContentManifestEntry_init_$Init$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker, objectCreate(protoOf(ContentManifestEntry)));
  }
  function ContentManifestEntry() {
  }
  function Companion_30() {
    Companion_instance_79 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.log_1 = [new ArrayListSerializer($serializer_getInstance_41()), new ArrayListSerializer($serializer_getInstance_42())];
  }
  var Companion_instance_79;
  function Companion_getInstance_47() {
    if (Companion_instance_79 == null)
      new Companion_30();
    return Companion_instance_79;
  }
  function $serializer_28() {
    $serializer_instance_28 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.MediaContentInfo', this, 2);
    tmp0_serialDesc.t4f('sources', false);
    tmp0_serialDesc.t4f('subtitles', true);
    this.mog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_28).q44 = function () {
    return this.mog_1;
  };
  protoOf($serializer_28).k4g = function () {
    var tmp0_cached = Companion_getInstance_47().log_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [tmp0_cached[0], tmp0_cached[1]];
  };
  protoOf($serializer_28).s44 = function (decoder) {
    var tmp0_desc = this.mog_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_47().log_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return MediaContentInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_28).nog = function (encoder, value) {
    var tmp0_desc = this.mog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_47().log_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.oog_1);
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !equals(value.pog_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.pog_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_28).r44 = function (encoder, value) {
    return this.nog(encoder, value instanceof MediaContentInfo ? value : THROW_CCE());
  };
  var $serializer_instance_28;
  function $serializer_getInstance_40() {
    if ($serializer_instance_28 == null)
      new $serializer_28();
    return $serializer_instance_28;
  }
  function MediaContentInfo_init_$Init$(seen1, sources, subtitles, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_40().mog_1);
    }
    $this.oog_1 = sources;
    if (0 === (seen1 & 2))
      $this.pog_1 = emptyList();
    else
      $this.pog_1 = subtitles;
    return $this;
  }
  function MediaContentInfo_init_$Create$(seen1, sources, subtitles, serializationConstructorMarker) {
    return MediaContentInfo_init_$Init$(seen1, sources, subtitles, serializationConstructorMarker, objectCreate(protoOf(MediaContentInfo)));
  }
  function MediaContentInfo(sources, subtitles) {
    Companion_getInstance_47();
    subtitles = subtitles === VOID ? emptyList() : subtitles;
    this.oog_1 = sources;
    this.pog_1 = subtitles;
  }
  function $serializer_29() {
    $serializer_instance_29 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.MediaSource', this, 2);
    tmp0_serialDesc.t4f('uri', false);
    tmp0_serialDesc.t4f('mimeType', false);
    this.qog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_29).q44 = function () {
    return this.qog_1;
  };
  protoOf($serializer_29).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_29).s44 = function (decoder) {
    var tmp0_desc = this.qog_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return MediaSource_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_29).rog = function (encoder, value) {
    var tmp0_desc = this.qog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.sog_1);
    tmp1_output.w49(tmp0_desc, 1, value.tog_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_29).r44 = function (encoder, value) {
    return this.rog(encoder, value instanceof MediaSource ? value : THROW_CCE());
  };
  var $serializer_instance_29;
  function $serializer_getInstance_41() {
    if ($serializer_instance_29 == null)
      new $serializer_29();
    return $serializer_instance_29;
  }
  function MediaSource_init_$Init$(seen1, uri, mimeType, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_41().qog_1);
    }
    $this.sog_1 = uri;
    $this.tog_1 = mimeType;
    return $this;
  }
  function MediaSource_init_$Create$(seen1, uri, mimeType, serializationConstructorMarker) {
    return MediaSource_init_$Init$(seen1, uri, mimeType, serializationConstructorMarker, objectCreate(protoOf(MediaSource)));
  }
  function MediaSource() {
  }
  function Companion_31() {
  }
  protoOf(Companion_31).n4r = function () {
    return $serializer_getInstance_42();
  };
  var Companion_instance_80;
  function Companion_getInstance_48() {
    return Companion_instance_80;
  }
  function $serializer_30() {
    $serializer_instance_30 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.SubtitleTrack', this, 4);
    tmp0_serialDesc.t4f('uri', false);
    tmp0_serialDesc.t4f('mimeType', false);
    tmp0_serialDesc.t4f('langCode', false);
    tmp0_serialDesc.t4f('title', false);
    this.uog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_30).q44 = function () {
    return this.uog_1;
  };
  protoOf($serializer_30).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_30).s44 = function (decoder) {
    var tmp0_desc = this.uog_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return SubtitleTrack_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_30).vog = function (encoder, value) {
    var tmp0_desc = this.uog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.wog_1);
    tmp1_output.w49(tmp0_desc, 1, value.xog_1);
    tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.yog_1);
    tmp1_output.w49(tmp0_desc, 3, value.zog_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_30).r44 = function (encoder, value) {
    return this.vog(encoder, value instanceof SubtitleTrack ? value : THROW_CCE());
  };
  var $serializer_instance_30;
  function $serializer_getInstance_42() {
    if ($serializer_instance_30 == null)
      new $serializer_30();
    return $serializer_instance_30;
  }
  function SubtitleTrack_init_$Init$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_42().uog_1);
    }
    $this.wog_1 = uri;
    $this.xog_1 = mimeType;
    $this.yog_1 = langCode;
    $this.zog_1 = title;
    return $this;
  }
  function SubtitleTrack_init_$Create$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker) {
    return SubtitleTrack_init_$Init$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker, objectCreate(protoOf(SubtitleTrack)));
  }
  function SubtitleTrack(uri, mimeType, langCode, title) {
    this.wog_1 = uri;
    this.xog_1 = mimeType;
    this.yog_1 = langCode;
    this.zog_1 = title;
  }
  protoOf(SubtitleTrack).aoh = function (uri, mimeType, langCode, title) {
    return new SubtitleTrack(uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).boh = function (uri, mimeType, langCode, title, $super) {
    uri = uri === VOID ? this.wog_1 : uri;
    mimeType = mimeType === VOID ? this.xog_1 : mimeType;
    langCode = langCode === VOID ? this.yog_1 : langCode;
    title = title === VOID ? this.zog_1 : title;
    return $super === VOID ? this.aoh(uri, mimeType, langCode, title) : $super.aoh.call(this, uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).toString = function () {
    return 'SubtitleTrack(uri=' + this.wog_1 + ', mimeType=' + this.xog_1 + ', langCode=' + this.yog_1 + ', title=' + this.zog_1 + ')';
  };
  protoOf(SubtitleTrack).hashCode = function () {
    var result = getStringHashCode(this.wog_1);
    result = imul(result, 31) + getStringHashCode(this.xog_1) | 0;
    result = imul(result, 31) + (this.yog_1 == null ? 0 : getStringHashCode(this.yog_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.zog_1) | 0;
    return result;
  };
  protoOf(SubtitleTrack).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubtitleTrack))
      return false;
    var tmp0_other_with_cast = other instanceof SubtitleTrack ? other : THROW_CCE();
    if (!(this.wog_1 === tmp0_other_with_cast.wog_1))
      return false;
    if (!(this.xog_1 === tmp0_other_with_cast.xog_1))
      return false;
    if (!(this.yog_1 == tmp0_other_with_cast.yog_1))
      return false;
    if (!(this.zog_1 === tmp0_other_with_cast.zog_1))
      return false;
    return true;
  };
  function InvalidContentException(message, cause) {
    cause = cause === VOID ? null : cause;
    IllegalArgumentException_init_$Init$(message, cause, this);
    captureStack(this, InvalidContentException);
  }
  function Companion_32() {
    this.coh_1 = 'upload-tmp';
    this.doh_1 = 'upload-tmp:///';
  }
  protoOf(Companion_32).n4r = function () {
    return $serializer_getInstance_43();
  };
  var Companion_instance_81;
  function Companion_getInstance_49() {
    return Companion_instance_81;
  }
  function $serializer_31() {
    $serializer_instance_31 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentjob.MetadataResult', this, 4);
    tmp0_serialDesc.t4f('entry', false);
    tmp0_serialDesc.t4f('importerId', false);
    tmp0_serialDesc.t4f('originalFilename', true);
    tmp0_serialDesc.t4f('picture', true);
    this.eoh_1 = tmp0_serialDesc;
  }
  protoOf($serializer_31).q44 = function () {
    return this.eoh_1;
  };
  protoOf($serializer_31).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_3(), IntSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_4())];
  };
  protoOf($serializer_31).s44 = function (decoder) {
    var tmp0_desc = this.eoh_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.n48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.n48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return MetadataResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_31).foh = function (encoder, value) {
    var tmp0_desc = this.eoh_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_3(), value.goh_1);
    tmp1_output.r49(tmp0_desc, 1, value.hoh_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.ioh_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.ioh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.joh_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, $serializer_getInstance_4(), value.joh_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_31).r44 = function (encoder, value) {
    return this.foh(encoder, value instanceof MetadataResult ? value : THROW_CCE());
  };
  var $serializer_instance_31;
  function $serializer_getInstance_43() {
    if ($serializer_instance_31 == null)
      new $serializer_31();
    return $serializer_instance_31;
  }
  function MetadataResult_init_$Init$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_43().eoh_1);
    }
    $this.goh_1 = entry;
    $this.hoh_1 = importerId;
    if (0 === (seen1 & 4))
      $this.ioh_1 = null;
    else
      $this.ioh_1 = originalFilename;
    if (0 === (seen1 & 8))
      $this.joh_1 = null;
    else
      $this.joh_1 = picture;
    return $this;
  }
  function MetadataResult_init_$Create$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker) {
    return MetadataResult_init_$Init$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker, objectCreate(protoOf(MetadataResult)));
  }
  function MetadataResult(entry, importerId, originalFilename, picture) {
    originalFilename = originalFilename === VOID ? null : originalFilename;
    picture = picture === VOID ? null : picture;
    this.goh_1 = entry;
    this.hoh_1 = importerId;
    this.ioh_1 = originalFilename;
    this.joh_1 = picture;
  }
  protoOf(MetadataResult).toString = function () {
    return 'MetadataResult(entry=' + this.goh_1 + ', importerId=' + this.hoh_1 + ', originalFilename=' + this.ioh_1 + ', picture=' + this.joh_1 + ')';
  };
  protoOf(MetadataResult).hashCode = function () {
    var result = this.goh_1.hashCode();
    result = imul(result, 31) + this.hoh_1 | 0;
    result = imul(result, 31) + (this.ioh_1 == null ? 0 : getStringHashCode(this.ioh_1)) | 0;
    result = imul(result, 31) + (this.joh_1 == null ? 0 : this.joh_1.hashCode()) | 0;
    return result;
  };
  protoOf(MetadataResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MetadataResult))
      return false;
    var tmp0_other_with_cast = other instanceof MetadataResult ? other : THROW_CCE();
    if (!this.goh_1.equals(tmp0_other_with_cast.goh_1))
      return false;
    if (!(this.hoh_1 === tmp0_other_with_cast.hoh_1))
      return false;
    if (!(this.ioh_1 == tmp0_other_with_cast.ioh_1))
      return false;
    if (!equals(this.joh_1, tmp0_other_with_cast.joh_1))
      return false;
    return true;
  };
  function PersonConstants() {
    PersonConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1, strings_getInstance().smk_1);
    var tmp_1 = to(2, strings_getInstance().rmk_1);
    var tmp_2 = to(4, strings_getInstance().tmk_1);
    tmp.koh_1 = mapOf([tmp_0, tmp_1, tmp_2, to(0, strings_getInstance().umk_1)]);
  }
  var PersonConstants_instance;
  function PersonConstants_getInstance() {
    if (PersonConstants_instance == null)
      new PersonConstants();
    return PersonConstants_instance;
  }
  function SubmissionConstants() {
    SubmissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(0, strings_getInstance().rng_1);
    var tmp_1 = to(4, strings_getInstance().emn_1);
    var tmp_2 = to(1, strings_getInstance().sng_1);
    var tmp_3 = to(2, strings_getInstance().tng_1);
    tmp.loh_1 = mapOf([tmp_0, tmp_1, tmp_2, tmp_3, to(3, strings_getInstance().jna_1)]);
    var tmp_4 = this;
    Companion_getInstance_1();
    var tmp_5 = to(0, strings_getInstance().kn5_1);
    Companion_getInstance_1();
    var tmp_6 = to(1, strings_getInstance().jn5_1);
    Companion_getInstance_1();
    tmp_4.moh_1 = mapOf([tmp_5, tmp_6, to(2, strings_getInstance().in5_1)]);
  }
  var SubmissionConstants_instance;
  function SubmissionConstants_getInstance() {
    if (SubmissionConstants_instance == null)
      new SubmissionConstants();
    return SubmissionConstants_instance;
  }
  function TerminologyKeys() {
    TerminologyKeys_instance = this;
    this.noh_1 = 'Teacher';
    this.ooh_1 = 'Student';
    this.poh_1 = 'Teachers';
    this.qoh_1 = 'Students';
    this.roh_1 = 'AddTeacher';
    this.soh_1 = 'AddStudent';
    this.toh_1 = mapOf([to('Teacher', strings_getInstance().rmy_1), to('Student', strings_getInstance().en5_1), to('Teachers', strings_getInstance().umy_1), to('Students', strings_getInstance().sml_1), to('AddTeacher', strings_getInstance().smy_1), to('AddStudent', strings_getInstance().tml_1)]);
  }
  var TerminologyKeys_instance;
  function TerminologyKeys_getInstance() {
    if (TerminologyKeys_instance == null)
      new TerminologyKeys();
    return TerminologyKeys_instance;
  }
  function ValidateUsernameUseCase() {
  }
  function $invokeCOROUTINE$10(_this__u8e3s4, destUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.coi_1 = _this__u8e3s4;
    this.doi_1 = destUri;
  }
  protoOf($invokeCOROUTINE$10).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            suspendResult = this.coi_1.ioi_1.sk2_1.v7e().lhn(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.eoi_1 = suspendResult;
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp0_safe_receiver = this.coi_1.ioi_1.tk2_1;
            tmp_0.goi_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7e();
            if (this.goi_1 == null) {
              this.hoi_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.goi_1.lhn(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.hoi_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            var tmp2_safe_receiver = this.hoi_1;
            this.foi_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.xhn_1;
            this.id_1 = 6;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.id_1 = 6;
            var tmp_1 = this.kd_1;
            if (tmp_1 instanceof Exception) {
              var e = this.kd_1;
              var tmp_2 = this;
              Napier_getInstance().i5e('GetRegistrationAllowedUseCase: Error occurred: ' + e.message, e);
              var tmp3_safe_receiver = this.eoi_1;
              tmp_2.foi_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.xhn_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 6;
            return this.foi_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function CheckRegistrationAllowedUseCase(dataLayer) {
    this.ioi_1 = dataLayer;
  }
  protoOf(CheckRegistrationAllowedUseCase).joi = function (destUri, $completion) {
    var tmp = new $invokeCOROUTINE$10(this, destUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function CreateNewLocalAccountUseCase(di) {
    this.koi_1 = di;
  }
  function SetPasswordUseCase() {
  }
  function AccountIsNotSubmitterException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AccountIsNotSubmitterException);
  }
  function AssignmentAlreadySubmittedException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentAlreadySubmittedException);
  }
  function AssignmentDeadlinePassedException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentDeadlinePassedException);
  }
  function AssignmentTextTooLongException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentTextTooLongException);
  }
  function AssignmentSubmissionException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, AssignmentSubmissionException);
  }
  function SubmitAssignmentResult(submission) {
    this.moi_1 = submission;
  }
  protoOf(SubmitAssignmentResult).toString = function () {
    return 'SubmitAssignmentResult(submission=' + this.moi_1 + ')';
  };
  protoOf(SubmitAssignmentResult).hashCode = function () {
    return this.moi_1 == null ? 0 : this.moi_1.hashCode();
  };
  protoOf(SubmitAssignmentResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubmitAssignmentResult))
      return false;
    var tmp0_other_with_cast = other instanceof SubmitAssignmentResult ? other : THROW_CCE();
    if (!equals(this.moi_1, tmp0_other_with_cast.moi_1))
      return false;
    return true;
  };
  function SubmitAssignmentUseCase$invoke$lambda($assignmentUid, $submitterUid, $accountPersonUid, $assignment) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.lc2_1 = $assignmentUid;
      $this$shallowCopy.mc2_1 = $submitterUid;
      $this$shallowCopy.nc2_1 = $accountPersonUid;
      $this$shallowCopy.qc2_1 = systemTimeInMillis();
      $this$shallowCopy.rc2_1 = $assignment.f7u_1;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$11(_this__u8e3s4, repo, submitterUid, assignmentUid, accountPersonUid, submission, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.voi_1 = _this__u8e3s4;
    this.woi_1 = repo;
    this.xoi_1 = submitterUid;
    this.yoi_1 = assignmentUid;
    this.zoi_1 = accountPersonUid;
    this.aoj_1 = submission;
  }
  protoOf($invokeCOROUTINE$11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (this.xoi_1.equals(new Long(0, 0)))
              throw new AccountIsNotSubmitterException('Not a valid submitter');
            this.hd_1 = 1;
            suspendResult = this.woi_1.q7e().q7s(this.yoi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.boj_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.boj_1 == null) {
              throw IllegalArgumentException_init_$Create$('Could not find assignment uid ' + this.yoi_1.toString());
            } else {
              tmp_1 = this.boj_1;
            }

            tmp_0.coj_1 = tmp_1;
            var tmp_2 = this;
            var tmp1_elvis_lhs = this.coj_1.s7x_1;
            var tmp_3;
            if (tmp1_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('Could not load courseblock');
            } else {
              tmp_3 = tmp1_elvis_lhs;
            }

            tmp_2.doj_1 = tmp_3;
            var tmp_4 = this;
            var tmp2_elvis_lhs = this.coj_1.r7x_1;
            var tmp_5;
            if (tmp2_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('assignment cannot be null');
            } else {
              tmp_5 = tmp2_elvis_lhs;
            }

            tmp_4.eoj_1 = tmp_5;
            var tmp_6 = this.eoj_1.z7t_1;
            if (tmp_6 === 1) {
              this.hd_1 = 2;
              suspendResult = this.woi_1.r7e().sc1(this.zoi_1, this.yoi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.foj_1 = false;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.foj_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (this.foj_1) {
              throw new AssignmentAlreadySubmittedException(this.voi_1.hoj_1.moj(strings_getInstance().knk_1));
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            if (lastPossibleSubmissionTime(this.doj_1).c7(systemTimeInMillis()) < 0) {
              throw new AssignmentDeadlinePassedException(this.voi_1.hoj_1.moj(strings_getInstance().jnk_1));
            }

            if (this.eoj_1.b7u_1) {
              var tmp_7 = this.eoj_1.c7u_1;
              if (tmp_7 === 1) {
                var tmp3_safe_receiver = this.aoj_1.oc2_1;
                var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : htmlToPlainText(tmp3_safe_receiver);
                var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : countWords(tmp4_safe_receiver);
                var wordCount = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
                if (wordCount > this.eoj_1.d7u_1) {
                  throw new AssignmentTextTooLongException(this.voi_1.hoj_1.noj(strings_getInstance().lnk_1, [wordCount.toString(), this.eoj_1.d7u_1.toString()]));
                }
              } else {
                var tmp_8 = this.eoj_1.c7u_1;
                if (tmp_8 === 2) {
                  var tmp6_safe_receiver = this.aoj_1.oc2_1;
                  var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : htmlToPlainText(tmp6_safe_receiver);
                  var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.length;
                  var charCount = tmp8_elvis_lhs == null ? 0 : tmp8_elvis_lhs;
                  if (charCount > this.eoj_1.d7u_1) {
                    throw new AssignmentTextTooLongException(this.voi_1.hoj_1.noj(strings_getInstance().mnk_1, [charCount.toString(), this.eoj_1.d7u_1.toString()]));
                  }
                }
              }
            }

            var tmp_9 = this;
            tmp_9.goj_1 = shallowCopy_0(this.aoj_1, SubmitAssignmentUseCase$invoke$lambda(this.yoi_1, this.xoi_1, this.zoi_1, this.eoj_1));
            Napier_getInstance().i5e('SubmitAssignmentUseCase: save to repo for submitterUid=' + this.xoi_1.toString() + ' assignmentUid=' + this.yoi_1.toString());
            this.hd_1 = 5;
            suspendResult = this.woi_1.r7e().insertAsync(this.goj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return new SubmitAssignmentResult(this.goj_1);
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SubmitAssignmentUseCase(systemImpl) {
    this.hoj_1 = systemImpl;
  }
  protoOf(SubmitAssignmentUseCase).ooj = function (repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion) {
    var tmp = new $invokeCOROUTINE$11(this, repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SubmitMarkUseCase$invoke$lambda($assignment, $submitterUid, $activeUserSubmitterUid, $activeUserPerson, $courseBlock, $clazzUid, $applyPenalty) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.gbw_1 = $assignment.n7t_1;
      $this$shallowCopy.hbw_1 = $submitterUid;
      $this$shallowCopy.ibw_1 = $activeUserSubmitterUid;
      $this$shallowCopy.jbw_1 = $activeUserPerson.f96_1;
      var tmp = $this$shallowCopy;
      var tmp0_elvis_lhs = $courseBlock.e7y_1;
      tmp.mbw_1 = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
      $this$shallowCopy.pbw_1 = $clazzUid;
      var tmp_0;
      if ($applyPenalty) {
        $this$shallowCopy.nbw_1 = roundTo($this$shallowCopy.lbw_1 * ($courseBlock.c7y_1 / 100.0), 2);
        $this$shallowCopy.lbw_1 = $this$shallowCopy.lbw_1 - $this$shallowCopy.nbw_1;
        tmp_0 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function SubmitMarkUseCase$invoke$slambda(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation) {
    this.xoj_1 = this$0;
    this.yoj_1 = $stmt;
    this.zoj_1 = $activeUserPerson;
    this.aok_1 = $courseBlock;
    this.bok_1 = $instructorActorToPersonUidMap;
    this.cok_1 = $actorToPersonUidMap;
    this.dok_1 = $clazzUid;
    this.eok_1 = $activityId;
    this.fok_1 = $markToRecord;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubmitMarkUseCase$invoke$slambda).iok = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.iok(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hok_1 = uuid4();
            this.hd_1 = 1;
            var tmp_0 = listOf_0(this.yoj_1);
            var tmp0_xseAccountPersonUid = this.zoj_1.f96_1;
            var tmp1_xseAccountUsername = ensureNotNull(this.zoj_1.g96_1);
            var tmp2_xseCbUid = this.aok_1.t7x_1;
            var tmp3_xseRegistrationHi = this.hok_1.vmd();
            var tmp4_xseRegistrationLo = this.hok_1.wmd();
            var tmp5_knownActorUidToPersonUids = this.xoj_1.ook_1.r45(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), plus_0(this.bok_1, this.cok_1));
            suspendResult = this.xoj_1.mok_1.wok(tmp_0, new XapiSessionEntity(VOID, VOID, tmp3_xseRegistrationHi, tmp4_xseRegistrationLo, VOID, tmp0_xseAccountPersonUid, VOID, tmp1_xseAccountUsername, this.dok_1, tmp2_xseCbUid, VOID, VOID, this.eok_1, VOID, VOID, VOID, VOID, VOID, tmp5_knownActorUidToPersonUids), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.xoj_1.jok_1.t7e().insertAsync(this.fok_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new SubmitMarkUseCase$invoke$slambda(this.xoj_1, this.yoj_1, this.zoj_1, this.aok_1, this.bok_1, this.cok_1, this.dok_1, this.eok_1, this.fok_1, completion);
    i.gok_1 = it;
    return i;
  };
  function SubmitMarkUseCase$invoke$slambda_0(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation) {
    var i = new SubmitMarkUseCase$invoke$slambda(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation);
    var l = function (it, $completion) {
      return i.iok(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$12(_this__u8e3s4, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fol_1 = _this__u8e3s4;
    this.gol_1 = activeUserPerson;
    this.hol_1 = assignment;
    this.iol_1 = clazzUid;
    this.jol_1 = submitterUid;
    this.kol_1 = draftMark;
    this.lol_1 = submissions;
    this.mol_1 = courseBlock;
  }
  protoOf($invokeCOROUTINE$12).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            var tmp_0 = this;
            var tmp_1;
            if (!this.lol_1.c1()) {
              var iterator = this.lol_1.w();
              if (!iterator.f())
                throw NoSuchElementException_init_$Create$();
              var maxValue = iterator.e().qc2_1;
              while (iterator.f()) {
                var v = iterator.e().qc2_1;
                if (compareTo(maxValue, v) < 0) {
                  maxValue = v;
                }
              }
              tmp_1 = maxValue.c7(this.mol_1.b7y_1) > 0;
            } else {
              tmp_1 = false;
            }

            tmp_0.nol_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.fol_1.jok_1.q7e().o7s(this.hol_1.n7t_1, this.iol_1, this.gol_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ool_1 = suspendResult;
            var tmp_2;
            if (this.hol_1.q7t_1.equals(new Long(0, 0))) {
              tmp_2 = true;
            } else {
              var tmp_3 = this.hol_1.a7u_1;
              tmp_2 = tmp_3 === 1;
            }

            if (tmp_2) {
              var tmp_4 = this;
              var activeUserPersonXapiAgent = toXapiAgent(this.gol_1, this.fol_1.kok_1);
              tmp_4.pol_1 = to(activeUserPersonXapiAgent, mapOf_0(to(identifierHash(activeUserPersonXapiAgent, this.fol_1.nok_1), this.gol_1.f96_1)));
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.fol_1.lok_1.iom(this.hol_1.q7t_1, this.ool_1.mb(), this.hol_1.f7u_1, this.hol_1.n7t_1, this.gol_1.f96_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.qol_1 = suspendResult;
            var tmp_5 = this;
            var it = this.qol_1;
            tmp_5.pol_1 = to(it.jom_1, it.kom_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.rol_1 = this.pol_1;
            this.sol_1 = this.rol_1.y6();
            this.tol_1 = this.rol_1.z6();
            if (this.hol_1.q7t_1.equals(new Long(0, 0))) {
              this.hd_1 = 5;
              suspendResult = this.fol_1.jok_1.n7d().mg4(this.jol_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.fol_1.lok_1.iom(this.hol_1.q7t_1, this.jol_1.mb(), this.hol_1.f7u_1, this.hol_1.n7t_1, this.gol_1.f96_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.vol_1 = suspendResult;
            var tmp_6 = this;
            var it_0 = this.vol_1;
            tmp_6.uol_1 = to(it_0.jom_1, it_0.kom_1);
            this.hd_1 = 6;
            continue $sm;
          case 5:
            this.wol_1 = suspendResult;
            this.xol_1 = this.wol_1 == null ? null : toXapiAgent(this.wol_1, this.fol_1.kok_1);
            var tmp_7 = this;
            var tmp_8;
            if (this.xol_1 == null) {
              throw IllegalStateException_init_$Create$('Could not find person for ' + this.jol_1.toString());
            } else {
              tmp_8 = this.xol_1;
            }

            tmp_7.yol_1 = tmp_8;
            this.uol_1 = to(this.yol_1, mapOf_0(to(identifierHash(this.yol_1, this.fol_1.nok_1), this.jol_1)));
            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.zol_1 = this.uol_1;
            this.aom_1 = this.zol_1.y6();
            this.bom_1 = this.zol_1.z6();
            var tmp_9 = this;
            tmp_9.com_1 = shallowCopy_1(this.kol_1, SubmitMarkUseCase$invoke$lambda(this.hol_1, this.jol_1, this.ool_1, this.gol_1, this.mol_1, this.iol_1, this.nol_1));
            var tmp_10 = this;
            var tmp4_viewName = 'CourseAssignment';
            var tmp5_learningSpace = this.fol_1.kok_1.wnt_1;
            Companion_getInstance_125();
            var tmp_11 = to('clazzUid', this.iol_1.toString());
            Companion_getInstance_125();
            var tmp6_queryString = toQueryString(mapOf([tmp_11, to('entityUid', this.hol_1.n7t_1.toString())]));
            tmp_10.dom_1 = (new UstadUrlComponents(tmp5_learningSpace, tmp4_viewName, tmp6_queryString)).qom();
            var tmp_12 = this;
            var tmp7_verb = new XapiVerb(get_VERB_COMPLETED());
            var tmp8_object = new XapiActivityStatementObject(XapiObjectType_Activity_getInstance(), this.dom_1);
            var tmp9_context = new XapiContext(this.sol_1);
            var tmp10_result = new XapiResult(true, true, new Score(this.com_1.lbw_1 / this.com_1.mbw_1, this.com_1.lbw_1, 0.0, this.com_1.mbw_1));
            tmp_12.eom_1 = new XapiStatement(VOID, this.aom_1, tmp7_verb, tmp8_object, tmp10_result, tmp9_context);
            this.hd_1 = 7;
            suspendResult = withDoorTransactionAsync(this.fol_1.jok_1, VOID, SubmitMarkUseCase$invoke$slambda_0(this.fol_1, this.eom_1, this.gol_1, this.mol_1, this.tol_1, this.bom_1, this.iol_1, this.dom_1, this.com_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            return Unit_instance;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SubmitMarkUseCase(repo, learningSpace, createXapiGroupUseCase, xapiStatementResource, xxStringHasher, json) {
    this.jok_1 = repo;
    this.kok_1 = learningSpace;
    this.lok_1 = createXapiGroupUseCase;
    this.mok_1 = xapiStatementResource;
    this.nok_1 = xxStringHasher;
    this.ook_1 = json;
  }
  protoOf(SubmitMarkUseCase).rom = function (activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion) {
    var tmp = new $invokeCOROUTINE$12(this, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.aon_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).fon = function (value, $completion) {
    var tmp = this.gon(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).he = function (p1, $completion) {
    return this.fon((p1 == null ? true : p1 instanceof PersonNames) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.don_1 = this.aon_1;
            var tmp_1 = this;
            tmp_1.eon_1 = this.bon_1;
            var tmp0_safe_receiver = this.eon_1;
            if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg8_1) == null)) {
              this.hd_1 = 3;
              suspendResult = this.don_1.t1d(this.eon_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.con_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).gon = function (value, completion) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda(this.aon_1, completion);
    i.bon_1 = value;
    return i;
  };
  function GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.fon(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$14(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.pon_1 = _this__u8e3s4;
    this.qon_1 = collector;
  }
  protoOf($collectCOROUTINE$14).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.ron_1 = this.qon_1;
            this.hd_1 = 1;
            var tmp_1 = GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0(this.ron_1, null);
            suspendResult = this.pon_1.son_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_0(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function sam$kotlinx_coroutines_flow_FlowCollector$0_0(function_0) {
    this.ton_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).t1d = function (value, $completion) {
    return this.ton_1(value, $completion);
  };
  function _no_name_provided__qut3iv($this) {
    this.son_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv).uon = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$14(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv).a1c = function (collector, $completion) {
    return this.uon(collector, $completion);
  };
  function $invokeCOROUTINE$13(_this__u8e3s4, submitterUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.doo_1 = _this__u8e3s4;
    this.eoo_1 = submitterUid;
  }
  protoOf($invokeCOROUTINE$13).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            Companion_getInstance_1();
            if (this.eoo_1.c7(toLong(10000)) < 0) {
              var tmp_0 = this;
              tmp_0.foo_1 = this.doo_1.hoo_1.moj(strings_getInstance().ynf_1) + ' ' + this.eoo_1.toString();
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var this_0 = this.doo_1.goo_1.n7d().qg4(this.eoo_1);
              suspendResult = first(new _no_name_provided__qut3iv(this_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            var it = suspendResult;
            var tmp_2 = it == null ? null : it.zg8_1;
            tmp_1.foo_1 = '' + tmp_2 + ' ' + (it == null ? null : it.ag9_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.foo_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetAssignmentSubmitterNameUseCase(repo, systemImpl) {
    this.goo_1 = repo;
    this.hoo_1 = systemImpl;
  }
  protoOf(GetAssignmentSubmitterNameUseCase).ioo = function (submitterUid, $completion) {
    var tmp = new $invokeCOROUTINE$13(this, submitterUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function ZipFileUseCase() {
  }
  function BlobTransferJobItem(blobUrl, transferJobItemUid, lockIdToRelease, estimatedSize, partialResponseFile) {
    lockIdToRelease = lockIdToRelease === VOID ? new Long(0, 0) : lockIdToRelease;
    estimatedSize = estimatedSize === VOID ? null : estimatedSize;
    partialResponseFile = partialResponseFile === VOID ? null : partialResponseFile;
    this.joo_1 = blobUrl;
    this.koo_1 = transferJobItemUid;
    this.loo_1 = lockIdToRelease;
    this.moo_1 = estimatedSize;
    this.noo_1 = partialResponseFile;
  }
  protoOf(BlobTransferJobItem).toString = function () {
    return 'BlobTransferJobItem(blobUrl=' + this.joo_1 + ', transferJobItemUid=' + this.koo_1 + ', lockIdToRelease=' + this.loo_1.toString() + ', estimatedSize=' + toString_0(this.moo_1) + ', partialResponseFile=' + this.noo_1 + ')';
  };
  protoOf(BlobTransferJobItem).hashCode = function () {
    var result = getStringHashCode(this.joo_1);
    result = imul(result, 31) + this.koo_1 | 0;
    result = imul(result, 31) + this.loo_1.hashCode() | 0;
    result = imul(result, 31) + (this.moo_1 == null ? 0 : this.moo_1.hashCode()) | 0;
    result = imul(result, 31) + (this.noo_1 == null ? 0 : getStringHashCode(this.noo_1)) | 0;
    return result;
  };
  protoOf(BlobTransferJobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BlobTransferJobItem))
      return false;
    var tmp0_other_with_cast = other instanceof BlobTransferJobItem ? other : THROW_CCE();
    if (!(this.joo_1 === tmp0_other_with_cast.joo_1))
      return false;
    if (!(this.koo_1 === tmp0_other_with_cast.koo_1))
      return false;
    if (!this.loo_1.equals(tmp0_other_with_cast.loo_1))
      return false;
    if (!equals(this.moo_1, tmp0_other_with_cast.moo_1))
      return false;
    if (!(this.noo_1 == tmp0_other_with_cast.noo_1))
      return false;
    return true;
  };
  function BlobTransferProgressUpdate(transferItem, bytesTransferred) {
    this.ooo_1 = transferItem;
    this.poo_1 = bytesTransferred;
  }
  protoOf(BlobTransferProgressUpdate).toString = function () {
    return 'Uid #' + this.ooo_1.koo_1 + ' transferred=' + this.poo_1.toString() + ' bytes';
  };
  protoOf(BlobTransferProgressUpdate).hashCode = function () {
    var result = this.ooo_1.hashCode();
    result = imul(result, 31) + this.poo_1.hashCode() | 0;
    return result;
  };
  protoOf(BlobTransferProgressUpdate).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BlobTransferProgressUpdate))
      return false;
    var tmp0_other_with_cast = other instanceof BlobTransferProgressUpdate ? other : THROW_CCE();
    if (!this.ooo_1.equals(tmp0_other_with_cast.ooo_1))
      return false;
    if (!this.poo_1.equals(tmp0_other_with_cast.poo_1))
      return false;
    return true;
  };
  function BlobTransferStatusUpdate(transferItem, status) {
    this.qoo_1 = transferItem;
    this.roo_1 = status;
  }
  protoOf(BlobTransferStatusUpdate).toString = function () {
    return 'BlobTransferStatusUpdate(transferItem=' + this.qoo_1 + ', status=' + this.roo_1 + ')';
  };
  protoOf(BlobTransferStatusUpdate).hashCode = function () {
    var result = this.qoo_1.hashCode();
    result = imul(result, 31) + this.roo_1 | 0;
    return result;
  };
  protoOf(BlobTransferStatusUpdate).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BlobTransferStatusUpdate))
      return false;
    var tmp0_other_with_cast = other instanceof BlobTransferStatusUpdate ? other : THROW_CCE();
    if (!this.qoo_1.equals(tmp0_other_with_cast.qoo_1))
      return false;
    if (!(this.roo_1 === tmp0_other_with_cast.roo_1))
      return false;
    return true;
  };
  function CancelDownloadUseCase() {
  }
  function MakeContentEntryAvailableOfflineUseCase(repo, nodeIdAndAuth, enqueueContentManifestDownloadUseCase) {
    this.soo_1 = repo;
    this.too_1 = nodeIdAndAuth;
    this.uoo_1 = enqueueContentManifestDownloadUseCase;
  }
  function GetContentManifestUseCase(db, repo, httpClient, json) {
    this.voo_1 = db;
    this.woo_1 = repo;
    this.xoo_1 = httpClient;
    this.yoo_1 = json;
  }
  function OpenBlobItem(uri, mimeType, fileName, fileSize) {
    this.zoo_1 = uri;
    this.aop_1 = mimeType;
    this.bop_1 = fileName;
    this.cop_1 = fileSize;
  }
  protoOf(OpenBlobItem).toString = function () {
    return 'OpenBlobItem(uri=' + this.zoo_1 + ', mimeType=' + this.aop_1 + ', fileName=' + this.bop_1 + ', fileSize=' + this.cop_1.toString() + ')';
  };
  protoOf(OpenBlobItem).hashCode = function () {
    var result = getStringHashCode(this.zoo_1);
    result = imul(result, 31) + getStringHashCode(this.aop_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.bop_1) | 0;
    result = imul(result, 31) + this.cop_1.hashCode() | 0;
    return result;
  };
  protoOf(OpenBlobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OpenBlobItem))
      return false;
    var tmp0_other_with_cast = other instanceof OpenBlobItem ? other : THROW_CCE();
    if (!(this.zoo_1 === tmp0_other_with_cast.zoo_1))
      return false;
    if (!(this.aop_1 === tmp0_other_with_cast.aop_1))
      return false;
    if (!(this.bop_1 === tmp0_other_with_cast.bop_1))
      return false;
    if (!this.cop_1.equals(tmp0_other_with_cast.cop_1))
      return false;
    return true;
  };
  function OpenBlobUiUseCase$invoke$lambda($onUiUpdate, $openItem) {
    return function (transferred, total) {
      $onUiUpdate(new OpeningBlobState($openItem, transferred, total));
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$17(_this__u8e3s4, openItem, onUiUpdate, intent, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lop_1 = _this__u8e3s4;
    this.mop_1 = openItem;
    this.nop_1 = onUiUpdate;
    this.oop_1 = intent;
  }
  protoOf($invokeCOROUTINE$17).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.nop_1(new OpeningBlobState(this.mop_1, new Long(0, 0), new Long(0, 0)));
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.lop_1.pop_1.rop(this.mop_1, OpenBlobUiUseCase$invoke$lambda(this.nop_1, this.mop_1), this.oop_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.nop_1(null);
            this.id_1 = 4;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.id_1 = 4;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().m5e('OpenBlobUiCase: could not open ' + this.mop_1, e);
              if (!(e instanceof CancellationException)) {
                var tmp_1 = new Long(0, 0);
                var tmp_2 = new Long(0, 0);
                var tmp0_elvis_lhs = e.message;
                this.nop_1(new OpeningBlobState(this.mop_1, tmp_1, tmp_2, tmp0_elvis_lhs == null ? this.lop_1.qop_1.moj(strings_getInstance().qmi_1) : tmp0_elvis_lhs));
              }
              this.hd_1 = 3;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            this.id_1 = 4;
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 4) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function OpenBlobUiUseCase(openBlobUseCase, systemImpl) {
    this.pop_1 = openBlobUseCase;
    this.qop_1 = systemImpl;
  }
  protoOf(OpenBlobUiUseCase).sop = function (openItem, onUiUpdate, intent, $completion) {
    var tmp = new $invokeCOROUTINE$17(this, openItem, onUiUpdate, intent, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  var OpenBlobIntent_VIEW_instance;
  var OpenBlobIntent_SEND_instance;
  var OpenBlobIntent_entriesInitialized;
  function OpenBlobIntent_initEntries() {
    if (OpenBlobIntent_entriesInitialized)
      return Unit_instance;
    OpenBlobIntent_entriesInitialized = true;
    OpenBlobIntent_VIEW_instance = new OpenBlobIntent('VIEW', 0);
    OpenBlobIntent_SEND_instance = new OpenBlobIntent('SEND', 1);
  }
  function OpenBlobIntent(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function OpenBlobIntent_VIEW_getInstance() {
    OpenBlobIntent_initEntries();
    return OpenBlobIntent_VIEW_instance;
  }
  function OpenBlobIntent_SEND_getInstance() {
    OpenBlobIntent_initEntries();
    return OpenBlobIntent_SEND_instance;
  }
  function OpenBlobUseCase() {
  }
  function OpeningBlobState(item, bytesReady, totalBytes, error) {
    error = error === VOID ? null : error;
    this.top_1 = item;
    this.uop_1 = bytesReady;
    this.vop_1 = totalBytes;
    this.wop_1 = error;
  }
  protoOf(OpeningBlobState).toString = function () {
    return 'OpeningBlobState(item=' + this.top_1 + ', bytesReady=' + this.uop_1.toString() + ', totalBytes=' + this.vop_1.toString() + ', error=' + this.wop_1 + ')';
  };
  protoOf(OpeningBlobState).hashCode = function () {
    var result = this.top_1.hashCode();
    result = imul(result, 31) + this.uop_1.hashCode() | 0;
    result = imul(result, 31) + this.vop_1.hashCode() | 0;
    result = imul(result, 31) + (this.wop_1 == null ? 0 : getStringHashCode(this.wop_1)) | 0;
    return result;
  };
  protoOf(OpeningBlobState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OpeningBlobState))
      return false;
    var tmp0_other_with_cast = other instanceof OpeningBlobState ? other : THROW_CCE();
    if (!this.top_1.equals(tmp0_other_with_cast.top_1))
      return false;
    if (!this.uop_1.equals(tmp0_other_with_cast.uop_1))
      return false;
    if (!this.vop_1.equals(tmp0_other_with_cast.vop_1))
      return false;
    if (!(this.wop_1 == tmp0_other_with_cast.wop_1))
      return false;
    return true;
  };
  function updateUris(_this__u8e3s4, $this, blobs, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(_this__u8e3s4, VOID, SaveAndUploadLocalUrisUseCase$updateUris$slambda_0(blobs, _this__u8e3s4, timeNow, null), $completion);
  }
  function SaveAndUploadLocalUrisUseCase$updateUris$slambda($blobs, $this_updateUris, $timeNow, resultContinuation) {
    this.foq_1 = $blobs;
    this.goq_1 = $this_updateUris;
    this.hoq_1 = $timeNow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).xny = function (_anonymous_parameter_0__qggqh8, $completion) {
    var tmp = this.yny(_anonymous_parameter_0__qggqh8, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.joq_1 = this.foq_1;
            this.koq_1 = this.joq_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.koq_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.loq_1 = this.koq_1.e();
            var tmp_1 = this;
            tmp_1.moq_1 = this.loq_1;
            this.noq_1 = this.moq_1.poq_1;
            if (this.noq_1 === 90) {
              this.hd_1 = 2;
              suspendResult = this.goq_1.s7e().dca(this.moq_1.ooq_1, this.moq_1.roq_1, this.hoq_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 1;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).yny = function (_anonymous_parameter_0__qggqh8, completion) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda(this.foq_1, this.goq_1, this.hoq_1, completion);
    i.ioq_1 = _anonymous_parameter_0__qggqh8;
    return i;
  };
  function SaveAndUploadLocalUrisUseCase$updateUris$slambda_0($blobs, $this_updateUris, $timeNow, resultContinuation) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda($blobs, $this_updateUris, $timeNow, resultContinuation);
    var l = function (_anonymous_parameter_0__qggqh8, $completion) {
      return i.xny(_anonymous_parameter_0__qggqh8, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$18(_this__u8e3s4, localUrisToSave, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.eor_1 = _this__u8e3s4;
    this.for_1 = localUrisToSave;
  }
  protoOf($invokeCOROUTINE$18).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            suspendResult = this.eor_1.ior_1.mor(this.for_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gor_1 = suspendResult;
            this.hor_1 = this.eor_1.jor_1;
            if (!(this.hor_1 == null)) {
              this.hd_1 = 3;
              suspendResult = updateUris(this.eor_1.kor_1, this.eor_1, this.gor_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              var tmp0_elvis_lhs = this.eor_1.lor_1;
              suspendResult = updateUris(tmp0_elvis_lhs == null ? this.eor_1.kor_1 : tmp0_elvis_lhs, this.eor_1, this.gor_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.hd_1 = 4;
            var this_0 = this.gor_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              var tmp0_blobUrl = item.roq_1;
              var tmp1_entityUid = item.ooq_1;
              var tmp2_tableId = item.poq_1;
              var tmp3_retentionLockIdToRelease = item.soq_1;
              destination.i1(new EnqueueBlobUploadItem(tmp0_blobUrl, tmp2_tableId, tmp1_entityUid, tmp3_retentionLockIdToRelease));
            }

            suspendResult = this.hor_1.nor(destination, randomUuidAsString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SaveAndUploadLocalUrisUseCase(saveLocalUrisAsBlobsUseCase, enqueueBlobUploadClientUseCase, activeDb, activeRepo) {
    this.ior_1 = saveLocalUrisAsBlobsUseCase;
    this.jor_1 = enqueueBlobUploadClientUseCase;
    this.kor_1 = activeDb;
    this.lor_1 = activeRepo;
  }
  protoOf(SaveAndUploadLocalUrisUseCase).oor = function (localUrisToSave, $completion) {
    var tmp = new $invokeCOROUTINE$18(this, localUrisToSave, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_33() {
  }
  protoOf(Companion_33).n4r = function () {
    return $serializer_getInstance_44();
  };
  var Companion_instance_82;
  function Companion_getInstance_50() {
    return Companion_instance_82;
  }
  function $serializer_32() {
    $serializer_instance_32 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.blob.savelocaluris.SaveLocalUrisAsBlobsUseCase.SavedBlob', this, 8);
    tmp0_serialDesc.t4f('entityUid', false);
    tmp0_serialDesc.t4f('tableId', false);
    tmp0_serialDesc.t4f('localUri', false);
    tmp0_serialDesc.t4f('blobUrl', false);
    tmp0_serialDesc.t4f('retentionLockId', true);
    tmp0_serialDesc.t4f('integrity', false);
    tmp0_serialDesc.t4f('mimeType', false);
    tmp0_serialDesc.t4f('storageSize', false);
    this.por_1 = tmp0_serialDesc;
  }
  protoOf($serializer_32).q44 = function () {
    return this.por_1;
  };
  protoOf($serializer_32).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [LongSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_32).s44 = function (decoder) {
    var tmp0_desc = this.por_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = new Long(0, 0);
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = new Long(0, 0);
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = new Long(0, 0);
    var tmp12_input = decoder.i48(tmp0_desc);
    if (tmp12_input.x48()) {
      tmp4_local0 = tmp12_input.o48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.n48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.o48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.s48(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.s48(tmp0_desc, 6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.o48(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.o48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.n48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.o48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.s48(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.s48(tmp0_desc, 6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.o48(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.j48(tmp0_desc);
    return SavedBlob_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, null);
  };
  protoOf($serializer_32).qor = function (encoder, value) {
    var tmp0_desc = this.por_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.s49(tmp0_desc, 0, value.ooq_1);
    tmp1_output.r49(tmp0_desc, 1, value.poq_1);
    tmp1_output.w49(tmp0_desc, 2, value.qoq_1);
    tmp1_output.w49(tmp0_desc, 3, value.roq_1);
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !value.soq_1.equals(new Long(0, 0))) {
      tmp1_output.s49(tmp0_desc, 4, value.soq_1);
    }
    tmp1_output.w49(tmp0_desc, 5, value.toq_1);
    tmp1_output.w49(tmp0_desc, 6, value.uoq_1);
    tmp1_output.s49(tmp0_desc, 7, value.voq_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_32).r44 = function (encoder, value) {
    return this.qor(encoder, value instanceof SavedBlob ? value : THROW_CCE());
  };
  var $serializer_instance_32;
  function $serializer_getInstance_44() {
    if ($serializer_instance_32 == null)
      new $serializer_32();
    return $serializer_instance_32;
  }
  function SavedBlob_init_$Init$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker, $this) {
    if (!(239 === (239 & seen1))) {
      throwMissingFieldException(seen1, 239, $serializer_getInstance_44().por_1);
    }
    $this.ooq_1 = entityUid;
    $this.poq_1 = tableId;
    $this.qoq_1 = localUri;
    $this.roq_1 = blobUrl;
    if (0 === (seen1 & 16))
      $this.soq_1 = new Long(0, 0);
    else
      $this.soq_1 = retentionLockId;
    $this.toq_1 = integrity;
    $this.uoq_1 = mimeType;
    $this.voq_1 = storageSize;
    return $this;
  }
  function SavedBlob_init_$Create$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker) {
    return SavedBlob_init_$Init$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker, objectCreate(protoOf(SavedBlob)));
  }
  function SaveLocalUriAsBlobItem(localUri, entityUid, tableId, mimeType, deleteLocalUriAfterSave, createRetentionLock, extraHeaders) {
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    tableId = tableId === VOID ? 0 : tableId;
    mimeType = mimeType === VOID ? null : mimeType;
    deleteLocalUriAfterSave = deleteLocalUriAfterSave === VOID ? false : deleteLocalUriAfterSave;
    createRetentionLock = createRetentionLock === VOID ? false : createRetentionLock;
    extraHeaders = extraHeaders === VOID ? Companion_instance_139.b4e() : extraHeaders;
    this.ror_1 = localUri;
    this.sor_1 = entityUid;
    this.tor_1 = tableId;
    this.uor_1 = mimeType;
    this.vor_1 = deleteLocalUriAfterSave;
    this.wor_1 = createRetentionLock;
    this.xor_1 = extraHeaders;
  }
  protoOf(SaveLocalUriAsBlobItem).toString = function () {
    return 'SaveLocalUriAsBlobItem(localUri=' + this.ror_1 + ', entityUid=' + this.sor_1.toString() + ', tableId=' + this.tor_1 + ', mimeType=' + this.uor_1 + ', deleteLocalUriAfterSave=' + this.vor_1 + ', createRetentionLock=' + this.wor_1 + ', extraHeaders=' + this.xor_1 + ')';
  };
  protoOf(SaveLocalUriAsBlobItem).hashCode = function () {
    var result = getStringHashCode(this.ror_1);
    result = imul(result, 31) + this.sor_1.hashCode() | 0;
    result = imul(result, 31) + this.tor_1 | 0;
    result = imul(result, 31) + (this.uor_1 == null ? 0 : getStringHashCode(this.uor_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vor_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wor_1) | 0;
    result = imul(result, 31) + hashCode(this.xor_1) | 0;
    return result;
  };
  protoOf(SaveLocalUriAsBlobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SaveLocalUriAsBlobItem))
      return false;
    var tmp0_other_with_cast = other instanceof SaveLocalUriAsBlobItem ? other : THROW_CCE();
    if (!(this.ror_1 === tmp0_other_with_cast.ror_1))
      return false;
    if (!this.sor_1.equals(tmp0_other_with_cast.sor_1))
      return false;
    if (!(this.tor_1 === tmp0_other_with_cast.tor_1))
      return false;
    if (!(this.uor_1 == tmp0_other_with_cast.uor_1))
      return false;
    if (!(this.vor_1 === tmp0_other_with_cast.vor_1))
      return false;
    if (!(this.wor_1 === tmp0_other_with_cast.wor_1))
      return false;
    if (!equals(this.xor_1, tmp0_other_with_cast.xor_1))
      return false;
    return true;
  };
  function SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    retentionLockId = retentionLockId === VOID ? new Long(0, 0) : retentionLockId;
    this.ooq_1 = entityUid;
    this.poq_1 = tableId;
    this.qoq_1 = localUri;
    this.roq_1 = blobUrl;
    this.soq_1 = retentionLockId;
    this.toq_1 = integrity;
    this.uoq_1 = mimeType;
    this.voq_1 = storageSize;
  }
  protoOf(SavedBlob).yor = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    return new SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).zor = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, $super) {
    entityUid = entityUid === VOID ? this.ooq_1 : entityUid;
    tableId = tableId === VOID ? this.poq_1 : tableId;
    localUri = localUri === VOID ? this.qoq_1 : localUri;
    blobUrl = blobUrl === VOID ? this.roq_1 : blobUrl;
    retentionLockId = retentionLockId === VOID ? this.soq_1 : retentionLockId;
    integrity = integrity === VOID ? this.toq_1 : integrity;
    mimeType = mimeType === VOID ? this.uoq_1 : mimeType;
    storageSize = storageSize === VOID ? this.voq_1 : storageSize;
    return $super === VOID ? this.yor(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) : $super.yor.call(this, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).toString = function () {
    return 'SavedBlob(entityUid=' + this.ooq_1.toString() + ', tableId=' + this.poq_1 + ', localUri=' + this.qoq_1 + ', blobUrl=' + this.roq_1 + ', retentionLockId=' + this.soq_1.toString() + ', integrity=' + this.toq_1 + ', mimeType=' + this.uoq_1 + ', storageSize=' + this.voq_1.toString() + ')';
  };
  protoOf(SavedBlob).hashCode = function () {
    var result = this.ooq_1.hashCode();
    result = imul(result, 31) + this.poq_1 | 0;
    result = imul(result, 31) + getStringHashCode(this.qoq_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.roq_1) | 0;
    result = imul(result, 31) + this.soq_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.toq_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.uoq_1) | 0;
    result = imul(result, 31) + this.voq_1.hashCode() | 0;
    return result;
  };
  protoOf(SavedBlob).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SavedBlob))
      return false;
    var tmp0_other_with_cast = other instanceof SavedBlob ? other : THROW_CCE();
    if (!this.ooq_1.equals(tmp0_other_with_cast.ooq_1))
      return false;
    if (!(this.poq_1 === tmp0_other_with_cast.poq_1))
      return false;
    if (!(this.qoq_1 === tmp0_other_with_cast.qoq_1))
      return false;
    if (!(this.roq_1 === tmp0_other_with_cast.roq_1))
      return false;
    if (!this.soq_1.equals(tmp0_other_with_cast.soq_1))
      return false;
    if (!(this.toq_1 === tmp0_other_with_cast.toq_1))
      return false;
    if (!(this.uoq_1 === tmp0_other_with_cast.uoq_1))
      return false;
    if (!this.voq_1.equals(tmp0_other_with_cast.voq_1))
      return false;
    return true;
  };
  function SaveLocalUrisAsBlobsUseCase$invoke$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function SaveLocalUrisAsBlobsUseCase() {
  }
  function EnqueueSavePictureUseCase() {
  }
  function imageDaoForTable(_this__u8e3s4, $this, tableId) {
    var tmp;
    if (tableId === 50) {
      tmp = _this__u8e3s4.f7e();
    } else {
      if (tableId === 125) {
        tmp = _this__u8e3s4.d7f();
      } else {
        if (tableId === 6677) {
          tmp = _this__u8e3s4.q7f();
        } else {
          if (tableId === 6678) {
            tmp = _this__u8e3s4.r7f();
          } else {
            tmp = null;
          }
        }
      }
    }
    return tmp;
  }
  function Companion_34() {
    this.cos_1 = 160;
  }
  var Companion_instance_83;
  function Companion_getInstance_51() {
    return Companion_instance_83;
  }
  function $invokeCOROUTINE$19(_this__u8e3s4, entityUid, tableId, pictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.los_1 = _this__u8e3s4;
    this.mos_1 = entityUid;
    this.nos_1 = tableId;
    this.oos_1 = pictureUri;
  }
  protoOf($invokeCOROUTINE$19).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 21;
            var tmp0_safe_receiver = this.oos_1;
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              var tmp_1;
              if (charSequenceLength(tmp0_safe_receiver) === 0) {
                tmp_1 = null;
              } else {
                tmp_1 = tmp0_safe_receiver;
              }
              tmp_0 = tmp_1;
            }

            if (!(tmp_0 == null)) {
              this.pos_1 = Companion_getInstance_3().o2r(this.oos_1);
              this.qos_1 = this.los_1.xot_1;
              if (this.qos_1 == null) {
                this.ros_1 = null;
                this.hd_1 = 4;
                continue $sm;
              } else {
                this.hd_1 = 3;
                suspendResult = getLocalUriIfRemote(this.qos_1, this.pos_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              var tmp_2 = this;
              var tmp12_elvis_lhs = this.los_1.uot_1;
              tmp_2.sos_1 = imageDaoForTable(tmp12_elvis_lhs == null ? this.los_1.tot_1 : tmp12_elvis_lhs, this.los_1, this.nos_1);
              if (this.sos_1 == null) {
                this.tos_1 = null;
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.sos_1.ubi(this.mos_1, null, null, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp_3 = this;
            tmp_3.tos_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hd_1 = 20;
            continue $sm;
          case 3:
            this.ros_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.uos_1 = this.ros_1;
            this.vos_1 = this.uos_1 == null ? this.pos_1 : this.uos_1;
            this.hd_1 = 5;
            suspendResult = this.los_1.vot_1.yot(this.vos_1.toString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.wos_1 = suspendResult;
            this.hd_1 = 6;
            suspendResult = this.los_1.vot_1.yot(this.vos_1.toString(), VOID, new CompressParams(160, 160), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.xos_1 = suspendResult;
            this.yos_1 = this.los_1.rot_1;
            var tmp_4 = this;
            tmp_4.zos_1 = ArrayList_init_$Create$();
            var tmp_5 = this;
            tmp_5.aot_1 = this.zos_1;
            if (this.wos_1 == null)
              null;
            else {
              this.aot_1.i1(new SaveLocalUriAsBlobItem(this.wos_1.zot_1, this.mos_1, this.nos_1, this.wos_1.aou_1, true, true));
            }

            if (this.xos_1 == null)
              null;
            else {
              this.aot_1.i1(new SaveLocalUriAsBlobItem(this.xos_1.zot_1, this.mos_1, this.nos_1, this.xos_1.aou_1, true, true));
            }

            if (this.wos_1 == null ? true : this.xos_1 == null) {
              this.hd_1 = 7;
              suspendResult = isRemote(this.pos_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.bot_1 = false;
              this.hd_1 = 8;
              continue $sm;
            }

          case 7:
            this.cot_1 = suspendResult;
            this.bot_1 = !this.cot_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.dot_1 = this.bot_1;
            if (this.dot_1) {
              this.aot_1.i1(new SaveLocalUriAsBlobItem(this.oos_1, this.mos_1, this.nos_1, VOID, VOID, true));
            }

            this.eot_1 = this.zos_1;
            this.fot_1 = this.eot_1.f3();
            this.hd_1 = 9;
            suspendResult = this.yos_1.mor(this.fot_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            this.got_1 = suspendResult;
            this.hd_1 = 10;
            suspendResult = this.los_1.wot_1.dou(listOf_0(this.oos_1), true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.got_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.qoq_1 === this.oos_1) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp3_safe_receiver = tmp$ret$0;
            var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.roq_1;
            tmp_6.hot_1 = tmp4_elvis_lhs == null ? this.pos_1.toString() : tmp4_elvis_lhs;
            var tmp_7 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_0 = this.got_1.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                var tmp0_safe_receiver_0 = this.wos_1;
                if (element_0.qoq_1 === (tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.zot_1)) {
                  tmp$ret$2 = element_0;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = null;
            }
             while (false);
            var tmp5_safe_receiver = tmp$ret$2;
            var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.roq_1;
            tmp_7.iot_1 = tmp6_elvis_lhs == null ? this.hot_1 : tmp6_elvis_lhs;
            var tmp_8 = this;
            var tmp$ret$4;
            l$ret$5: do {
              var tmp0_iterator_1 = this.got_1.w();
              while (tmp0_iterator_1.f()) {
                var element_1 = tmp0_iterator_1.e();
                var tmp0_safe_receiver_1 = this.xos_1;
                if (element_1.qoq_1 === (tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.zot_1)) {
                  tmp$ret$4 = element_1;
                  break l$ret$5;
                }
              }
              tmp$ret$4 = null;
            }
             while (false);
            var tmp7_safe_receiver = tmp$ret$4;
            var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.roq_1;
            tmp_8.jot_1 = tmp8_elvis_lhs == null ? this.hot_1 : tmp8_elvis_lhs;
            if (!(this.los_1.sot_1 == null)) {
              if (this.wos_1 == null ? true : this.xos_1 == null) {
                this.hd_1 = 13;
                suspendResult = isRemote(this.pos_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.lot_1 = false;
                this.hd_1 = 14;
                continue $sm;
              }
            } else {
              var tmp_9 = this;
              var tmp10_elvis_lhs = this.los_1.uot_1;
              tmp_9.mot_1 = imageDaoForTable(tmp10_elvis_lhs == null ? this.los_1.tot_1 : tmp10_elvis_lhs, this.los_1, this.nos_1);
              if (this.mot_1 == null) {
                this.not_1 = null;
                this.hd_1 = 12;
                continue $sm;
              } else {
                this.hd_1 = 11;
                suspendResult = this.mot_1.ubi(this.mos_1, this.iot_1, this.jot_1, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 11:
            var tmp_10 = this;
            tmp_10.not_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            this.hd_1 = 19;
            continue $sm;
          case 13:
            this.lot_1 = suspendResult;
            this.hd_1 = 14;
            continue $sm;
          case 14:
            if (this.lot_1) {
              var tmp_11 = this;
              tmp_11.kot_1 = new EnqueueBlobUploadItem(this.pos_1.toString(), this.nos_1, this.mos_1, new Long(0, 0));
              this.hd_1 = 15;
              continue $sm;
            } else {
              var tmp_12 = this;
              tmp_12.kot_1 = null;
              this.hd_1 = 15;
              continue $sm;
            }

          case 15:
            this.oot_1 = this.kot_1;
            this.pot_1 = imageDaoForTable(this.los_1.tot_1, this.los_1, this.nos_1);
            if (this.pot_1 == null) {
              this.qot_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              this.hd_1 = 16;
              suspendResult = this.pot_1.ubi(this.mos_1, this.iot_1, this.jot_1, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            var tmp_13 = this;
            tmp_13.qot_1 = Unit_instance;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            Napier_getInstance().i5e('SavePictureUseCase: Set picture url = ' + this.iot_1 + ' on entity=' + this.mos_1.toString() + ' table=' + this.nos_1);
            this.hd_1 = 18;
            var this_0 = this.got_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator_2 = this_0.w();
            while (tmp0_iterator_2.f()) {
              var item = tmp0_iterator_2.e();
              destination.i1(new EnqueueBlobUploadItem(item.roq_1, this.nos_1, this.mos_1, item.soq_1));
            }

            var this_1 = listOf_0(this.oot_1);
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_3 = this_1.w();
            while (tmp0_iterator_3.f()) {
              var element_2 = tmp0_iterator_3.e();
              if (element_2 == null)
                null;
              else {
                destination_0.i1(element_2);
              }
            }

            suspendResult = this.los_1.sot_1.nor(plus(destination, destination_0), randomUuidAsString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 18:
            this.hd_1 = 19;
            continue $sm;
          case 19:
            this.hd_1 = 20;
            continue $sm;
          case 20:
            return Unit_instance;
          case 21:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 21) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SavePictureUseCase(saveLocalUrisAsBlobUseCase, enqueueBlobUploadClientUseCase, db, repo, compressImageUseCase, deleteUrisUseCase, getStoragePathForUrlUseCase) {
    getStoragePathForUrlUseCase = getStoragePathForUrlUseCase === VOID ? null : getStoragePathForUrlUseCase;
    this.rot_1 = saveLocalUrisAsBlobUseCase;
    this.sot_1 = enqueueBlobUploadClientUseCase;
    this.tot_1 = db;
    this.uot_1 = repo;
    this.vot_1 = compressImageUseCase;
    this.wot_1 = deleteUrisUseCase;
    this.xot_1 = getStoragePathForUrlUseCase;
  }
  protoOf(SavePictureUseCase).bos = function (entityUid, tableId, pictureUri, $completion) {
    var tmp = new $invokeCOROUTINE$19(this, entityUid, tableId, pictureUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function TransferJobItemStatusUpdater$commit$slambda$lambda($updateTransferJobStatusUid, $numUpdates) {
    return function () {
      return 'TransferJobItemStatusUpdater: update status complete for ' + ('' + $updateTransferJobStatusUid + ' updates=' + $numUpdates);
    };
  }
  function TransferJobItemStatusUpdater$updateJob$slambda(this$0, resultContinuation) {
    this.mou_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!get_isActive(this.nou_1)) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.hd_1 = 2;
            suspendResult = delay(this.mou_1.qou_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.mou_1.vou(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 1;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).v1m = function ($this$launch, completion) {
    var i = new TransferJobItemStatusUpdater$updateJob$slambda(this.mou_1, completion);
    i.nou_1 = $this$launch;
    return i;
  };
  function TransferJobItemStatusUpdater$updateJob$slambda_0(this$0, resultContinuation) {
    var i = new TransferJobItemStatusUpdater$updateJob$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TransferJobItemStatusUpdater$commit$slambda($progressUpdatesToCommit, this$0, $statusUpdatesToCommit, $repoNodeId, $updateTransferJobStatusUid, resultContinuation) {
    this.eov_1 = $progressUpdatesToCommit;
    this.fov_1 = this$0;
    this.gov_1 = $statusUpdatesToCommit;
    this.hov_1 = $repoNodeId;
    this.iov_1 = $updateTransferJobStatusUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TransferJobItemStatusUpdater$commit$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            tmp_0.kov_1 = this.eov_1;
            this.lov_1 = this.kov_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.lov_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.mov_1 = this.lov_1.e();
            var tmp_1 = this;
            tmp_1.nov_1 = this.mov_1;
            this.hd_1 = 2;
            suspendResult = this.fov_1.oou_1.k7f().vie(this.nov_1.ooo_1.koo_1, this.nov_1.poo_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 1;
            continue $sm;
          case 3:
            var tmp_2 = this;
            tmp_2.oov_1 = this.gov_1;
            this.pov_1 = this.oov_1.w();
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (!this.pov_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.qov_1 = this.pov_1.e();
            var tmp_3 = this;
            tmp_3.rov_1 = this.qov_1;
            this.hd_1 = 5;
            suspendResult = this.fov_1.oou_1.k7f().wie(this.rov_1.qoo_1.koo_1, this.rov_1.roo_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            if (this.rov_1.roo_1 === TransferJobItemStatus_COMPLETE_getInstance().qkb_1 ? !(this.hov_1 == null) : false) {
              this.hd_1 = 6;
              suspendResult = this.fov_1.oou_1.k7f().xie(this.hov_1, this.rov_1.qoo_1.koo_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 7;
              continue $sm;
            }

          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.hd_1 = 4;
            continue $sm;
          case 8:
            if (!(this.iov_1 === 0)) {
              this.hd_1 = 9;
              suspendResult = this.fov_1.oou_1.j7f().lic(this.iov_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              continue $sm;
            }

          case 9:
            var numUpdates = suspendResult;
            var tmp_4 = Napier_getInstance();
            tmp_4.k5e(VOID, VOID, TransferJobItemStatusUpdater$commit$slambda$lambda(this.iov_1, numUpdates));
            this.hd_1 = 10;
            continue $sm;
          case 10:
            return Unit_instance;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).yny = function (it, completion) {
    var i = new TransferJobItemStatusUpdater$commit$slambda(this.eov_1, this.fov_1, this.gov_1, this.hov_1, this.iov_1, completion);
    i.jov_1 = it;
    return i;
  };
  function TransferJobItemStatusUpdater$commit$slambda_0($progressUpdatesToCommit, this$0, $statusUpdatesToCommit, $repoNodeId, $updateTransferJobStatusUid, resultContinuation) {
    var i = new TransferJobItemStatusUpdater$commit$slambda($progressUpdatesToCommit, this$0, $statusUpdatesToCommit, $repoNodeId, $updateTransferJobStatusUid, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $commitCOROUTINE$20(_this__u8e3s4, updateTransferJobStatusUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.aow_1 = _this__u8e3s4;
    this.bow_1 = updateTransferJobStatusUid;
  }
  protoOf($commitCOROUTINE$20).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.cow_1 = this.aow_1.sou_1.atomicfu$getAndSet(emptyList());
            this.dow_1 = this.aow_1.tou_1.atomicfu$getAndSet(emptyList());
            var tmp_0 = this;
            var this_0 = this.cow_1;
            var map = LinkedHashMap_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var key = element.ooo_1.koo_1;
              map.s(key, element);
            }

            tmp_0.eow_1 = toList(map.p2());
            var tmp_1 = this;
            var this_1 = this.dow_1;
            var map_0 = LinkedHashMap_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var key_0 = element_0.qoo_1.koo_1;
              map_0.s(key_0, element_0);
            }

            tmp_1.fow_1 = toList(map_0.p2());
            var tmp_2 = this;
            var tmp_3 = this.aow_1.pou_1;
            var tmp0_safe_receiver = (!(tmp_3 == null) ? isInterface(tmp_3, DoorDatabaseRepository) : false) ? tmp_3 : null;
            tmp_2.gow_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m61();
            var tmp_4 = this;
            var this_2 = this.aow_1.oou_1;
            var tmp_5;
            var tmp_6;
            var tmp_7;
            if (!this.eow_1.c1()) {
              tmp_7 = true;
            } else {
              tmp_7 = !this.fow_1.c1();
            }

            if (tmp_7) {
              tmp_6 = true;
            } else {
              tmp_6 = !(this.bow_1 === 0);
            }

            if (tmp_6) {
              tmp_5 = this_2;
            } else {
              tmp_5 = null;
            }

            tmp_4.how_1 = tmp_5;
            if (this.how_1 == null) {
              this.iow_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = withDoorTransactionAsync(this.how_1, VOID, TransferJobItemStatusUpdater$commit$slambda_0(this.eow_1, this.aow_1, this.fow_1, this.gow_1, this.bow_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_8 = this;
            tmp_8.iow_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $onFinishedCOROUTINE$21(_this__u8e3s4, updateTransferJobStatusUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.row_1 = _this__u8e3s4;
    this.sow_1 = updateTransferJobStatusUid;
  }
  protoOf($onFinishedCOROUTINE$21).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!this.row_1.rou_1.atomicfu$getAndSet(true)) {
              this.row_1.uou_1.mr();
              this.hd_1 = 1;
              suspendResult = this.row_1.tow(this.sow_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function TransferJobItemStatusUpdater(db, repo, scope, commitInterval) {
    commitInterval = commitInterval === VOID ? new Long(500, 0) : commitInterval;
    this.oou_1 = db;
    this.pou_1 = repo;
    this.qou_1 = commitInterval;
    this.rou_1 = atomic$boolean$1(false);
    this.sou_1 = atomic$ref$1(emptyList());
    this.tou_1 = atomic$ref$1(emptyList());
    var tmp = this;
    tmp.uou_1 = launch(scope, VOID, VOID, TransferJobItemStatusUpdater$updateJob$slambda_0(this, null));
  }
  protoOf(TransferJobItemStatusUpdater).uow = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.sou_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.blob.transferjobitem.TransferJobItemStatusUpdater.onProgressUpdate.<anonymous>' call
        var upd = plus_1(cur, update);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(TransferJobItemStatusUpdater).vow = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.tou_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.blob.transferjobitem.TransferJobItemStatusUpdater.onStatusUpdate.<anonymous>' call
        var upd = plus_1(cur, update);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(TransferJobItemStatusUpdater).tow = function (updateTransferJobStatusUid, $completion) {
    var tmp = new $commitCOROUTINE$20(this, updateTransferJobStatusUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater).vou = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.tow(updateTransferJobStatusUid, $completion) : $super.tow.call(this, updateTransferJobStatusUid, $completion);
  };
  protoOf(TransferJobItemStatusUpdater).wow = function (updateTransferJobStatusUid, $completion) {
    var tmp = new $onFinishedCOROUTINE$21(this, updateTransferJobStatusUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater).xow = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.wow(updateTransferJobStatusUid, $completion) : $super.wow.call(this, updateTransferJobStatusUid, $completion);
  };
  function $invokeCOROUTINE$22(_this__u8e3s4, db, tableId, entityUid, transferJobItemUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gox_1 = _this__u8e3s4;
    this.hox_1 = db;
    this.iox_1 = tableId;
    this.jox_1 = entityUid;
    this.kox_1 = transferJobItemUid;
  }
  protoOf($invokeCOROUTINE$22).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.lox_1 = this.iox_1;
            if (this.lox_1 === 50) {
              this.hd_1 = 2;
              suspendResult = this.hox_1.f7e().ibq(this.jox_1, this.kox_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.lox_1 === 738) {
                this.hd_1 = 1;
                suspendResult = this.hox_1.i7f().ibq(this.jox_1, this.kox_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 3;
                continue $sm;
              }
            }

          case 1:
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UpdateTransferJobItemEtagUseCase() {
  }
  protoOf(UpdateTransferJobItemEtagUseCase).mox = function (db, tableId, entityUid, transferJobItemUid, $completion) {
    var tmp = new $invokeCOROUTINE$22(this, db, tableId, entityUid, transferJobItemUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_35() {
    this.nox_1 = 'X-Blob-Response-';
    this.oox_1 = 'Blob-Upload-Batch-Uuid';
  }
  var Companion_instance_84;
  function Companion_getInstance_52() {
    return Companion_instance_84;
  }
  function CancelBlobUploadClientUseCase() {
  }
  function EnqueueBlobUploadItem(blobUrl, tableId, entityUid, retentionLockIdToRelease) {
    tableId = tableId === VOID ? 0 : tableId;
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    retentionLockIdToRelease = retentionLockIdToRelease === VOID ? new Long(0, 0) : retentionLockIdToRelease;
    this.pox_1 = blobUrl;
    this.qox_1 = tableId;
    this.rox_1 = entityUid;
    this.sox_1 = retentionLockIdToRelease;
  }
  protoOf(EnqueueBlobUploadItem).toString = function () {
    return 'EnqueueBlobUploadItem(blobUrl=' + this.pox_1 + ', tableId=' + this.qox_1 + ', entityUid=' + this.rox_1.toString() + ', retentionLockIdToRelease=' + this.sox_1.toString() + ')';
  };
  protoOf(EnqueueBlobUploadItem).hashCode = function () {
    var result = getStringHashCode(this.pox_1);
    result = imul(result, 31) + this.qox_1 | 0;
    result = imul(result, 31) + this.rox_1.hashCode() | 0;
    result = imul(result, 31) + this.sox_1.hashCode() | 0;
    return result;
  };
  protoOf(EnqueueBlobUploadItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EnqueueBlobUploadItem))
      return false;
    var tmp0_other_with_cast = other instanceof EnqueueBlobUploadItem ? other : THROW_CCE();
    if (!(this.pox_1 === tmp0_other_with_cast.pox_1))
      return false;
    if (!(this.qox_1 === tmp0_other_with_cast.qox_1))
      return false;
    if (!this.rox_1.equals(tmp0_other_with_cast.rox_1))
      return false;
    if (!this.sox_1.equals(tmp0_other_with_cast.sox_1))
      return false;
    return true;
  };
  function EnqueueBlobUploadClientUseCase() {
  }
  function getLocalUriIfRemote(_this__u8e3s4, uri, $completion) {
    var tmp = new $getLocalUriIfRemoteCOROUTINE$23(_this__u8e3s4, uri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $getLocalUriIfRemoteCOROUTINE$23(_this__u8e3s4, uri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.coy_1 = _this__u8e3s4;
    this.doy_1 = uri;
  }
  protoOf($getLocalUriIfRemoteCOROUTINE$23).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = isRemote(this.doy_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (suspendResult) {
              this.foy_1 = Companion_getInstance_3();
              this.hd_1 = 2;
              suspendResult = this.coy_1.goy(this.doy_1.toString(), VOID, VOID, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.eoy_1 = this.doy_1;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = ARGUMENT.hoy_1;
            this.eoy_1 = this.foy_1.o2r(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.eoy_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetStoragePathForUrlUseCase$invoke$lambda(it) {
    return Unit_instance;
  }
  function GetStoragePathForUrlUseCase() {
  }
  function CreateNewClazzUseCase$invoke$slambda($clazz, this$0, resultContinuation) {
    this.soy_1 = $clazz;
    this.toy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CreateNewClazzUseCase$invoke$slambda).iok = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.iok(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var this_0 = this.soy_1;
            var tmp_0;
            if (this_0.o8e_1 == null) {
              tmp_0 = this_0;
            } else {
              tmp_0 = null;
            }

            var tmp0_safe_receiver = tmp_0;
            if (tmp0_safe_receiver != null) {
              var tmp_1 = tmp0_safe_receiver;
              Companion_getInstance_4();
              tmp_1.o8e_1 = randomString(6);
            }

            this.hd_1 = 1;
            suspendResult = this.toy_1.woy_1.o7d().insertAsync(this.soy_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.voy_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_2 = this.toy_1.woy_1.o7f();
            var tmp_3 = this.soy_1.r8d_1;
            Companion_getInstance_5();
            suspendResult = tmp_2.ddk(new CoursePermission(VOID, VOID, tmp_3, 1001, VOID, VOID, new Long(8703, 0)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            var tmp_4 = this.toy_1.woy_1.o7f();
            var tmp_5 = this.soy_1.r8d_1;
            Companion_getInstance_5();
            suspendResult = tmp_4.ddk(new CoursePermission(VOID, VOID, tmp_5, 1000, VOID, VOID, new Long(8193, 0)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return this.voy_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new CreateNewClazzUseCase$invoke$slambda(this.soy_1, this.toy_1, completion);
    i.uoy_1 = it;
    return i;
  };
  function CreateNewClazzUseCase$invoke$slambda_0($clazz, this$0, resultContinuation) {
    var i = new CreateNewClazzUseCase$invoke$slambda($clazz, this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.iok(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CreateNewClazzUseCase(repoOrDb) {
    this.woy_1 = repoOrDb;
  }
  protoOf(CreateNewClazzUseCase).xoy = function (clazz, $completion) {
    return withDoorTransactionAsync(this.woy_1, VOID, CreateNewClazzUseCase$invoke$slambda_0(clazz, this, null), $completion);
  };
  function AlreadyEnroledInClassException() {
    Exception_init_$Init$_0(this);
    captureStack(this, AlreadyEnroledInClassException);
  }
  function AlreadyHasPendingRequestException() {
    IllegalStateException_init_$Init$_0(this);
    captureStack(this, AlreadyHasPendingRequestException);
  }
  function ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda($approved, this$0, $enrolmentRequest, $effectiveClazz, resultContinuation) {
    this.goz_1 = $approved;
    this.hoz_1 = this$0;
    this.ioz_1 = $enrolmentRequest;
    this.joz_1 = $effectiveClazz;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (this.goz_1) {
              this.hd_1 = 1;
              var tmp_0 = this.ioz_1.ley_1;
              var tmp_1 = this.ioz_1.ney_1;
              var tmp_2 = ClazzEnrolment_init_$Create$(tmp_0, tmp_1, 1000);
              var tmp0_elvis_lhs = this.joz_1.j8e_1;
              suspendResult = this.hoz_1.poz_1.soz(tmp_2, tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.loz_1 = 3;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var tmp_4 = this;
            tmp_4.loz_1 = 2;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.moz_1 = this.loz_1;
            this.hd_1 = 3;
            var tmp1_elvis_lhs = this.hoz_1.ooz_1;
            suspendResult = (tmp1_elvis_lhs == null ? this.hoz_1.noz_1 : tmp1_elvis_lhs).n7f().uex(this.ioz_1.key_1, this.moz_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda(this.goz_1, this.hoz_1, this.ioz_1, this.joz_1, completion);
    i.koz_1 = it;
    return i;
  };
  function ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda_0($approved, this$0, $enrolmentRequest, $effectiveClazz, resultContinuation) {
    var i = new ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda($approved, this$0, $enrolmentRequest, $effectiveClazz, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$24(_this__u8e3s4, enrolmentRequest, approved, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.bp0_1 = _this__u8e3s4;
    this.cp0_1 = enrolmentRequest;
    this.dp0_1 = approved;
  }
  protoOf($invokeCOROUTINE$24).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.bp0_1.noz_1.o7d().s8c(this.cp0_1.ley_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ep0_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.ep0_1 == null) {
              throw IllegalStateException_init_$Create$('Class does not exist');
            } else {
              tmp_1 = this.ep0_1;
            }

            tmp_0.fp0_1 = tmp_1;
            this.hd_1 = 2;
            var tmp1_elvis_lhs = this.bp0_1.ooz_1;
            var tmp_2 = tmp1_elvis_lhs == null ? this.bp0_1.noz_1 : tmp1_elvis_lhs;
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda_0(this.dp0_1, this.bp0_1, this.cp0_1, this.fp0_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ApproveOrDeclinePendingEnrolmentUseCase(db, repo, enrolIntoCourseUseCase) {
    this.noz_1 = db;
    this.ooz_1 = repo;
    this.poz_1 = enrolIntoCourseUseCase;
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase).gp0 = function (enrolmentRequest, approved, $completion) {
    var tmp = new $invokeCOROUTINE$24(this, enrolmentRequest, approved, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnrolIntoCourseUseCase$invoke$slambda($effectiveDb, $enrolment, resultContinuation) {
    this.pp0_1 = $effectiveDb;
    this.qp0_1 = $enrolment;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).iok = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.iok(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.pp0_1.t7d().insertAsync(this.qp0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda(this.pp0_1, this.qp0_1, completion);
    i.rp0_1 = it;
    return i;
  };
  function EnrolIntoCourseUseCase$invoke$slambda_0($effectiveDb, $enrolment, resultContinuation) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda($effectiveDb, $enrolment, resultContinuation);
    var l = function (it, $completion) {
      return i.iok(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$25(_this__u8e3s4, enrolment, timeZoneId, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ap1_1 = _this__u8e3s4;
    this.bp1_1 = enrolment;
    this.cp1_1 = timeZoneId;
  }
  protoOf($invokeCOROUTINE$25).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp0_elvis_lhs = this.ap1_1.roz_1;
            suspendResult = (tmp0_elvis_lhs == null ? this.ap1_1.qoz_1 : tmp0_elvis_lhs).t7d().i93(this.bp1_1.d8i_1, this.bp1_1.c8i_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.dp1_1 = suspendResult;
            if (!this.dp1_1.c1()) {
              throw new AlreadyEnroledInClassException();
            }

            this.bp1_1.e8i_1 = toLocalMidnight(Companion_getInstance_6().fmh(this.bp1_1.e8i_1), this.cp1_1).emh();
            if (this.bp1_1.f8i_1.c7(get_UNSET_DISTANT_FUTURE()) < 0) {
              this.bp1_1.f8i_1 = toLocalEndOfDay(Companion_getInstance_6().fmh(this.bp1_1.f8i_1), this.cp1_1).emh();
            }

            var tmp_0 = this;
            var tmp1_elvis_lhs = this.ap1_1.roz_1;
            tmp_0.ep1_1 = tmp1_elvis_lhs == null ? this.ap1_1.qoz_1 : tmp1_elvis_lhs;
            this.hd_1 = 2;
            suspendResult = withDoorTransactionAsync(this.ep1_1, VOID, EnrolIntoCourseUseCase$invoke$slambda_0(this.ep1_1, this.bp1_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function EnrolIntoCourseUseCase(db, repo) {
    this.qoz_1 = db;
    this.roz_1 = repo;
  }
  protoOf(EnrolIntoCourseUseCase).soz = function (enrolment, timeZoneId, $completion) {
    var tmp = new $invokeCOROUTINE$25(this, enrolment, timeZoneId, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function IApproveOrDeclinePendingEnrolmentRequestUseCase() {
  }
  function $invokeCOROUTINE$26(_this__u8e3s4, clazzCode, person, roleId, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.np1_1 = _this__u8e3s4;
    this.op1_1 = clazzCode;
    this.pp1_1 = person;
    this.qp1_1 = roleId;
  }
  protoOf($invokeCOROUTINE$26).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            suspendResult = this.np1_1.up1_1.o7d().r8c(this.op1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rp1_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.rp1_1 == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_1 = this.rp1_1;
            }

            tmp_0.sp1_1 = tmp_1;
            this.hd_1 = 2;
            suspendResult = this.np1_1.up1_1.n7f().sex(this.pp1_1.f96_1, this.sp1_1.r8d_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (suspendResult) {
              throw new AlreadyHasPendingRequestException();
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            suspendResult = this.np1_1.up1_1.t7d().i93(this.sp1_1.r8d_1, this.pp1_1.f96_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.tp1_1 = suspendResult;
            if (!this.tp1_1.c1()) {
              throw new AlreadyEnroledInClassException();
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 5:
            this.hd_1 = 6;
            var tmp_2 = this.np1_1.up1_1.n7f();
            var tmp_3 = this.sp1_1.r8d_1;
            var tmp_4 = this.sp1_1.s8d_1;
            var tmp_5 = this.pp1_1.f96_1;
            var tmp_6 = this.pp1_1.ckr();
            var tmp_7 = this.pp1_1.g96_1;
            var tmp_8 = systemTimeInMillis();
            suspendResult = tmp_2.rex(new EnrolmentRequest(VOID, tmp_3, tmp_4, tmp_5, tmp_6, VOID, tmp_7, this.qp1_1, tmp_8, 1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            return Unit_instance;
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function RequestEnrolmentUseCase(activeRepo) {
    this.up1_1 = activeRepo;
  }
  protoOf(RequestEnrolmentUseCase).vp1 = function (clazzCode, person, roleId, $completion) {
    var tmp = new $invokeCOROUTINE$26(this, clazzCode, person, roleId, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SetClipboardStringUseCase() {
  }
  function Companion_36() {
  }
  var Companion_instance_85;
  function Companion_getInstance_53() {
    return Companion_instance_85;
  }
  function $serializer_33() {
    $serializer_instance_33 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.compress.CompressParams', this, 3);
    tmp0_serialDesc.t4f('maxWidth', true);
    tmp0_serialDesc.t4f('maxHeight', true);
    tmp0_serialDesc.t4f('compressionLevel', true);
    this.xp1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_33).q44 = function () {
    return this.xp1_1;
  };
  protoOf($serializer_33).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), IntSerializer_getInstance(), CompressionLevelSerializer_getInstance()];
  };
  protoOf($serializer_33).s44 = function (decoder) {
    var tmp0_desc = this.xp1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_input = decoder.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.n48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.n48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return CompressParams_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_33).yp1 = function (encoder, value) {
    var tmp0_desc = this.xp1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.zp1_1 === 1280)) {
      tmp1_output.r49(tmp0_desc, 0, value.zp1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.ap2_1 === 1280)) {
      tmp1_output.r49(tmp0_desc, 1, value.ap2_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !value.bp2_1.equals(CompressionLevel_MEDIUM_getInstance())) {
      tmp1_output.y49(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), value.bp2_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_33).r44 = function (encoder, value) {
    return this.yp1(encoder, value instanceof CompressParams ? value : THROW_CCE());
  };
  var $serializer_instance_33;
  function $serializer_getInstance_45() {
    if ($serializer_instance_33 == null)
      new $serializer_33();
    return $serializer_instance_33;
  }
  function CompressParams_init_$Init$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_45().xp1_1);
    }
    if (0 === (seen1 & 1))
      $this.zp1_1 = 1280;
    else
      $this.zp1_1 = maxWidth;
    if (0 === (seen1 & 2))
      $this.ap2_1 = 1280;
    else
      $this.ap2_1 = maxHeight;
    if (0 === (seen1 & 4))
      $this.bp2_1 = CompressionLevel_MEDIUM_getInstance();
    else
      $this.bp2_1 = compressionLevel;
    return $this;
  }
  function CompressParams_init_$Create$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker) {
    return CompressParams_init_$Init$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker, objectCreate(protoOf(CompressParams)));
  }
  function CompressParams(maxWidth, maxHeight, compressionLevel) {
    maxWidth = maxWidth === VOID ? 1280 : maxWidth;
    maxHeight = maxHeight === VOID ? 1280 : maxHeight;
    compressionLevel = compressionLevel === VOID ? CompressionLevel_MEDIUM_getInstance() : compressionLevel;
    this.zp1_1 = maxWidth;
    this.ap2_1 = maxHeight;
    this.bp2_1 = compressionLevel;
  }
  protoOf(CompressParams).toString = function () {
    return 'CompressParams(maxWidth=' + this.zp1_1 + ', maxHeight=' + this.ap2_1 + ', compressionLevel=' + this.bp2_1 + ')';
  };
  protoOf(CompressParams).hashCode = function () {
    var result = this.zp1_1;
    result = imul(result, 31) + this.ap2_1 | 0;
    result = imul(result, 31) + this.bp2_1.hashCode() | 0;
    return result;
  };
  protoOf(CompressParams).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CompressParams))
      return false;
    var tmp0_other_with_cast = other instanceof CompressParams ? other : THROW_CCE();
    if (!(this.zp1_1 === tmp0_other_with_cast.zp1_1))
      return false;
    if (!(this.ap2_1 === tmp0_other_with_cast.ap2_1))
      return false;
    if (!this.bp2_1.equals(tmp0_other_with_cast.bp2_1))
      return false;
    return true;
  };
  function CompressResult(uri, mimeType, originalSize, compressedSize) {
    this.zot_1 = uri;
    this.aou_1 = mimeType;
    this.bou_1 = originalSize;
    this.cou_1 = compressedSize;
  }
  protoOf(CompressResult).toString = function () {
    return 'CompressResult(uri=' + this.zot_1 + ', mimeType=' + this.aou_1 + ', originalSize=' + this.bou_1.toString() + ', compressedSize=' + this.cou_1.toString() + ')';
  };
  protoOf(CompressResult).hashCode = function () {
    var result = getStringHashCode(this.zot_1);
    result = imul(result, 31) + getStringHashCode(this.aou_1) | 0;
    result = imul(result, 31) + this.bou_1.hashCode() | 0;
    result = imul(result, 31) + this.cou_1.hashCode() | 0;
    return result;
  };
  protoOf(CompressResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CompressResult))
      return false;
    var tmp0_other_with_cast = other instanceof CompressResult ? other : THROW_CCE();
    if (!(this.zot_1 === tmp0_other_with_cast.zot_1))
      return false;
    if (!(this.aou_1 === tmp0_other_with_cast.aou_1))
      return false;
    if (!this.bou_1.equals(tmp0_other_with_cast.bou_1))
      return false;
    if (!this.cou_1.equals(tmp0_other_with_cast.cou_1))
      return false;
    return true;
  };
  function CompressUseCase() {
  }
  function _get_$cachedSerializer__te6jhj($this) {
    return $this.dp2_1.t2();
  }
  function CompressionLevel$Companion$_anonymous__cmsj0x() {
    return CompressionLevelSerializer_getInstance();
  }
  var CompressionLevel_NONE_instance;
  var CompressionLevel_LOWEST_instance;
  var CompressionLevel_LOW_instance;
  var CompressionLevel_MEDIUM_instance;
  var CompressionLevel_HIGH_instance;
  var CompressionLevel_HIGHEST_instance;
  function Companion_37() {
    Companion_instance_86 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.dp2_1 = lazy(tmp_0, CompressionLevel$Companion$_anonymous__cmsj0x);
  }
  protoOf(Companion_37).ep2 = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = get_entries().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.compress.Companion.forValue.<anonymous>' call
        if (element.hp2_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    return tmp$ret$1;
  };
  protoOf(Companion_37).n4r = function () {
    return _get_$cachedSerializer__te6jhj(this);
  };
  protoOf(Companion_37).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_86;
  function Companion_getInstance_54() {
    CompressionLevel_initEntries();
    if (Companion_instance_86 == null)
      new Companion_37();
    return Companion_instance_86;
  }
  function values_0() {
    return [CompressionLevel_NONE_getInstance(), CompressionLevel_LOWEST_getInstance(), CompressionLevel_LOW_getInstance(), CompressionLevel_MEDIUM_getInstance(), CompressionLevel_HIGH_getInstance(), CompressionLevel_HIGHEST_getInstance()];
  }
  function get_entries() {
    if ($ENTRIES == null)
      $ENTRIES = enumEntries(values_0());
    return $ENTRIES;
  }
  var CompressionLevel_entriesInitialized;
  function CompressionLevel_initEntries() {
    if (CompressionLevel_entriesInitialized)
      return Unit_instance;
    CompressionLevel_entriesInitialized = true;
    CompressionLevel_NONE_instance = new CompressionLevel('NONE', 0, 0);
    CompressionLevel_LOWEST_instance = new CompressionLevel('LOWEST', 1, 1);
    CompressionLevel_LOW_instance = new CompressionLevel('LOW', 2, 2);
    CompressionLevel_MEDIUM_instance = new CompressionLevel('MEDIUM', 3, 3);
    CompressionLevel_HIGH_instance = new CompressionLevel('HIGH', 4, 4);
    CompressionLevel_HIGHEST_instance = new CompressionLevel('HIGHEST', 5, 5);
    Companion_getInstance_54();
  }
  var $ENTRIES;
  function CompressionLevel(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.hp2_1 = value;
  }
  function CompressionLevel_NONE_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_NONE_instance;
  }
  function CompressionLevel_LOWEST_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_LOWEST_instance;
  }
  function CompressionLevel_LOW_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_LOW_instance;
  }
  function CompressionLevel_MEDIUM_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_MEDIUM_instance;
  }
  function CompressionLevel_HIGH_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_HIGH_instance;
  }
  function CompressionLevel_HIGHEST_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_HIGHEST_instance;
  }
  function CompressionLevelSerializer() {
    CompressionLevelSerializer_instance = this;
    this.ip2_1 = PrimitiveSerialDescriptor('CompressionLevel', INT_getInstance());
  }
  protoOf(CompressionLevelSerializer).q44 = function () {
    return this.ip2_1;
  };
  protoOf(CompressionLevelSerializer).s44 = function (decoder) {
    return Companion_getInstance_54().ep2(decoder.y47());
  };
  protoOf(CompressionLevelSerializer).jp2 = function (encoder, value) {
    encoder.g49(value.hp2_1);
  };
  protoOf(CompressionLevelSerializer).r44 = function (encoder, value) {
    return this.jp2(encoder, value instanceof CompressionLevel ? value : THROW_CCE());
  };
  var CompressionLevelSerializer_instance;
  function CompressionLevelSerializer_getInstance() {
    if (CompressionLevelSerializer_instance == null)
      new CompressionLevelSerializer();
    return CompressionLevelSerializer_instance;
  }
  function ContentManifestMap(manifest, entryMap) {
    var tmp;
    if (entryMap === VOID) {
      // Inline function 'kotlin.collections.associateBy' call
      var this_0 = manifest.yof_1;
      var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
      // Inline function 'kotlin.collections.associateByTo' call
      var destination = LinkedHashMap_init_$Create$_0(capacity);
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.contententry.ContentManifestMap.<init>.<anonymous>' call
        var tmp$ret$0 = UrlEncoderUtil_getInstance().smd(element.cog_1);
        destination.s(tmp$ret$0, element);
      }
      tmp = destination;
    } else {
      tmp = entryMap;
    }
    entryMap = tmp;
    this.kp2_1 = manifest;
    this.lp2_1 = entryMap;
  }
  protoOf(ContentManifestMap).mp2 = function (manifestUrl, pathInContentEntryVersion) {
    return UrlKmp(manifestUrl).np2(pathInContentEntryVersion).toString();
  };
  protoOf(ContentManifestMap).toString = function () {
    return 'ContentManifestMap(manifest=' + this.kp2_1 + ', entryMap=' + this.lp2_1 + ')';
  };
  protoOf(ContentManifestMap).hashCode = function () {
    var result = this.kp2_1.hashCode();
    result = imul(result, 31) + hashCode(this.lp2_1) | 0;
    return result;
  };
  protoOf(ContentManifestMap).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentManifestMap))
      return false;
    var tmp0_other_with_cast = other instanceof ContentManifestMap ? other : THROW_CCE();
    if (!this.kp2_1.equals(tmp0_other_with_cast.kp2_1))
      return false;
    if (!equals(this.lp2_1, tmp0_other_with_cast.lp2_1))
      return false;
    return true;
  };
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    this.wp2_1 = this$0;
    this.xp2_1 = $entries;
    this.yp2_1 = $timeNow;
    this.zp2_1 = $activeUserPersonUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            var tmp_0 = this.wp2_1.fp3_1.x7d();
            var this_0 = this.xp2_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(item.hp3_1);
            }

            suspendResult = tmp_0.rbd(destination, true, this.yp2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            tmp_1.bp3_1 = this.xp2_1;
            this.cp3_1 = this.bp3_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.cp3_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.dp3_1 = this.cp3_1.e();
            var tmp_2 = this;
            tmp_2.ep3_1 = this.dp3_1;
            this.hd_1 = 3;
            suspendResult = this.wp2_1.fp3_1.m7f().ceg(this.ep3_1.hp3_1, this.yp2_1, this.zp2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 2;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this.wp2_1, this.xp2_1, this.yp2_1, this.zp2_1, completion);
    i.ap3_1 = it;
    return i;
  };
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeleteContentEntryParentChildJoinUseCase(repoOrDb) {
    this.fp3_1 = repoOrDb;
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase).jp3 = function (entries, activeUserPersonUid, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(this.fp3_1, VOID, DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this, entries, timeNow, activeUserPersonUid, null), $completion);
  };
  function Companion_38() {
    this.kp3_1 = 'upload-original-filename';
  }
  var Companion_instance_87;
  function Companion_getInstance_55() {
    return Companion_instance_87;
  }
  function ContentEntryGetMetaDataFromUriUseCase() {
  }
  function ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes) {
    indeterminate = indeterminate === VOID ? true : indeterminate;
    error = error === VOID ? null : error;
    processedBytes = processedBytes === VOID ? new Long(0, 0) : processedBytes;
    totalBytes = totalBytes === VOID ? new Long(0, 0) : totalBytes;
    this.mp3_1 = indeterminate;
    this.np3_1 = error;
    this.op3_1 = processedBytes;
    this.pp3_1 = totalBytes;
  }
  protoOf(ContentEntryGetMetadataStatus).qp3 = function () {
    var tmp;
    if (!this.pp3_1.equals(new Long(0, 0))) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.op3_1.cb(toLong(100)).bb(this.pp3_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(ContentEntryGetMetadataStatus).rp3 = function (indeterminate, error, processedBytes, totalBytes) {
    return new ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).sp3 = function (indeterminate, error, processedBytes, totalBytes, $super) {
    indeterminate = indeterminate === VOID ? this.mp3_1 : indeterminate;
    error = error === VOID ? this.np3_1 : error;
    processedBytes = processedBytes === VOID ? this.op3_1 : processedBytes;
    totalBytes = totalBytes === VOID ? this.pp3_1 : totalBytes;
    return $super === VOID ? this.rp3(indeterminate, error, processedBytes, totalBytes) : $super.rp3.call(this, indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).toString = function () {
    return 'ContentEntryGetMetadataStatus(indeterminate=' + this.mp3_1 + ', error=' + this.np3_1 + ', processedBytes=' + this.op3_1.toString() + ', totalBytes=' + this.pp3_1.toString() + ')';
  };
  protoOf(ContentEntryGetMetadataStatus).hashCode = function () {
    var result = getBooleanHashCode(this.mp3_1);
    result = imul(result, 31) + (this.np3_1 == null ? 0 : getStringHashCode(this.np3_1)) | 0;
    result = imul(result, 31) + this.op3_1.hashCode() | 0;
    result = imul(result, 31) + this.pp3_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryGetMetadataStatus).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryGetMetadataStatus))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryGetMetadataStatus ? other : THROW_CCE();
    if (!(this.mp3_1 === tmp0_other_with_cast.mp3_1))
      return false;
    if (!(this.np3_1 == tmp0_other_with_cast.np3_1))
      return false;
    if (!this.op3_1.equals(tmp0_other_with_cast.op3_1))
      return false;
    if (!this.pp3_1.equals(tmp0_other_with_cast.pp3_1))
      return false;
    return true;
  };
  function UnsupportedContentException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, UnsupportedContentException);
  }
  function Companion_39() {
    this.tp3_1 = 'text/vtt';
    this.up3_1 = 'filename';
    this.vp3_1 = 'locale';
    this.wp3_1 = 'WEBVTT';
  }
  var Companion_instance_88;
  function Companion_getInstance_56() {
    return Companion_instance_88;
  }
  function GetSubtitleTrackFromUriUseCase() {
  }
  function CancelImportContentEntryUseCase() {
  }
  function $invokeCOROUTINE$27(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.hp4_1 = _this__u8e3s4;
    this.ip4_1 = cjiUid;
    this.jp4_1 = activeUserPersonUid;
  }
  protoOf($invokeCOROUTINE$27).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.hp4_1.up4_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.kp4_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.lp4_1 = this.hp4_1.tp4_1;
            var tmp_4 = this;
            tmp_4.mp4_1 = this.hp4_1.sp4_1.wnt_1 + 'api/contententryimportjob/cancel';
            var tmp_5 = this;
            tmp_5.np4_1 = this.lp4_1;
            var tmp_6 = this;
            tmp_6.op4_1 = this.np4_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.mp4_1);
            parameter(this_0, 'jobUid', this.ip4_1);
            doorNodeIdHeader(this_0, this.kp4_1);
            parameter(this_0, 'accountPersonUid', this.jp4_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.pp4_1 = this_0;
            this.pp4_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.qp4_1 = this.op4_1;
            var tmp_9 = this;
            tmp_9.rp4_1 = this.pp4_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.rp4_1, this.qp4_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function CancelRemoteContentEntryImportUseCase(learningSpace, httpClient, repo) {
    this.sp4_1 = learningSpace;
    this.tp4_1 = httpClient;
    this.up4_1 = repo;
  }
  protoOf(CancelRemoteContentEntryImportUseCase).vp4 = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$27(this, cjiUid, activeUserPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function $invokeCOROUTINE$28(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ep5_1 = _this__u8e3s4;
    this.fp5_1 = cjiUid;
    this.gp5_1 = activeUserPersonUid;
  }
  protoOf($invokeCOROUTINE$28).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.ep5_1.rp5_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('no repo');
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.hp5_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.ip5_1 = this.ep5_1.pp5_1;
            var tmp_4 = this;
            tmp_4.jp5_1 = this.ep5_1.qp5_1.wnt_1 + 'api/contententryimportjob/dismissError';
            var tmp_5 = this;
            tmp_5.kp5_1 = this.ip5_1;
            var tmp_6 = this;
            tmp_6.lp5_1 = this.kp5_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.jp5_1);
            parameter(this_0, 'jobUid', this.fp5_1);
            doorNodeIdHeader(this_0, this.hp5_1);
            parameter(this_0, 'accountPersonUid', this.gp5_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.mp5_1 = this_0;
            this.mp5_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.np5_1 = this.lp5_1;
            var tmp_9 = this;
            tmp_9.op5_1 = this.mp5_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.op5_1, this.np5_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function DismissRemoteContentEntryImportErrorUseCase(httpClient, learningSpace, repo) {
    this.pp5_1 = httpClient;
    this.qp5_1 = learningSpace;
    this.rp5_1 = repo;
  }
  protoOf(DismissRemoteContentEntryImportErrorUseCase).vp4 = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$28(this, cjiUid, activeUserPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnqueueContentEntryImportUseCase() {
  }
  function $invokeCOROUTINE$29(_this__u8e3s4, contentJobItem, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.bp6_1 = _this__u8e3s4;
    this.cp6_1 = contentJobItem;
  }
  protoOf($invokeCOROUTINE$29).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.dp6_1 = this.bp6_1.lp6_1;
            var tmp_1 = this;
            tmp_1.ep6_1 = this.bp6_1.kp6_1.wnt_1 + 'api/import/importRequest';
            var tmp_2 = this;
            tmp_2.fp6_1 = this.dp6_1;
            var tmp_3 = this;
            tmp_3.gp6_1 = this.fp6_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.ep6_1);
            contentType(this_0, Application_getInstance().v2r_1);
            setBodyJson(this_0, this.bp6_1.mp6_1, Companion_instance_89.n4r(), new ImportRequest(this.cp6_1));
            tmp_4.hp6_1 = this_0;
            this.hp6_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_5 = this;
            tmp_5.ip6_1 = this.gp6_1;
            var tmp_6 = this;
            tmp_6.jp6_1 = this.hp6_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.jp6_1, this.ip6_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function EnqueueImportContentEntryUseCaseRemote(learningSpace, httpClient, json) {
    this.kp6_1 = learningSpace;
    this.lp6_1 = httpClient;
    this.mp6_1 = json;
  }
  protoOf(EnqueueImportContentEntryUseCaseRemote).sp5 = function (contentJobItem, $completion) {
    var tmp = new $invokeCOROUTINE$29(this, contentJobItem, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_40() {
  }
  protoOf(Companion_40).n4r = function () {
    return $serializer_getInstance_46();
  };
  var Companion_instance_89;
  function Companion_getInstance_57() {
    return Companion_instance_89;
  }
  function $serializer_34() {
    $serializer_instance_34 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.contententry.importcontent.ImportRequest', this, 1);
    tmp0_serialDesc.t4f('contentJobItem', false);
    this.np6_1 = tmp0_serialDesc;
  }
  protoOf($serializer_34).q44 = function () {
    return this.np6_1;
  };
  protoOf($serializer_34).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_5()];
  };
  protoOf($serializer_34).s44 = function (decoder) {
    var tmp0_desc = this.np6_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return ImportRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_34).op6 = function (encoder, value) {
    var tmp0_desc = this.np6_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_5(), value.pp6_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_34).r44 = function (encoder, value) {
    return this.op6(encoder, value instanceof ImportRequest ? value : THROW_CCE());
  };
  var $serializer_instance_34;
  function $serializer_getInstance_46() {
    if ($serializer_instance_34 == null)
      new $serializer_34();
    return $serializer_instance_34;
  }
  function ImportRequest_init_$Init$(seen1, contentJobItem, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_46().np6_1);
    }
    $this.pp6_1 = contentJobItem;
    return $this;
  }
  function ImportRequest_init_$Create$(seen1, contentJobItem, serializationConstructorMarker) {
    return ImportRequest_init_$Init$(seen1, contentJobItem, serializationConstructorMarker, objectCreate(protoOf(ImportRequest)));
  }
  function ImportRequest(contentJobItem) {
    this.pp6_1 = contentJobItem;
  }
  protoOf(ImportRequest).toString = function () {
    return 'ImportRequest(contentJobItem=' + this.pp6_1 + ')';
  };
  protoOf(ImportRequest).hashCode = function () {
    return this.pp6_1.hashCode();
  };
  protoOf(ImportRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ImportRequest))
      return false;
    var tmp0_other_with_cast = other instanceof ImportRequest ? other : THROW_CCE();
    if (!this.pp6_1.equals(tmp0_other_with_cast.pp6_1))
      return false;
    return true;
  };
  function DefaultLaunchContentEntryVersionUseCase() {
  }
  protoOf(DefaultLaunchContentEntryVersionUseCase).qp6 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    var tmp0_subject = contentEntryVersion.oax_1;
    var tmp;
    if (tmp0_subject === 'xapi') {
      tmp = 'XapiContent';
    } else {
      if (tmp0_subject === 'pdf') {
        tmp = 'PdfContent';
      } else {
        if (tmp0_subject === 'epub') {
          tmp = 'EpubContent';
        } else {
          if (tmp0_subject === 'video') {
            tmp = 'Video';
          } else {
            tmp = null;
          }
        }
      }
    }
    var destName = tmp;
    if (!(destName == null)) {
      Companion_getInstance_125();
      var tmp_0 = to('entityUid', contentEntryVersion.lax_1.toString());
      Companion_getInstance_125();
      var tmp_1 = to('courseBlockUid', cbUid.toString());
      Companion_getInstance_125();
      var tmp_2 = to('clazzUid', clazzUid.toString());
      Companion_getInstance_125();
      navController.rp6(destName, mapOf([tmp_0, tmp_1, tmp_2, to('entryid', contentEntryVersion.max_1.toString())]));
    }
    return new LaunchResult();
  };
  protoOf(DefaultLaunchContentEntryVersionUseCase).sp6 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.qp6(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function LaunchResult(message) {
    message = message === VOID ? null : message;
    this.tp6_1 = message;
  }
  protoOf(LaunchResult).toString = function () {
    return 'LaunchResult(message=' + this.tp6_1 + ')';
  };
  protoOf(LaunchResult).hashCode = function () {
    return this.tp6_1 == null ? 0 : getStringHashCode(this.tp6_1);
  };
  protoOf(LaunchResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LaunchResult))
      return false;
    var tmp0_other_with_cast = other instanceof LaunchResult ? other : THROW_CCE();
    if (!(this.tp6_1 == tmp0_other_with_cast.tp6_1))
      return false;
    return true;
  };
  function LaunchContentEntryVersionUseCase() {
  }
  function LaunchEpubUseCase() {
  }
  function LaunchXapiUseCase() {
  }
  function XapiLaunchHrefResult(url, launchUriInContent, launchActivity, manifestUrl) {
    this.up6_1 = url;
    this.vp6_1 = launchUriInContent;
    this.wp6_1 = launchActivity;
    this.xp6_1 = manifestUrl;
  }
  function ResolveXapiLaunchHrefUseCase$invoke$lambda($contentEntryVersionUid) {
    return function () {
      return 'Resolving xAPI url for contentEntryVersion ' + $contentEntryVersionUid.toString();
    };
  }
  function ResolveXapiLaunchHrefUseCase$invoke$slambda($contentEntryVersionUid, resultContinuation) {
    this.gp7_1 = $contentEntryVersionUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).ip7 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.ip7(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.hp7_1.i7f().fbq(this.gp7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new ResolveXapiLaunchHrefUseCase$invoke$slambda(this.gp7_1, completion);
    i.hp7_1 = it;
    return i;
  };
  function ResolveXapiLaunchHrefUseCase$invoke$slambda_0($contentEntryVersionUid, resultContinuation) {
    var i = new ResolveXapiLaunchHrefUseCase$invoke$slambda($contentEntryVersionUid, resultContinuation);
    var l = function (it, $completion) {
      return i.ip7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ResolveXapiLaunchHrefUseCase$invoke$lambda_0($contentEntryVersionUid, $url) {
    return function () {
      return 'Resolved xAPI url for contentEntryVersion ' + $contentEntryVersionUid.toString() + ' : ' + $url;
    };
  }
  function $invokeCOROUTINE$30(_this__u8e3s4, contentEntryVersionUid, clazzUid, cbUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.rp7_1 = _this__u8e3s4;
    this.sp7_1 = contentEntryVersionUid;
    this.tp7_1 = clazzUid;
    this.up7_1 = cbUid;
  }
  protoOf($invokeCOROUTINE$30).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            var tmp_0 = Napier_getInstance();
            tmp_0.e5e(VOID, VOID, ResolveXapiLaunchHrefUseCase$invoke$lambda(this.sp7_1));
            this.hd_1 = 1;
            suspendResult = localFirstThenRepoIfNull(this.rp7_1.yp8_1, ResolveXapiLaunchHrefUseCase$invoke$slambda_0(this.sp7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vp7_1 = suspendResult;
            var tmp_1 = this;
            var tmp_2;
            if (this.vp7_1 == null) {
              throw IllegalArgumentException_init_$Create$('could not load contententryversion ' + this.sp7_1.toString());
            } else {
              tmp_2 = this.vp7_1;
            }

            tmp_1.wp7_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_elvis_lhs = this.wp7_1.pax_1;
            var tmp_4;
            if (tmp1_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('ContentEntryVersion ' + this.sp7_1.toString() + ' manifesturl is null');
            } else {
              tmp_4 = tmp1_elvis_lhs;
            }

            tmp_3.xp7_1 = tmp_4;
            var tmp_5 = this;
            tmp_5.yp7_1 = this.rp7_1.ap9_1;
            var tmp_6 = this;
            tmp_6.zp7_1 = this.rp7_1.zp8_1;
            var tmp_7 = this;
            tmp_7.ap8_1 = this.xp7_1;
            var tmp_8 = this;
            tmp_8.bp8_1 = this.zp7_1;
            var tmp_9 = this;
            tmp_9.cp8_1 = this.bp8_1;
            var tmp_10 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.ap8_1);
            tmp_10.dp8_1 = this_0;
            this.dp8_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_11 = this;
            tmp_11.ep8_1 = this.cp8_1;
            var tmp_12 = this;
            tmp_12.fp8_1 = this.dp8_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.fp8_1, this.ep8_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.gp8_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = bodyAsDecodedText(this.gp8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hp8_1 = suspendResult;
            var tmp_13 = this;
            var this_1 = this.yp7_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_13.ip8_1 = this.yp7_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.hp8_1);
            this.jp8_1 = requireEntryByUri(this.ip8_1, ensureNotNull(this.wp7_1.nax_1));
            var tmp_14 = this;
            tmp_14.kp8_1 = this.rp7_1.zp8_1;
            var tmp_15 = this;
            tmp_15.lp8_1 = this.jp8_1.kog_1;
            var tmp_16 = this;
            tmp_16.mp8_1 = this.kp8_1;
            var tmp_17 = this;
            tmp_17.np8_1 = this.mp8_1;
            var tmp_18 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.lp8_1);
            tmp_18.op8_1 = this_3;
            this.op8_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_19 = this;
            tmp_19.pp8_1 = this.np8_1;
            var tmp_20 = this;
            tmp_20.qp8_1 = this.op8_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.qp8_1, this.pp8_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.rp8_1 = suspendResult;
            this.hd_1 = 5;
            suspendResult = bodyAsDecodedText(this.rp8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.sp8_1 = suspendResult;
            this.tp8_1 = this.rp7_1.bp9_1.y7c();
            setInputString(this.tp8_1, this.sp8_1);
            this.up8_1 = Companion_instance_135.hp9(this.tp8_1);
            var tmp_21 = this;
            var tmp2_safe_receiver = this.up8_1.ip9_1;
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.qp9_1;
            var tmp_22;
            if (tmp3_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('ContentEntryVersion ' + this.sp7_1.toString() + ' manifesturl is null');
            } else {
              tmp_22 = tmp3_elvis_lhs;
            }

            tmp_21.vp8_1 = tmp_22;
            var tmp_23 = this;
            var tmp4_safe_receiver = this.up8_1.ip9_1;
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.np9_1;
            var tmp_24;
            if (tmp5_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Launch Activity must have id');
            } else {
              tmp_24 = tmp5_elvis_lhs;
            }

            tmp_23.wp8_1 = tmp_24;
            this.xp8_1 = this.rp7_1.ep9_1.uo9().onu_1.f96_1;
            this.hd_1 = 6;
            suspendResult = this.rp7_1.cp9_1.tp9(this.xp8_1, this.rp7_1.ep9_1.uo9().tnu(), this.wp8_1, this.tp7_1, this.up7_1, this.wp7_1.max_1, this.sp7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var xapiSession = suspendResult;
            var queryParams = mapOf([to('endpoint', this.rp7_1.dp9_1.up9('/api/xapi/')), to('auth', authorizationHeader(xapiSession)), to('actor', this.rp7_1.ap9_1.r45(Companion_instance_113.n4r(), agent(xapiSession, this.rp7_1.fp9_1))), to('registration', get_registrationUuid(xapiSession).toString()), to('activity_id', xapiSession.ujz_1)]);
            var url_0 = appendQueryArgs(UMFileUtil_getInstance().apa(this.xp7_1, this.vp8_1), queryParams);
            var tinCanXmlPathPrefix = substringBeforeLast(ensureNotNull(this.wp7_1.nax_1), '/', '');
            var tmp_25 = Napier_getInstance();
            tmp_25.e5e(VOID, VOID, ResolveXapiLaunchHrefUseCase$invoke$lambda_0(this.sp7_1, url_0));
            return new XapiLaunchHrefResult(url_0, appendQueryArgs(tinCanXmlPathPrefix + this.vp8_1, queryParams), ensureNotNull(this.up8_1.ip9_1), this.xp7_1);
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ResolveXapiLaunchHrefUseCase(activeRepoOrDb, httpClient, json, xppFactory, resumeOrStartXapiSessionUseCase, getApiUrlUseCase, accountManager, learningSpace) {
    this.yp8_1 = activeRepoOrDb;
    this.zp8_1 = httpClient;
    this.ap9_1 = json;
    this.bp9_1 = xppFactory;
    this.cp9_1 = resumeOrStartXapiSessionUseCase;
    this.dp9_1 = getApiUrlUseCase;
    this.ep9_1 = accountManager;
    this.fp9_1 = learningSpace;
  }
  protoOf(ResolveXapiLaunchHrefUseCase).bpa = function (contentEntryVersionUid, clazzUid, cbUid, $completion) {
    var tmp = new $invokeCOROUTINE$30(this, contentEntryVersionUid, clazzUid, cbUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function MoveContentEntriesUseCase(repo, systemImpl) {
    this.cpa_1 = repo;
    this.dpa_1 = systemImpl;
  }
  protoOf(MoveContentEntriesUseCase).epa = function (destContentEntry, selectedEntriesToMove, $completion) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp;
      if (isInterface(selectedEntriesToMove, Collection)) {
        tmp = selectedEntriesToMove.c1();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = selectedEntriesToMove.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
        if (element.gp3_1.equals(destContentEntry.nav_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      throw IllegalArgumentException_init_$Create$(this.dpa_1.moj(strings_getInstance().ynm_1));
    }
    var tmp$ret$2;
    $l$block_2: {
      // Inline function 'kotlin.collections.any' call
      var tmp_0;
      if (isInterface(selectedEntriesToMove, Collection)) {
        tmp_0 = selectedEntriesToMove.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$2 = false;
        break $l$block_2;
      }
      var tmp0_iterator_0 = selectedEntriesToMove.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
        if (element_0.ip3_1.equals(destContentEntry.nav_1)) {
          tmp$ret$2 = true;
          break $l$block_2;
        }
      }
      tmp$ret$2 = false;
    }
    if (tmp$ret$2) {
      throw IllegalArgumentException_init_$Create$(this.dpa_1.moj(strings_getInstance().znm_1));
    }
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(selectedEntriesToMove, 10));
    var tmp0_iterator_1 = selectedEntriesToMove.w();
    while (tmp0_iterator_1.f()) {
      var item = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
      var tmp$ret$4 = item.hp3_1;
      destination.i1(tmp$ret$4);
    }
    var uidsToMove = destination;
    if (uidsToMove.c1())
      return Unit_instance;
    return this.cpa_1.x7d().qbd(destContentEntry.nav_1, uidsToMove, systemTimeInMillis(), $completion);
  };
  function SaveContentEntryUseCase$invoke$slambda$lambda($picture) {
    return function () {
      return 'SavePictureUseCase: ContentEntry Set picture upsert uri = ' + $picture.fax_1 + ' uid=' + $picture.dax_1.toString();
    };
  }
  function SaveContentEntryUseCase$invoke$slambda($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation) {
    this.npa_1 = $effectiveDb;
    this.opa_1 = $contentEntry;
    this.ppa_1 = $picture;
    this.qpa_1 = $initPictureUri;
    this.rpa_1 = this$0;
    this.spa_1 = $joinToParentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveContentEntryUseCase$invoke$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            suspendResult = this.npa_1.v7d().qau(this.opa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ppa_1 == null) ? !(this.ppa_1.fax_1 == this.qpa_1) : false) {
              var tmp_0 = Napier_getInstance();
              tmp_0.e5e(VOID, VOID, SaveContentEntryUseCase$invoke$slambda$lambda(this.ppa_1));
              this.hd_1 = 2;
              suspendResult = this.rpa_1.upa_1.r7f().tbi(listOf_0(this.ppa_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!(this.spa_1 == null)) {
              this.hd_1 = 4;
              suspendResult = this.npa_1.x7d().insertAsync(new ContentEntryParentChildJoin(this.spa_1, this.opa_1.nav_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new SaveContentEntryUseCase$invoke$slambda(this.npa_1, this.opa_1, this.ppa_1, this.qpa_1, this.rpa_1, this.spa_1, completion);
    i.tpa_1 = it;
    return i;
  };
  function SaveContentEntryUseCase$invoke$slambda_0($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation) {
    var i = new SaveContentEntryUseCase$invoke$slambda($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$31(_this__u8e3s4, contentEntry, joinToParentUid, picture, initPictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fpb_1 = _this__u8e3s4;
    this.gpb_1 = contentEntry;
    this.hpb_1 = joinToParentUid;
    this.ipb_1 = picture;
    this.jpb_1 = initPictureUri;
  }
  protoOf($invokeCOROUTINE$31).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.fpb_1.vpa_1;
            tmp_0.kpb_1 = tmp0_elvis_lhs == null ? this.fpb_1.upa_1 : tmp0_elvis_lhs;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.kpb_1, VOID, SaveContentEntryUseCase$invoke$slambda_0(this.kpb_1, this.gpb_1, this.ipb_1, this.jpb_1, this.fpb_1, this.hpb_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ipb_1 == null) ? !(this.ipb_1.fax_1 == this.jpb_1) : false) {
              this.hd_1 = 2;
              var tmp_1 = this.ipb_1.dax_1;
              suspendResult = this.fpb_1.wpa_1.bos(tmp_1, 6678, this.ipb_1.fax_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SaveContentEntryUseCase(db, repo, enqueueSavePictureUseCase) {
    this.upa_1 = db;
    this.vpa_1 = repo;
    this.wpa_1 = enqueueSavePictureUseCase;
  }
  protoOf(SaveContentEntryUseCase).lpb = function (contentEntry, joinToParentUid, picture, initPictureUri, $completion) {
    var tmp = new $invokeCOROUTINE$31(this, contentEntry, joinToParentUid, picture, initPictureUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function AddOrUpdateCourseBlockUseCase() {
  }
  protoOf(AddOrUpdateCourseBlockUseCase).mpb = function (currentList, clazzUid, addOrUpdateBlock) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = currentList.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.courseblockupdate.AddOrUpdateCourseBlockUseCase.invoke.<anonymous>' call
        if (item.nk8_1.t7x_1.equals(addOrUpdateBlock.nk8_1.t7x_1)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var currentIndex = tmp$ret$1;
    var courseBlockMutableList = toMutableList(currentList);
    var tmp;
    if (currentIndex >= 0) {
      // Inline function 'kotlin.apply' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.AddOrUpdateCourseBlockUseCase.invoke.<anonymous>' call
      courseBlockMutableList.f1(currentIndex, addOrUpdateBlock);
      tmp = courseBlockMutableList;
    } else {
      courseBlockMutableList.i1(addOrUpdateBlock.zk8(addOrUpdateBlock.nk8_1.hkm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, clazzUid)));
      tmp = updateParentModuleUidsAndIndex(autoIndent(courseBlockMutableList, courseBlockMutableList.u() - 1 | 0));
    }
    var newCourseBlockList = tmp;
    return toList(newCourseBlockList);
  };
  function updateParentModuleUidsAndIndex(_this__u8e3s4) {
    // Inline function 'kotlin.collections.mapIndexed' call
    var this_0 = toMutableList(_this__u8e3s4);
    // Inline function 'kotlin.collections.mapIndexedTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var index = 0;
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.updateParentModuleUidsAndIndex.<anonymous>' call
      var tmp1 = index;
      index = tmp1 + 1 | 0;
      var index_0 = checkIndexOverflow(tmp1);
      var parentModUid = findParentModule(_this__u8e3s4, item);
      var tmp;
      if (!item.nk8_1.w7x_1.equals(parentModUid) ? true : !(item.nk8_1.g7y_1 === index_0)) {
        tmp = item.zk8(item.nk8_1.hkm(VOID, VOID, VOID, parentModUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, index_0));
      } else {
        tmp = item;
      }
      var tmp$ret$0 = tmp;
      destination.i1(tmp$ret$0);
    }
    return toList(destination);
  }
  function autoIndent(_this__u8e3s4, index) {
    var block = _this__u8e3s4.v(index).nk8_1;
    var tmp = block.u7x_1;
    if (tmp === 100)
      return _this__u8e3s4;
    var tmp0_safe_receiver = getOrNull(_this__u8e3s4, index - 1 | 0);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return _this__u8e3s4;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var prevBlock = tmp_0;
    var tmp_1;
    var tmp_2 = prevBlock.u7x_1;
    if (tmp_2 === 100) {
      tmp_1 = 1;
    } else {
      tmp_1 = prevBlock.v7x_1;
    }
    var autoIndent = tmp_1;
    var tmp_3;
    if (!(block.v7x_1 === autoIndent)) {
      // Inline function 'kotlin.apply' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.autoIndent.<anonymous>' call
      this_0.f1(index, this_0.v(index).zk8(this_0.v(index).nk8_1.hkm(VOID, VOID, autoIndent)));
      tmp_3 = toList(this_0);
    } else {
      tmp_3 = _this__u8e3s4;
    }
    return tmp_3;
  }
  function findParentModule(_this__u8e3s4, forBlock) {
    var tmp = forBlock.nk8_1.u7x_1;
    if (tmp === 100)
      return new Long(0, 0);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.courseblockupdate.findParentModule.<anonymous>' call
        if (item.nk8_1.t7x_1.equals(forBlock.nk8_1.t7x_1)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var index_0 = tmp$ret$1;
    var tmp0_elvis_lhs = getOrNull(_this__u8e3s4, index_0 - 1 | 0);
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      return new Long(0, 0);
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    var prevBlock = tmp_0;
    var tmp_1;
    var tmp_2 = prevBlock.nk8_1.u7x_1;
    if (tmp_2 === 100) {
      tmp_1 = prevBlock.nk8_1.t7x_1;
    } else {
      if (prevBlock.nk8_1.v7x_1 >= 1) {
        tmp_1 = prevBlock.nk8_1.w7x_1;
      } else {
        tmp_1 = new Long(0, 0);
      }
    }
    return tmp_1;
  }
  function UpdateCourseBlocksOnReorderOrCommitUseCase() {
  }
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).npb = function (currentList, autoIndentIndex) {
    var tmp;
    if (autoIndentIndex >= 0) {
      tmp = autoIndent(currentList, autoIndentIndex);
    } else {
      tmp = currentList;
    }
    var listIndented = tmp;
    return updateParentModuleUidsAndIndex(listIndented);
  };
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).opb = function (currentList, autoIndentIndex, $super) {
    autoIndentIndex = autoIndentIndex === VOID ? -1 : autoIndentIndex;
    return $super === VOID ? this.npb(currentList, autoIndentIndex) : $super.npb.call(this, currentList, autoIndentIndex);
  };
  function CreatePasskeyResult() {
  }
  function PasskeyCreatedResult() {
  }
  function UserCanceledResult() {
  }
  function Error_1() {
  }
  function CreatePasskeyUseCase() {
  }
  function CredentialResult() {
  }
  function PasswordCredentialResult() {
  }
  function PasskeyCredentialResult() {
  }
  function NoCredentialAvailableResult() {
  }
  function UserCanceledResult_0() {
  }
  function Error_2() {
  }
  function GetCredentialUseCase() {
  }
  function Companion_41() {
  }
  var Companion_instance_90;
  function Companion_getInstance_58() {
    return Companion_instance_90;
  }
  function $serializer_35() {
    $serializer_instance_35 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.PasskeyVerifyResult', this, 4);
    tmp0_serialDesc.t4f('isVerified', false);
    tmp0_serialDesc.t4f('personUid', false);
    tmp0_serialDesc.t4f('firstName', true);
    tmp0_serialDesc.t4f('lastName', true);
    this.rpb_1 = tmp0_serialDesc;
  }
  protoOf($serializer_35).q44 = function () {
    return this.rpb_1;
  };
  protoOf($serializer_35).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), LongSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_35).s44 = function (decoder) {
    var tmp0_desc = this.rpb_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.k48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.k48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return PasskeyVerifyResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_35).spb = function (encoder, value) {
    var tmp0_desc = this.rpb_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.o49(tmp0_desc, 0, value.bo6_1);
    tmp1_output.s49(tmp0_desc, 1, value.co6_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.do6_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.do6_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.eo6_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.eo6_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_35).r44 = function (encoder, value) {
    return this.spb(encoder, value instanceof PasskeyVerifyResult ? value : THROW_CCE());
  };
  var $serializer_instance_35;
  function $serializer_getInstance_47() {
    if ($serializer_instance_35 == null)
      new $serializer_35();
    return $serializer_instance_35;
  }
  function PasskeyVerifyResult_init_$Init$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_47().rpb_1);
    }
    $this.bo6_1 = isVerified;
    $this.co6_1 = personUid;
    if (0 === (seen1 & 4))
      $this.do6_1 = null;
    else
      $this.do6_1 = firstName;
    if (0 === (seen1 & 8))
      $this.eo6_1 = null;
    else
      $this.eo6_1 = lastName;
    return $this;
  }
  function PasskeyVerifyResult_init_$Create$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker) {
    return PasskeyVerifyResult_init_$Init$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker, objectCreate(protoOf(PasskeyVerifyResult)));
  }
  function PasskeyVerifyResult(isVerified, personUid, firstName, lastName) {
    firstName = firstName === VOID ? null : firstName;
    lastName = lastName === VOID ? null : lastName;
    this.bo6_1 = isVerified;
    this.co6_1 = personUid;
    this.do6_1 = firstName;
    this.eo6_1 = lastName;
  }
  protoOf(PasskeyVerifyResult).toString = function () {
    return 'PasskeyVerifyResult(isVerified=' + this.bo6_1 + ', personUid=' + this.co6_1.toString() + ', firstName=' + this.do6_1 + ', lastName=' + this.eo6_1 + ')';
  };
  protoOf(PasskeyVerifyResult).hashCode = function () {
    var result = getBooleanHashCode(this.bo6_1);
    result = imul(result, 31) + this.co6_1.hashCode() | 0;
    result = imul(result, 31) + (this.do6_1 == null ? 0 : getStringHashCode(this.do6_1)) | 0;
    result = imul(result, 31) + (this.eo6_1 == null ? 0 : getStringHashCode(this.eo6_1)) | 0;
    return result;
  };
  protoOf(PasskeyVerifyResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PasskeyVerifyResult))
      return false;
    var tmp0_other_with_cast = other instanceof PasskeyVerifyResult ? other : THROW_CCE();
    if (!(this.bo6_1 === tmp0_other_with_cast.bo6_1))
      return false;
    if (!this.co6_1.equals(tmp0_other_with_cast.co6_1))
      return false;
    if (!(this.do6_1 == tmp0_other_with_cast.do6_1))
      return false;
    if (!(this.eo6_1 == tmp0_other_with_cast.eo6_1))
      return false;
    return true;
  };
  function SavePersonPasskeyUseCase(db, repo, json) {
    this.so2_1 = db;
    this.to2_1 = repo;
    this.uo2_1 = json;
  }
  protoOf(SavePersonPasskeyUseCase).vo2 = function (passkeyResult, person, $completion) {
    var tmp0_elvis_lhs = this.to2_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.so2_1 : tmp0_elvis_lhs;
    var clientDataJSONBase64 = passkeyResult.bpc_1.vpb_1;
    var decodedBytes = decodeBase64Bytes(clientDataJSONBase64);
    // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
    var this_0 = this.uo2_1;
    var string = decodeToString(decodedBytes);
    // Inline function 'kotlinx.serialization.serializer' call
    var this_1 = this_0.t45();
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_2 = serializer(this_1, createKType(getKClass(ClientDataJSON), arrayOf([]), false));
    var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
    var clientDataJson = this_0.s45(tmp$ret$1, string);
    var personPasskey = new PersonPasskey(VOID, person.f96_1, passkeyResult.bpc_1.tpb_1, passkeyResult.bpc_1.vpb_1, clientDataJson.hpc_1, passkeyResult.zpb_1, clientDataJson.gpc_1, passkeyResult.bpc_1.wpb_1);
    return effectiveDb.b7g().tgz(personPasskey, $completion);
  };
  function DecodeUserHandleUseCase() {
  }
  function Companion_42() {
  }
  var Companion_instance_91;
  function Companion_getInstance_59() {
    return Companion_instance_91;
  }
  function $serializer_36() {
    $serializer_instance_36 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticationExtensionsClientOutputsJSON', this, 1);
    tmp0_serialDesc.t4f('prf', true);
    this.jpc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_36).q44 = function () {
    return this.jpc_1;
  };
  protoOf($serializer_36).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable($serializer_getInstance_49())];
  };
  protoOf($serializer_36).s44 = function (decoder) {
    var tmp0_desc = this.jpc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.w48(tmp0_desc, 0, $serializer_getInstance_49(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.w48(tmp0_desc, 0, $serializer_getInstance_49(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return AuthenticationExtensionsClientOutputsJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_36).kpc = function (encoder, value) {
    var tmp0_desc = this.jpc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.lpc_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, $serializer_getInstance_49(), value.lpc_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_36).r44 = function (encoder, value) {
    return this.kpc(encoder, value instanceof AuthenticationExtensionsClientOutputsJSON ? value : THROW_CCE());
  };
  var $serializer_instance_36;
  function $serializer_getInstance_48() {
    if ($serializer_instance_36 == null)
      new $serializer_36();
    return $serializer_instance_36;
  }
  function AuthenticationExtensionsClientOutputsJSON_init_$Init$(seen1, prf, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_48().jpc_1);
    }
    if (0 === (seen1 & 1))
      $this.lpc_1 = null;
    else
      $this.lpc_1 = prf;
    return $this;
  }
  function AuthenticationExtensionsClientOutputsJSON_init_$Create$(seen1, prf, serializationConstructorMarker) {
    return AuthenticationExtensionsClientOutputsJSON_init_$Init$(seen1, prf, serializationConstructorMarker, objectCreate(protoOf(AuthenticationExtensionsClientOutputsJSON)));
  }
  function AuthenticationExtensionsClientOutputsJSON(prf) {
    prf = prf === VOID ? null : prf;
    this.lpc_1 = prf;
  }
  protoOf(AuthenticationExtensionsClientOutputsJSON).toString = function () {
    return 'AuthenticationExtensionsClientOutputsJSON(prf=' + this.lpc_1 + ')';
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).hashCode = function () {
    return this.lpc_1 == null ? 0 : this.lpc_1.hashCode();
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticationExtensionsClientOutputsJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticationExtensionsClientOutputsJSON ? other : THROW_CCE();
    if (!equals(this.lpc_1, tmp0_other_with_cast.lpc_1))
      return false;
    return true;
  };
  function Companion_43() {
  }
  var Companion_instance_92;
  function Companion_getInstance_60() {
    return Companion_instance_92;
  }
  function $serializer_37() {
    $serializer_instance_37 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticationExtensionsPRFOutputsJSON', this, 1);
    tmp0_serialDesc.t4f('enabled', true);
    this.mpc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_37).q44 = function () {
    return this.mpc_1;
  };
  protoOf($serializer_37).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(BooleanSerializer_getInstance())];
  };
  protoOf($serializer_37).s44 = function (decoder) {
    var tmp0_desc = this.mpc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.w48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.w48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return AuthenticationExtensionsPRFOutputsJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_37).npc = function (encoder, value) {
    var tmp0_desc = this.mpc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.opc_1 === false)) {
      tmp1_output.a4a(tmp0_desc, 0, BooleanSerializer_getInstance(), value.opc_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_37).r44 = function (encoder, value) {
    return this.npc(encoder, value instanceof AuthenticationExtensionsPRFOutputsJSON ? value : THROW_CCE());
  };
  var $serializer_instance_37;
  function $serializer_getInstance_49() {
    if ($serializer_instance_37 == null)
      new $serializer_37();
    return $serializer_instance_37;
  }
  function AuthenticationExtensionsPRFOutputsJSON_init_$Init$(seen1, enabled, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_49().mpc_1);
    }
    if (0 === (seen1 & 1))
      $this.opc_1 = false;
    else
      $this.opc_1 = enabled;
    return $this;
  }
  function AuthenticationExtensionsPRFOutputsJSON_init_$Create$(seen1, enabled, serializationConstructorMarker) {
    return AuthenticationExtensionsPRFOutputsJSON_init_$Init$(seen1, enabled, serializationConstructorMarker, objectCreate(protoOf(AuthenticationExtensionsPRFOutputsJSON)));
  }
  function AuthenticationExtensionsPRFOutputsJSON(enabled) {
    enabled = enabled === VOID ? false : enabled;
    this.opc_1 = enabled;
  }
  protoOf(AuthenticationExtensionsPRFOutputsJSON).toString = function () {
    return 'AuthenticationExtensionsPRFOutputsJSON(enabled=' + this.opc_1 + ')';
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).hashCode = function () {
    return this.opc_1 == null ? 0 : getBooleanHashCode(this.opc_1);
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticationExtensionsPRFOutputsJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticationExtensionsPRFOutputsJSON ? other : THROW_CCE();
    if (!(this.opc_1 == tmp0_other_with_cast.opc_1))
      return false;
    return true;
  };
  function Companion_44() {
  }
  protoOf(Companion_44).n4r = function () {
    return $serializer_getInstance_50();
  };
  var Companion_instance_93;
  function Companion_getInstance_61() {
    return Companion_instance_93;
  }
  function $serializer_38() {
    $serializer_instance_38 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticationResponseJSON', this, 6);
    tmp0_serialDesc.t4f('id', false);
    tmp0_serialDesc.t4f('rawId', false);
    tmp0_serialDesc.t4f('response', false);
    tmp0_serialDesc.t4f('authenticatorAttachment', true);
    tmp0_serialDesc.t4f('clientExtensionResults', false);
    tmp0_serialDesc.t4f('type', false);
    this.ppc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_38).q44 = function () {
    return this.ppc_1;
  };
  protoOf($serializer_38).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), $serializer_getInstance_51(), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_48(), StringSerializer_getInstance()];
  };
  protoOf($serializer_38).s44 = function (decoder) {
    var tmp0_desc = this.ppc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.i48(tmp0_desc);
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.u48(tmp0_desc, 2, $serializer_getInstance_51(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.u48(tmp0_desc, 4, $serializer_getInstance_48(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.s48(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.u48(tmp0_desc, 2, $serializer_getInstance_51(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.u48(tmp0_desc, 4, $serializer_getInstance_48(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.s48(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return AuthenticationResponseJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_38).qpc = function (encoder, value) {
    var tmp0_desc = this.ppc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.zpb_1);
    tmp1_output.w49(tmp0_desc, 1, value.apc_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_51(), value.bpc_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.cpc_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.cpc_1);
    }
    tmp1_output.y49(tmp0_desc, 4, $serializer_getInstance_48(), value.dpc_1);
    tmp1_output.w49(tmp0_desc, 5, value.epc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_38).r44 = function (encoder, value) {
    return this.qpc(encoder, value instanceof AuthenticationResponseJSON ? value : THROW_CCE());
  };
  var $serializer_instance_38;
  function $serializer_getInstance_50() {
    if ($serializer_instance_38 == null)
      new $serializer_38();
    return $serializer_instance_38;
  }
  function AuthenticationResponseJSON_init_$Init$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker, $this) {
    if (!(55 === (55 & seen1))) {
      throwMissingFieldException(seen1, 55, $serializer_getInstance_50().ppc_1);
    }
    $this.zpb_1 = id;
    $this.apc_1 = rawId;
    $this.bpc_1 = response;
    if (0 === (seen1 & 8))
      $this.cpc_1 = null;
    else
      $this.cpc_1 = authenticatorAttachment;
    $this.dpc_1 = clientExtensionResults;
    $this.epc_1 = type;
    return $this;
  }
  function AuthenticationResponseJSON_init_$Create$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker) {
    return AuthenticationResponseJSON_init_$Init$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker, objectCreate(protoOf(AuthenticationResponseJSON)));
  }
  function AuthenticationResponseJSON() {
  }
  protoOf(AuthenticationResponseJSON).toString = function () {
    return 'AuthenticationResponseJSON(id=' + this.zpb_1 + ', rawId=' + this.apc_1 + ', response=' + this.bpc_1 + ', authenticatorAttachment=' + this.cpc_1 + ', clientExtensionResults=' + this.dpc_1 + ', type=' + this.epc_1 + ')';
  };
  protoOf(AuthenticationResponseJSON).hashCode = function () {
    var result = getStringHashCode(this.zpb_1);
    result = imul(result, 31) + getStringHashCode(this.apc_1) | 0;
    result = imul(result, 31) + this.bpc_1.hashCode() | 0;
    result = imul(result, 31) + (this.cpc_1 == null ? 0 : getStringHashCode(this.cpc_1)) | 0;
    result = imul(result, 31) + this.dpc_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.epc_1) | 0;
    return result;
  };
  protoOf(AuthenticationResponseJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticationResponseJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticationResponseJSON ? other : THROW_CCE();
    if (!(this.zpb_1 === tmp0_other_with_cast.zpb_1))
      return false;
    if (!(this.apc_1 === tmp0_other_with_cast.apc_1))
      return false;
    if (!this.bpc_1.equals(tmp0_other_with_cast.bpc_1))
      return false;
    if (!(this.cpc_1 == tmp0_other_with_cast.cpc_1))
      return false;
    if (!this.dpc_1.equals(tmp0_other_with_cast.dpc_1))
      return false;
    if (!(this.epc_1 === tmp0_other_with_cast.epc_1))
      return false;
    return true;
  };
  function $serializer_39() {
    $serializer_instance_39 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticatorAssertionResponseJSON', this, 6);
    tmp0_serialDesc.t4f('attestationObject', true);
    tmp0_serialDesc.t4f('authenticatorData', false);
    tmp0_serialDesc.t4f('clientDataJSON', false);
    tmp0_serialDesc.t4f('publicKey', true);
    tmp0_serialDesc.t4f('userHandle', true);
    tmp0_serialDesc.t4f('signature', true);
    this.rpc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_39).q44 = function () {
    return this.rpc_1;
  };
  protoOf($serializer_39).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_39).s44 = function (decoder) {
    var tmp0_desc = this.rpc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.i48(tmp0_desc);
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return AuthenticatorAssertionResponseJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_39).spc = function (encoder, value) {
    var tmp0_desc = this.rpc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.tpb_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.tpb_1);
    }
    tmp1_output.w49(tmp0_desc, 1, value.upb_1);
    tmp1_output.w49(tmp0_desc, 2, value.vpb_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.wpb_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.wpb_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.xpb_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.xpb_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.ypb_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.ypb_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_39).r44 = function (encoder, value) {
    return this.spc(encoder, value instanceof AuthenticatorAssertionResponseJSON ? value : THROW_CCE());
  };
  var $serializer_instance_39;
  function $serializer_getInstance_51() {
    if ($serializer_instance_39 == null)
      new $serializer_39();
    return $serializer_instance_39;
  }
  function AuthenticatorAssertionResponseJSON_init_$Init$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker, $this) {
    if (!(6 === (6 & seen1))) {
      throwMissingFieldException(seen1, 6, $serializer_getInstance_51().rpc_1);
    }
    if (0 === (seen1 & 1))
      $this.tpb_1 = null;
    else
      $this.tpb_1 = attestationObject;
    $this.upb_1 = authenticatorData;
    $this.vpb_1 = clientDataJSON;
    if (0 === (seen1 & 8))
      $this.wpb_1 = null;
    else
      $this.wpb_1 = publicKey;
    if (0 === (seen1 & 16))
      $this.xpb_1 = null;
    else
      $this.xpb_1 = userHandle;
    if (0 === (seen1 & 32))
      $this.ypb_1 = null;
    else
      $this.ypb_1 = signature;
    return $this;
  }
  function AuthenticatorAssertionResponseJSON_init_$Create$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker) {
    return AuthenticatorAssertionResponseJSON_init_$Init$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker, objectCreate(protoOf(AuthenticatorAssertionResponseJSON)));
  }
  function AuthenticatorAssertionResponseJSON() {
  }
  protoOf(AuthenticatorAssertionResponseJSON).toString = function () {
    return 'AuthenticatorAssertionResponseJSON(attestationObject=' + this.tpb_1 + ', authenticatorData=' + this.upb_1 + ', clientDataJSON=' + this.vpb_1 + ', publicKey=' + this.wpb_1 + ', userHandle=' + this.xpb_1 + ', signature=' + this.ypb_1 + ')';
  };
  protoOf(AuthenticatorAssertionResponseJSON).hashCode = function () {
    var result = this.tpb_1 == null ? 0 : getStringHashCode(this.tpb_1);
    result = imul(result, 31) + getStringHashCode(this.upb_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.vpb_1) | 0;
    result = imul(result, 31) + (this.wpb_1 == null ? 0 : getStringHashCode(this.wpb_1)) | 0;
    result = imul(result, 31) + (this.xpb_1 == null ? 0 : getStringHashCode(this.xpb_1)) | 0;
    result = imul(result, 31) + (this.ypb_1 == null ? 0 : getStringHashCode(this.ypb_1)) | 0;
    return result;
  };
  protoOf(AuthenticatorAssertionResponseJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticatorAssertionResponseJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticatorAssertionResponseJSON ? other : THROW_CCE();
    if (!(this.tpb_1 == tmp0_other_with_cast.tpb_1))
      return false;
    if (!(this.upb_1 === tmp0_other_with_cast.upb_1))
      return false;
    if (!(this.vpb_1 === tmp0_other_with_cast.vpb_1))
      return false;
    if (!(this.wpb_1 == tmp0_other_with_cast.wpb_1))
      return false;
    if (!(this.xpb_1 == tmp0_other_with_cast.xpb_1))
      return false;
    if (!(this.ypb_1 == tmp0_other_with_cast.ypb_1))
      return false;
    return true;
  };
  function Companion_45() {
  }
  var Companion_instance_94;
  function Companion_getInstance_62() {
    return Companion_instance_94;
  }
  function $serializer_40() {
    $serializer_instance_40 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.ClientDataJSON', this, 4);
    tmp0_serialDesc.t4f('type', false);
    tmp0_serialDesc.t4f('challenge', false);
    tmp0_serialDesc.t4f('origin', false);
    tmp0_serialDesc.t4f('crossOrigin', true);
    this.tpc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_40).q44 = function () {
    return this.tpc_1;
  };
  protoOf($serializer_40).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(BooleanSerializer_getInstance())];
  };
  protoOf($serializer_40).s44 = function (decoder) {
    var tmp0_desc = this.tpc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, BooleanSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, BooleanSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return ClientDataJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_40).upc = function (encoder, value) {
    var tmp0_desc = this.tpc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.fpc_1);
    tmp1_output.w49(tmp0_desc, 1, value.gpc_1);
    tmp1_output.w49(tmp0_desc, 2, value.hpc_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.ipc_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, BooleanSerializer_getInstance(), value.ipc_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_40).r44 = function (encoder, value) {
    return this.upc(encoder, value instanceof ClientDataJSON ? value : THROW_CCE());
  };
  var $serializer_instance_40;
  function $serializer_getInstance_52() {
    if ($serializer_instance_40 == null)
      new $serializer_40();
    return $serializer_instance_40;
  }
  function ClientDataJSON_init_$Init$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_52().tpc_1);
    }
    $this.fpc_1 = type;
    $this.gpc_1 = challenge;
    $this.hpc_1 = origin;
    if (0 === (seen1 & 8))
      $this.ipc_1 = null;
    else
      $this.ipc_1 = crossOrigin;
    return $this;
  }
  function ClientDataJSON_init_$Create$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker) {
    return ClientDataJSON_init_$Init$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker, objectCreate(protoOf(ClientDataJSON)));
  }
  function ClientDataJSON(type, challenge, origin, crossOrigin) {
    crossOrigin = crossOrigin === VOID ? null : crossOrigin;
    this.fpc_1 = type;
    this.gpc_1 = challenge;
    this.hpc_1 = origin;
    this.ipc_1 = crossOrigin;
  }
  protoOf(ClientDataJSON).toString = function () {
    return 'ClientDataJSON(type=' + this.fpc_1 + ', challenge=' + this.gpc_1 + ', origin=' + this.hpc_1 + ', crossOrigin=' + this.ipc_1 + ')';
  };
  protoOf(ClientDataJSON).hashCode = function () {
    var result = getStringHashCode(this.fpc_1);
    result = imul(result, 31) + getStringHashCode(this.gpc_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.hpc_1) | 0;
    result = imul(result, 31) + (this.ipc_1 == null ? 0 : getBooleanHashCode(this.ipc_1)) | 0;
    return result;
  };
  protoOf(ClientDataJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClientDataJSON))
      return false;
    var tmp0_other_with_cast = other instanceof ClientDataJSON ? other : THROW_CCE();
    if (!(this.fpc_1 === tmp0_other_with_cast.fpc_1))
      return false;
    if (!(this.gpc_1 === tmp0_other_with_cast.gpc_1))
      return false;
    if (!(this.hpc_1 === tmp0_other_with_cast.hpc_1))
      return false;
    if (!(this.ipc_1 == tmp0_other_with_cast.ipc_1))
      return false;
    return true;
  };
  function SavePasswordUseCase() {
  }
  function CreateCredentialUsernameUseCase(learningSpace) {
    this.wpc_1 = learningSpace;
  }
  function ParseCredentialUsernameUseCase() {
  }
  protoOf(ParseCredentialUsernameUseCase).up9 = function (credentialUsername) {
    var tmp0_container = split(credentialUsername, ['@'], VOID, 2);
    // Inline function 'kotlin.collections.component1' call
    var username = tmp0_container.v(0);
    // Inline function 'kotlin.collections.component2' call
    var learningSpacePart = tmp0_container.v(1);
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var learningSpacePartLower = learningSpacePart.toLowerCase();
    var tmp;
    if (startsWith(learningSpacePartLower, 'http://')) {
      tmp = new Pair(new LearningSpace(learningSpacePart), username);
    } else {
      tmp = new Pair(new LearningSpace(requirePostfix('https://' + learningSpacePart, '/')), username);
    }
    return tmp;
  };
  function DeletePermanentlyUseCase(repoOrDb) {
    this.xpc_1 = repoOrDb;
  }
  protoOf(DeletePermanentlyUseCase).ypc = function (items, $completion) {
    var timeNow = systemTimeInMillis();
    var tmp = this.xpc_1.m7f();
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(items, 10));
    var tmp0_iterator = items.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.deleteditem.DeletePermanentlyUseCase.invoke.<anonymous>' call
      var tmp$ret$0 = item.feg_1;
      destination.i1(tmp$ret$0);
    }
    var tmp_0 = destination;
    return tmp.eeg(tmp_0, 3, timeNow, $completion);
  };
  function RestoreDeletedItemUseCase$invoke$slambda($itemsByType, this$0, $timeNow, $items, resultContinuation) {
    this.hpd_1 = $itemsByType;
    this.ipd_1 = this$0;
    this.jpd_1 = $timeNow;
    this.kpd_1 = $items;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            var tmp_0 = this;
            tmp_0.mpd_1 = this.hpd_1;
            var tmp_1 = this;
            tmp_1.npd_1 = this.mpd_1.q2().w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.npd_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.opd_1 = this.npd_1.e();
            var tmp_2 = this;
            tmp_2.ppd_1 = this.opd_1;
            this.qpd_1 = this.ppd_1.s2();
            if (this.qpd_1 === 7) {
              this.hd_1 = 2;
              var tmp_3 = this.ipd_1.rpd_1.x7d();
              var this_0 = this.ppd_1.t2();
              var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
              var tmp0_iterator = this_0.w();
              while (tmp0_iterator.f()) {
                var item = tmp0_iterator.e();
                destination.i1(item.leg_1);
              }
              suspendResult = tmp_3.rbd(destination, false, this.jpd_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 1;
            continue $sm;
          case 4:
            this.hd_1 = 5;
            var tmp_4 = this.ipd_1.rpd_1.m7f();
            var this_1 = this.kpd_1;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var item_0 = tmp0_iterator_0.e();
              destination_0.i1(item_0.feg_1);
            }

            suspendResult = tmp_4.eeg(destination_0, 2, this.jpd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new RestoreDeletedItemUseCase$invoke$slambda(this.hpd_1, this.ipd_1, this.jpd_1, this.kpd_1, completion);
    i.lpd_1 = it;
    return i;
  };
  function RestoreDeletedItemUseCase$invoke$slambda_0($itemsByType, this$0, $timeNow, $items, resultContinuation) {
    var i = new RestoreDeletedItemUseCase$invoke$slambda($itemsByType, this$0, $timeNow, $items, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RestoreDeletedItemUseCase(repoOrDb) {
    this.rpd_1 = repoOrDb;
  }
  protoOf(RestoreDeletedItemUseCase).ypc = function (items, $completion) {
    // Inline function 'kotlin.collections.groupBy' call
    // Inline function 'kotlin.collections.groupByTo' call
    var destination = LinkedHashMap_init_$Create$();
    var tmp0_iterator = items.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.deleteditem.RestoreDeletedItemUseCase.invoke.<anonymous>' call
      var key = element.keg_1;
      // Inline function 'kotlin.collections.getOrPut' call
      var value = destination.q(key);
      var tmp;
      if (value == null) {
        // Inline function 'kotlin.collections.groupByTo.<anonymous>' call
        var answer = ArrayList_init_$Create$();
        destination.s(key, answer);
        tmp = answer;
      } else {
        tmp = value;
      }
      var list = tmp;
      list.i1(element);
    }
    var itemsByType = destination;
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(this.rpd_1, VOID, RestoreDeletedItemUseCase$invoke$slambda_0(itemsByType, this, timeNow, items, null), $completion);
  };
  function toEpubTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.tpd_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp8_uid = $this.tpd_1.atomicfu$incrementAndGet();
    var tmp0_safe_receiver = _this__u8e3s4.hob_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xoa_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.iob_1;
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.xob_1;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var tmp3_elvis_lhs = tmp;
    var tmp9_label = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
    var tmp4_safe_receiver = _this__u8e3s4.hob_1;
    var tmp10_href = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.yoa_1;
    var tmp5_safe_receiver = _this__u8e3s4.job_1;
    var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.wob_1;
    var tmp_0;
    if (tmp6_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp6_safe_receiver, 10));
      var tmp0_iterator = tmp6_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.epub.GetEpubTableOfContentsUseCase.toEpubTocItem.<anonymous>' call
        var tmp$ret$0 = toEpubTocItem(item, $this, indentLevel + 1 | 0, uidsForChildren);
        destination.i1(tmp$ret$0);
      }
      tmp_0 = destination;
    }
    var tmp7_elvis_lhs = tmp_0;
    var tmp11_children = tmp7_elvis_lhs == null ? emptyList() : tmp7_elvis_lhs;
    return new EpubTocItem(tmp8_uid, tmp9_label, tmp10_href, tmp11_children, parentUids, indentLevel);
  }
  function toTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.tpd_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp0_safe_receiver = firstOrNull(_this__u8e3s4.woc_1);
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ooc_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.jod_1;
    var tmp3_label = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
    var tmp4_href = _this__u8e3s4.xoc_1.doc_1;
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.zoc_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.epub.GetEpubTableOfContentsUseCase.toTocItem.<anonymous>' call
      var tmp$ret$0 = toTocItem(item, $this, indentLevel + 1 | 0, uidsForChildren);
      destination.i1(tmp$ret$0);
    }
    return new EpubTocItem(uid, tmp3_label, tmp4_href, destination, parentUids, indentLevel);
  }
  function $invokeCOROUTINE$32(_this__u8e3s4, opfPackage, readItemText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.cpe_1 = _this__u8e3s4;
    this.dpe_1 = opfPackage;
    this.epe_1 = readItemText;
  }
  protoOf($invokeCOROUTINE$32).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.fpe_1 = this.dpe_1.nof();
            if (!(this.fpe_1 == null) ? startsWith(this.fpe_1.ioe_1, 'application/xhtml') : false) {
              this.hd_1 = 2;
              suspendResult = this.epe_1(this.fpe_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0;
              if (!(this.fpe_1 == null)) {
                tmp_0 = this.fpe_1.ioe_1 === 'application/x-dtbncx+xml';
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                this.hd_1 = 1;
                suspendResult = this.epe_1(this.fpe_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_1 = this;
                tmp_1.gpe_1 = null;
                this.hd_1 = 3;
                continue $sm;
              }
            }

          case 1:
            var docStr = suspendResult;
            var this_0 = this.cpe_1.spd_1;
            var this_1 = this_0.t45();
            var this_2 = serializer(this_1, createKType(getKClass(NcxDocument), arrayOf([]), false));
            var ncxDoc = this_0.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), docStr);
            var tmp_2 = this;
            var this_3 = ncxDoc.god_1.soc_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_3.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var it = toTocItem(element, this.cpe_1, 0, emptySet());
              var list = plus(listOf_0(it), it.kpe_1);
              addAll(destination, list);
            }

            tmp_2.gpe_1 = destination;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            var docStr_0 = suspendResult;
            var this_4 = this.cpe_1.spd_1;
            var this_5 = this_4.t45();
            var this_6 = serializer(this_5, createKType(getKClass(NavigationDocument), arrayOf([]), false));
            var navDoc = this_4.s45(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), docStr_0);
            var tmp_3 = this;
            var this_7 = first_0(navDoc.sob_1.bob_1).nob_1.wob_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_7.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var it_0 = toEpubTocItem(element_0, this.cpe_1, 0, emptySet());
              var list_0 = plus(listOf_0(it_0), it_0.kpe_1);
              addAll(destination_0, list_0);
            }

            tmp_3.gpe_1 = destination_0;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.gpe_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetEpubTableOfContentsUseCase(xml) {
    this.spd_1 = xml;
    this.tpd_1 = atomic$int$1(0);
  }
  protoOf(GetEpubTableOfContentsUseCase).ope = function (opfPackage, readItemText, $completion) {
    var tmp = new $invokeCOROUTINE$32(this, opfPackage, readItemText, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_46() {
    Companion_instance_95 = this;
    this.ppe_1 = Companion_getInstance_73().spe_1;
  }
  var Companion_instance_95;
  function Companion_getInstance_63() {
    if (Companion_instance_95 == null)
      new Companion_46();
    return Companion_instance_95;
  }
  function FilterUsernameUseCase() {
    Companion_getInstance_63();
  }
  protoOf(FilterUsernameUseCase).tpe = function (username, invalidCharReplacement) {
    // Inline function 'kotlin.text.map' call
    // Inline function 'kotlin.text.mapTo' call
    var destination = ArrayList_init_$Create$_0(charSequenceLength(username));
    var inductionVariable = 0;
    while (inductionVariable < charSequenceLength(username)) {
      var item = charSequenceGet(username, inductionVariable);
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.domain.filterusername.FilterUsernameUseCase.invoke.<anonymous>' call
      var tmp;
      if (isLetter(item)) {
        // Inline function 'kotlin.text.lowercase' call
        // Inline function 'kotlin.js.unsafeCast' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = toString_1(item).toLowerCase();
      } else if (isDigit(item)) {
        tmp = new Char(item);
      } else if (Companion_getInstance_63().ppe_1.a1(new Char(item))) {
        tmp = new Char(item);
      } else {
        tmp = invalidCharReplacement;
      }
      var tmp$ret$3 = tmp;
      destination.i1(tmp$ret$3);
    }
    return joinToString(destination, '');
  };
  function GetApiUrlUseCase() {
  }
  function GetApiUrlUseCaseDirect(learningSpace) {
    this.upe_1 = learningSpace;
  }
  protoOf(GetApiUrlUseCaseDirect).up9 = function (path) {
    return requirePostfix(this.upe_1.wnt_1, '/') + removePrefix(path, '/');
  };
  function VersionInfo(versionString, buildTime) {
    this.vpe_1 = versionString;
    this.wpe_1 = buildTime;
  }
  protoOf(VersionInfo).toString = function () {
    return 'VersionInfo(versionString=' + this.vpe_1 + ', buildTime=' + this.wpe_1.toString() + ')';
  };
  protoOf(VersionInfo).hashCode = function () {
    var result = getStringHashCode(this.vpe_1);
    result = imul(result, 31) + this.wpe_1.hashCode() | 0;
    return result;
  };
  protoOf(VersionInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VersionInfo))
      return false;
    var tmp0_other_with_cast = other instanceof VersionInfo ? other : THROW_CCE();
    if (!(this.vpe_1 === tmp0_other_with_cast.vpe_1))
      return false;
    if (!this.wpe_1.equals(tmp0_other_with_cast.wpe_1))
      return false;
    return true;
  };
  function GetVersionUseCase() {
  }
  function HideKeyboardUseCase() {
  }
  function GetHtmlContentDisplayEngineOptionsUseCase(optionsList) {
    this.zpe_1 = optionsList;
  }
  protoOf(GetHtmlContentDisplayEngineOptionsUseCase).xpe = function () {
    return this.zpe_1;
  };
  function GetHtmlContentDisplayEngineUseCase(settings, getOptionsUseCase) {
    this.apf_1 = settings;
    this.bpf_1 = getOptionsUseCase;
  }
  protoOf(GetHtmlContentDisplayEngineUseCase).xpe = function () {
    // Inline function 'com.russhwolf.settings.get' call
    var this_0 = this.apf_1;
    var key = 'com.ustadmobile.htmlcontentdisplayengine';
    var settingInt = this_0.wm7(key, 0);
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.bpf_1.xpe().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.htmlcontentdisplayengine.GetHtmlContentDisplayEngineUseCase.invoke.<anonymous>' call
        if (element.cpf_1 === settingInt) {
          tmp$ret$2 = element;
          break $l$block;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$2;
    return tmp0_elvis_lhs == null ? first_0(this.bpf_1.xpe()) : tmp0_elvis_lhs;
  };
  function Companion_47() {
    this.fpf_1 = 'com.ustadmobile.htmlcontentdisplayengine';
  }
  var Companion_instance_96;
  function Companion_getInstance_64() {
    return Companion_instance_96;
  }
  function SetHtmlContentDisplayEngineUseCase(settings) {
    this.gpf_1 = settings;
  }
  function ClazzInviteRedeemException(message, stringResource) {
    Exception_init_$Init$(message, this);
    captureStack(this, ClazzInviteRedeemException);
    this.hpf_1 = stringResource;
  }
  protoOf(ClazzInviteRedeemException).ipf = function () {
    return this.hpf_1;
  };
  function ClazzInviteRedeemUseCase$invoke$slambda($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation) {
    this.rpf_1 = $effectiveDb;
    this.spf_1 = $clazzInvite;
    this.tpf_1 = $enrolmentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.rpf_1.t7d().m93(this.spf_1.c9n_1, this.tpf_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.rpf_1.e7g();
            suspendResult = tmp_0.l9m(1, this.spf_1.c9n_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new ClazzInviteRedeemUseCase$invoke$slambda(this.rpf_1, this.spf_1, this.tpf_1, completion);
    i.upf_1 = it;
    return i;
  };
  function ClazzInviteRedeemUseCase$invoke$slambda_0($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation) {
    var i = new ClazzInviteRedeemUseCase$invoke$slambda($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$33(_this__u8e3s4, inviteCode, isAccepting, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.dpg_1 = _this__u8e3s4;
    this.epg_1 = inviteCode;
    this.fpg_1 = isAccepting;
    this.gpg_1 = personUid;
  }
  protoOf($invokeCOROUTINE$33).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.dpg_1.npg_1;
            tmp_0.hpg_1 = tmp0_elvis_lhs == null ? this.dpg_1.mpg_1 : tmp0_elvis_lhs;
            this.hd_1 = 1;
            suspendResult = this.hpg_1.e7g().j9m(this.epg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ipg_1 = suspendResult;
            var tmp_1 = this;
            var tmp1_safe_receiver = this.ipg_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n9n_1;
            var tmp_2;
            if (tmp2_elvis_lhs == null) {
              throw new ClazzInviteRedeemException('Invite not found', strings_getInstance().nno_1);
            } else {
              tmp_2 = tmp2_elvis_lhs;
            }

            tmp_1.jpg_1 = tmp_2;
            var tmp_3 = this.jpg_1.j9n_1;
            if (tmp_3 === 3) {
              throw new ClazzInviteRedeemException('Invite code is revoked', strings_getInstance().vnr_1);
            }

            var tmp_4 = this.jpg_1.j9n_1;
            if (!(tmp_4 === 0)) {
              throw new ClazzInviteRedeemException('Invite already used', strings_getInstance().knr_1);
            }

            if (this.jpg_1.k9n_1.c7(systemTimeInMillis()) < 0) {
              throw new ClazzInviteRedeemException('Invite code is expired', strings_getInstance().unr_1);
            }

            if (this.fpg_1) {
              this.hd_1 = 3;
              var tmp_5 = ClazzEnrolment_init_$Create$(this.jpg_1.f9n_1, this.gpg_1, this.jpg_1.e9n_1.mb());
              var tmp3_elvis_lhs = this.ipg_1.o9n_1;
              suspendResult = this.dpg_1.lpg_1.soz(tmp_5, tmp3_elvis_lhs == null ? 'UTC' : tmp3_elvis_lhs, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              var tmp_6 = this.hpg_1.e7g();
              suspendResult = tmp_6.l9m(2, this.jpg_1.c9n_1, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            return new ClazzRedeemResult(this.dpg_1.opg_1.moj(strings_getInstance().snr_1));
          case 3:
            this.kpg_1 = suspendResult;
            this.hd_1 = 4;
            suspendResult = withDoorTransactionAsync(this.hpg_1, VOID, ClazzInviteRedeemUseCase$invoke$slambda_0(this.hpg_1, this.jpg_1, this.kpg_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return new ClazzRedeemResult(this.dpg_1.opg_1.moj(strings_getInstance().qnr_1));
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzInviteRedeemUseCase(enrolIntoCourseUseCase, db, repo, systemImpl) {
    this.lpg_1 = enrolIntoCourseUseCase;
    this.mpg_1 = db;
    this.npg_1 = repo;
    this.opg_1 = systemImpl;
  }
  protoOf(ClazzInviteRedeemUseCase).ppg = function (inviteCode, isAccepting, personUid, $completion) {
    var tmp = new $invokeCOROUTINE$33(this, inviteCode, isAccepting, personUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function ClazzRedeemResult(message) {
    this.qpg_1 = message;
  }
  protoOf(ClazzRedeemResult).toString = function () {
    return 'ClazzRedeemResult(message=' + this.qpg_1 + ')';
  };
  protoOf(ClazzRedeemResult).hashCode = function () {
    return getStringHashCode(this.qpg_1);
  };
  protoOf(ClazzRedeemResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzRedeemResult))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzRedeemResult ? other : THROW_CCE();
    if (!(this.qpg_1 === tmp0_other_with_cast.qpg_1))
      return false;
    return true;
  };
  function $invokeCOROUTINE$34(_this__u8e3s4, viewUri, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zpg_1 = _this__u8e3s4;
    this.aph_1 = viewUri;
    this.bph_1 = personUid;
  }
  protoOf($invokeCOROUTINE$34).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.cph_1 = indexOf(this.aph_1, _Char___init__impl__6a9atx(63));
            var tmp_0 = this;
            var tmp_1;
            if (this.cph_1 > 0) {
              var tmp_2 = UMFileUtil_getInstance();
              var this_0 = this.aph_1;
              var startIndex = this.cph_1;
              tmp_1 = tmp_2.parseURLQueryString(this_0.substring(startIndex));
            } else {
              tmp_1 = emptyMap();
            }

            tmp_0.dph_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.zpg_1.eph_1.ppg(first_1(this.dph_1.p2()), true, this.bph_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function EnrollToCourseFromInviteCodeUseCase(clazzInviteRedeemUseCase) {
    this.eph_1 = clazzInviteRedeemUseCase;
  }
  protoOf(EnrollToCourseFromInviteCodeUseCase).fph = function (viewUri, personUid, $completion) {
    var tmp = new $invokeCOROUTINE$34(this, viewUri, personUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function isValidUserName($this, username) {
    return startsWith(username, '@');
  }
  function ParseInviteUseCase(phoneNumValidatorUseCase, validateEmailUseCase) {
    this.gph_1 = phoneNumValidatorUseCase;
    this.hph_1 = validateEmailUseCase;
  }
  protoOf(ParseInviteUseCase).up9 = function (text) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.text.split' call
    var this_0 = Regex_init_$Create$('\\s+|,|;').y9(text, 0);
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.invite.ParseInviteUseCase.invoke.<anonymous>' call
      // Inline function 'kotlin.text.trim' call
      var tmp$ret$2 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
      destination.i1(tmp$ret$2);
    }
    // Inline function 'kotlin.collections.filterTo' call
    var destination_0 = ArrayList_init_$Create$();
    var tmp0_iterator_0 = destination.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.domain.invite.ParseInviteUseCase.invoke.<anonymous>' call
      // Inline function 'kotlin.text.isNotEmpty' call
      if (charSequenceLength(element) > 0) {
        destination_0.i1(element);
      }
    }
    var parts = distinct(destination_0);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(parts, 10));
    var tmp0_iterator_1 = parts.w();
    while (tmp0_iterator_1.f()) {
      var item_0 = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.domain.invite.ParseInviteUseCase.invoke.<anonymous>' call
      var tmp;
      if (!(this.hph_1.up9(item_0) == null)) {
        tmp = new InviteViaContactChip(item_0, true, 1);
      } else if (this.gph_1.iph(item_0)) {
        tmp = new InviteViaContactChip(item_0, true, 2);
      } else if (isValidUserName(this, item_0)) {
        tmp = new InviteViaContactChip(item_0, true, 3);
      } else {
        tmp = new InviteViaContactChip(item_0, false, 0);
      }
      var tmp$ret$9 = tmp;
      destination_1.i1(tmp$ret$9);
    }
    return destination_1;
  };
  function Companion_48() {
    Companion_instance_97 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.jph_1 = [new ArrayListSerializer(StringSerializer_getInstance()), null, null, null];
  }
  protoOf(Companion_48).n4r = function () {
    return $serializer_getInstance_53();
  };
  var Companion_instance_97;
  function Companion_getInstance_65() {
    if (Companion_instance_97 == null)
      new Companion_48();
    return Companion_instance_97;
  }
  function $serializer_41() {
    $serializer_instance_41 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.invite.SendClazzInvitesUseCase.SendClazzInvitesRequest', this, 4);
    tmp0_serialDesc.t4f('contacts', false);
    tmp0_serialDesc.t4f('clazzUid', false);
    tmp0_serialDesc.t4f('role', false);
    tmp0_serialDesc.t4f('personUid', false);
    this.kph_1 = tmp0_serialDesc;
  }
  protoOf($serializer_41).q44 = function () {
    return this.kph_1;
  };
  protoOf($serializer_41).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_65().jph_1[0], LongSerializer_getInstance(), LongSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_41).s44 = function (decoder) {
    var tmp0_desc = this.kph_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = new Long(0, 0);
    var tmp7_local3 = new Long(0, 0);
    var tmp8_input = decoder.i48(tmp0_desc);
    var tmp9_cached = Companion_getInstance_65().jph_1;
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.o48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.o48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.o48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.o48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return SendClazzInvitesRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_41).lph = function (encoder, value) {
    var tmp0_desc = this.kph_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_65().jph_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.mph_1);
    tmp1_output.s49(tmp0_desc, 1, value.nph_1);
    tmp1_output.s49(tmp0_desc, 2, value.oph_1);
    tmp1_output.s49(tmp0_desc, 3, value.pph_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_41).r44 = function (encoder, value) {
    return this.lph(encoder, value instanceof SendClazzInvitesRequest ? value : THROW_CCE());
  };
  var $serializer_instance_41;
  function $serializer_getInstance_53() {
    if ($serializer_instance_41 == null)
      new $serializer_41();
    return $serializer_instance_41;
  }
  function SendClazzInvitesRequest_init_$Init$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_53().kph_1);
    }
    $this.mph_1 = contacts;
    $this.nph_1 = clazzUid;
    $this.oph_1 = role;
    $this.pph_1 = personUid;
    return $this;
  }
  function SendClazzInvitesRequest_init_$Create$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker) {
    return SendClazzInvitesRequest_init_$Init$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker, objectCreate(protoOf(SendClazzInvitesRequest)));
  }
  function SendClazzInvitesRequest(contacts, clazzUid, role, personUid) {
    Companion_getInstance_65();
    this.mph_1 = contacts;
    this.nph_1 = clazzUid;
    this.oph_1 = role;
    this.pph_1 = personUid;
  }
  protoOf(SendClazzInvitesRequest).toString = function () {
    return 'SendClazzInvitesRequest(contacts=' + this.mph_1 + ', clazzUid=' + this.nph_1.toString() + ', role=' + this.oph_1.toString() + ', personUid=' + this.pph_1.toString() + ')';
  };
  protoOf(SendClazzInvitesRequest).hashCode = function () {
    var result = hashCode(this.mph_1);
    result = imul(result, 31) + this.nph_1.hashCode() | 0;
    result = imul(result, 31) + this.oph_1.hashCode() | 0;
    result = imul(result, 31) + this.pph_1.hashCode() | 0;
    return result;
  };
  protoOf(SendClazzInvitesRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SendClazzInvitesRequest))
      return false;
    var tmp0_other_with_cast = other instanceof SendClazzInvitesRequest ? other : THROW_CCE();
    if (!equals(this.mph_1, tmp0_other_with_cast.mph_1))
      return false;
    if (!this.nph_1.equals(tmp0_other_with_cast.nph_1))
      return false;
    if (!this.oph_1.equals(tmp0_other_with_cast.oph_1))
      return false;
    if (!this.pph_1.equals(tmp0_other_with_cast.pph_1))
      return false;
    return true;
  };
  function SendClazzInvitesUseCase() {
  }
  function SendClazzInvitesUseCaseSendToServerImpl$invoke$lambda() {
    return 'ContactToServerUseCase: sent OK';
  }
  function SendClazzInvitesUseCaseSendToServerImpl$invoke$lambda_0($e) {
    return function () {
      return 'ContactToServerUseCase:-  exception ' + $e;
    };
  }
  function $invokeCOROUTINE$35(_this__u8e3s4, request, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zph_1 = _this__u8e3s4;
    this.api_1 = request;
  }
  protoOf($invokeCOROUTINE$35).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.bpi_1 = this.zph_1.ipi_1;
            var tmp_1 = this;
            tmp_1.cpi_1 = this.zph_1.jpi_1.wnt_1 + 'api/invite/sendclazzinvites';
            var tmp_2 = this;
            tmp_2.dpi_1 = this.bpi_1;
            var tmp_3 = this;
            tmp_3.epi_1 = this.dpi_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.cpi_1);
            contentType(this_0, Application_getInstance().v2r_1);
            setBodyJson(this_0, this.zph_1.kpi_1, Companion_getInstance_65().n4r(), this.api_1);
            tmp_4.fpi_1 = this_0;
            this.fpi_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_5 = this;
            tmp_5.gpi_1 = this.epi_1;
            var tmp_6 = this;
            tmp_6.hpi_1 = this.fpi_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.hpi_1, this.gpi_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_7 = Napier_getInstance();
            tmp_7.k5e(VOID, VOID, SendClazzInvitesUseCaseSendToServerImpl$invoke$lambda);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_8 = this.kd_1;
            if (tmp_8 instanceof Error) {
              var e = this.kd_1;
              var tmp_9 = Napier_getInstance();
              tmp_9.k5e(VOID, VOID, SendClazzInvitesUseCaseSendToServerImpl$invoke$lambda_0(e));
              throw e;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function SendClazzInvitesUseCaseSendToServerImpl(httpClient, learningSpace, json) {
    this.ipi_1 = httpClient;
    this.jpi_1 = learningSpace;
    this.kpi_1 = json;
  }
  protoOf(SendClazzInvitesUseCaseSendToServerImpl).qph = function (request, $completion) {
    var tmp = new $invokeCOROUTINE$35(this, request, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SetLangResult(waitForRestart) {
    this.lpi_1 = waitForRestart;
  }
  protoOf(SetLangResult).toString = function () {
    return 'SetLangResult(waitForRestart=' + this.lpi_1 + ')';
  };
  protoOf(SetLangResult).hashCode = function () {
    return getBooleanHashCode(this.lpi_1);
  };
  protoOf(SetLangResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SetLangResult))
      return false;
    var tmp0_other_with_cast = other instanceof SetLangResult ? other : THROW_CCE();
    if (!(this.lpi_1 === tmp0_other_with_cast.lpi_1))
      return false;
    return true;
  };
  function SetLanguageUseCase() {
  }
  function LaunchOpenLicensesUseCase() {
  }
  function GoToLearningSpaceUseCase() {
  }
  function GetLocalAccountsSupportedUseCase(localAccountsSupported) {
    this.ppi_1 = localAccountsSupported;
  }
  protoOf(GetLocalAccountsSupportedUseCase).xpe = function () {
    return this.ppi_1;
  };
  function CheckContentLocalAvailabilityUseCase() {
  }
  function Companion_49() {
    this.rpi_1 = 'local_sharing_enabled';
  }
  var Companion_instance_98;
  function Companion_getInstance_66() {
    return Companion_instance_98;
  }
  function SetLocalSharingEnabledUseCase(settings) {
    this.spi_1 = settings;
  }
  function MakeLinkUseCase(learningSpace) {
    this.tpi_1 = learningSpace;
  }
  protoOf(MakeLinkUseCase).upi = function (destName, args) {
    var tmp = UMFileUtil_getInstance();
    Companion_getInstance_96();
    return appendQueryArgs_0(tmp.vpi([this.tpi_1.wnt_1, '/umapp/#/']) + destName, toQueryString(args));
  };
  function GetDefaultDestinationUseCase(systemUrlConfig, learningSpace) {
    this.wpi_1 = systemUrlConfig;
    this.xpi_1 = learningSpace;
  }
  protoOf(GetDefaultDestinationUseCase).xpe = function () {
    var tmp;
    if (this.xpi_1.wnt_1 === this.wpi_1.xo5_1 ? true : this.xpi_1.ynt()) {
      Companion_getInstance_169();
      tmp = 'ContentEntryListHome';
    } else {
      Companion_getInstance_140();
      tmp = 'CourseListHome';
    }
    return tmp;
  };
  function OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, $this) {
    OnClickLinkUseCase.call($this, navController, accountManager, openExternalLinkUseCase, apiUrlConfig.ao6_1);
    return $this;
  }
  function OnClickLinkUseCase_init_$Create$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig) {
    return OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, objectCreate(protoOf(OnClickLinkUseCase)));
  }
  function OnClickLinkUseCase(navController, accountManager, openExternalLinkUseCase, userCanSelectServer) {
    this.ypi_1 = navController;
    this.zpi_1 = accountManager;
    this.apj_1 = openExternalLinkUseCase;
    this.bpj_1 = userCanSelectServer;
  }
  protoOf(OnClickLinkUseCase).cpj = function (link, target) {
    navigateToLink(this.ypi_1, link, this.zpi_1, this.apj_1, VOID, VOID, this.bpj_1, VOID, VOID, target);
  };
  var LinkTarget_BLANK_instance;
  var LinkTarget_TOP_instance;
  var LinkTarget_SELF_instance;
  var LinkTarget_DEFAULT_instance;
  function Companion_50() {
  }
  protoOf(Companion_50).vmg = function (targetAttr) {
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    switch (targetAttr.toLowerCase()) {
      case '_top':
        return LinkTarget_TOP_getInstance();
      case '_blank':
        return LinkTarget_BLANK_getInstance();
      case '_self':
        return LinkTarget_SELF_getInstance();
      default:
        return LinkTarget_DEFAULT_getInstance();
    }
  };
  var Companion_instance_99;
  function Companion_getInstance_67() {
    return Companion_instance_99;
  }
  var LinkTarget_entriesInitialized;
  function LinkTarget_initEntries() {
    if (LinkTarget_entriesInitialized)
      return Unit_instance;
    LinkTarget_entriesInitialized = true;
    LinkTarget_BLANK_instance = new LinkTarget('BLANK', 0);
    LinkTarget_TOP_instance = new LinkTarget('TOP', 1);
    LinkTarget_SELF_instance = new LinkTarget('SELF', 2);
    LinkTarget_DEFAULT_instance = new LinkTarget('DEFAULT', 3);
  }
  function LinkTarget(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function LinkTarget_BLANK_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_BLANK_instance;
  }
  function LinkTarget_TOP_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_TOP_instance;
  }
  function LinkTarget_SELF_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_SELF_instance;
  }
  function LinkTarget_DEFAULT_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_DEFAULT_instance;
  }
  function OpenExternalLinkUseCase() {
  }
  function UpdatePeerReviewAllocationUseCase$invoke$lambda($selectedMarkerUid) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_elvis_lhs = $selectedMarkerUid;
      tmp.ofu_1 = tmp0_elvis_lhs == null ? new Long(0, 0) : tmp0_elvis_lhs;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$36(_this__u8e3s4, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lpj_1 = _this__u8e3s4;
    this.mpj_1 = existingAllocations;
    this.npj_1 = groupUid;
    this.opj_1 = clazzUid;
    this.ppj_1 = assignmentUid;
    this.qpj_1 = numReviewsPerSubmission;
    this.rpj_1 = allocateRemaining;
    this.spj_1 = resetAllocations;
  }
  protoOf($invokeCOROUTINE$36).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.hd_1 = 1;
            suspendResult = this.lpj_1.mpk_1.q7e().m7s(this.opj_1, this.npj_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tpj_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.upj_1 = this.tpj_1;
            var tmp_1 = this;
            tmp_1.vpj_1 = this.upj_1;
            var tmp_2 = this;
            tmp_2.wpj_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.upj_1, 10));
            this.xpj_1 = this.vpj_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.xpj_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.ypj_1 = this.xpj_1.e();
            var tmp_3 = this;
            tmp_3.zpj_1 = this.ypj_1;
            var tmp_4 = this;
            tmp_4.apk_1 = this.lpj_1;
            var tmp_5 = this;
            var this_0 = this.mpj_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (element.pfu_1.equals(this.zpj_1)) {
                destination.i1(element);
              }
            }

            tmp_5.bpk_1 = this.lpj_1.opk(destination, this.qpj_1);
            var tmp_6 = this;
            tmp_6.cpk_1 = this.qpj_1;
            if (this.bpk_1.u() >= this.cpk_1) {
              this.dpk_1 = this.bpk_1;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_7 = this;
              tmp_7.epk_1 = until(0, this.cpk_1 - this.bpk_1.u() | 0);
              var tmp_8 = this;
              tmp_8.fpk_1 = this.epk_1;
              var tmp_9 = this;
              tmp_9.gpk_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.epk_1, 10));
              this.hpk_1 = this.fpk_1.w();
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            if (!this.hpk_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.ipk_1 = this.hpk_1.e();
            var tmp_10 = this;
            tmp_10.jpk_1 = this.ipk_1;
            var tmp_11 = this;
            tmp_11.kpk_1 = new PeerReviewerAllocation();
            var tmp_12 = this;
            tmp_12.lpk_1 = this.kpk_1;
            this.hd_1 = 4;
            var tmp_13 = get_doorPrimaryKeyManager(this.lpj_1.mpk_1);
            suspendResult = tmp_13.o62(140, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var ARGUMENT = suspendResult;
            this.lpk_1.nfu_1 = ARGUMENT;
            this.lpk_1.pfu_1 = this.zpj_1;
            this.lpk_1.qfu_1 = this.ppj_1;
            var ARGUMENT_0 = this.kpk_1;
            this.gpk_1.i1(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 5:
            var ARGUMENT_1 = this.gpk_1;
            this.dpk_1 = plus(this.bpk_1, ARGUMENT_1);
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var existingAllocationsForSubmitter = this.dpk_1;
            var ARGUMENT_2 = to(this.zpj_1, existingAllocationsForSubmitter);
            this.wpj_1.i1(ARGUMENT_2);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            var ARGUMENT_3 = this.wpj_1;
            var allocationsForEachSubmitter = toMap(ARGUMENT_3);
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = allocationsForEachSubmitter.q2().w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var list = element_0.t2();
              addAll(destination_0, list);
            }

            var allocationList = toMutableList(destination_0);
            if (this.spj_1) {
              var inductionVariable = 0;
              var last = allocationList.u() - 1 | 0;
              if (inductionVariable <= last)
                do {
                  var index = inductionVariable;
                  inductionVariable = inductionVariable + 1 | 0;
                  allocationList.f1(index, allocationList.v(index).okq(VOID, new Long(0, 0)));
                }
                 while (inductionVariable <= last);
            }

            if (this.rpj_1) {
              var this_1 = this.tpj_1;
              var destination_1 = ArrayList_init_$Create$();
              var tmp0_iterator_1 = this_1.w();
              while (tmp0_iterator_1.f()) {
                var element_1 = tmp0_iterator_1.e();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp_14;
                  if (isInterface(allocationList, Collection)) {
                    tmp_14 = allocationList.c1();
                  } else {
                    tmp_14 = false;
                  }
                  if (tmp_14) {
                    tmp$ret$0 = 0;
                    break l$ret$1;
                  }
                  var count = 0;
                  var tmp0_iterator_2 = allocationList.w();
                  while (tmp0_iterator_2.f()) {
                    var element_2 = tmp0_iterator_2.e();
                    if (element_2.ofu_1.equals(element_1)) {
                      count = count + 1 | 0;
                      checkCountOverflow(count);
                    }
                  }
                  tmp$ret$0 = count;
                }
                 while (false);
                var numToMarkAlreadyAssignedToSubmitter = tmp$ret$0;
                var this_2 = until(0, this.qpj_1 - numToMarkAlreadyAssignedToSubmitter | 0);
                var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_3 = this_2.w();
                while (tmp0_iterator_3.f()) {
                  var item = tmp0_iterator_3.e();
                  destination_2.i1(element_1);
                }
                var list_0 = destination_2;
                addAll(destination_1, list_0);
              }
              var fromBucket = toMutableList(shuffled(destination_1));
              var inductionVariable_0 = 0;
              var last_0 = allocationList.u() - 1 | 0;
              if (inductionVariable_0 <= last_0)
                do {
                  var index_0 = inductionVariable_0;
                  inductionVariable_0 = inductionVariable_0 + 1 | 0;
                  var allocation = allocationList.v(index_0);
                  if (allocation.ofu_1.equals(new Long(0, 0))) {
                    var destination_3 = ArrayList_init_$Create$();
                    var tmp0_iterator_4 = allocationList.w();
                    while (tmp0_iterator_4.f()) {
                      var element_3 = tmp0_iterator_4.e();
                      if (element_3.pfu_1.equals(allocation.pfu_1)) {
                        destination_3.i1(element_3);
                      }
                    }
                    var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_3, 10));
                    var tmp0_iterator_5 = destination_3.w();
                    while (tmp0_iterator_5.f()) {
                      var item_0 = tmp0_iterator_5.e();
                      destination_4.i1(item_0.ofu_1);
                    }
                    var destination_5 = ArrayList_init_$Create$();
                    var tmp0_iterator_6 = destination_4.w();
                    while (tmp0_iterator_6.f()) {
                      var element_4 = tmp0_iterator_6.e();
                      if (!element_4.equals(new Long(0, 0))) {
                        destination_5.i1(element_4);
                      }
                    }
                    var otherMarkersForThisSubmitter = destination_5;
                    var tmp$ret$2;
                    l$ret$3: do {
                      var tmp0_iterator_7 = fromBucket.w();
                      while (tmp0_iterator_7.f()) {
                        var element_5 = tmp0_iterator_7.e();
                        if (!element_5.equals(allocation.pfu_1) ? !otherMarkersForThisSubmitter.a1(element_5) : false) {
                          tmp$ret$2 = element_5;
                          break l$ret$3;
                        }
                      }
                      tmp$ret$2 = null;
                    }
                     while (false);
                    var tmp2_safe_receiver = tmp$ret$2;
                    var tmp_15;
                    if (tmp2_safe_receiver == null) {
                      tmp_15 = null;
                    } else {
                      fromBucket.j1(tmp2_safe_receiver);
                      tmp_15 = tmp2_safe_receiver;
                    }
                    var selectedMarkerUid = tmp_15;
                    allocationList.f1(index_0, shallowCopy_2(allocation, UpdatePeerReviewAllocationUseCase$invoke$lambda(selectedMarkerUid)));
                  }
                }
                 while (inductionVariable_0 <= last_0);
            }

            return allocationList;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UpdatePeerReviewAllocationUseCase(db, systemImpl) {
    this.mpk_1 = db;
    this.npk_1 = systemImpl;
  }
  protoOf(UpdatePeerReviewAllocationUseCase).opk = function (_this__u8e3s4, maxSize) {
    return _this__u8e3s4.u() <= maxSize ? _this__u8e3s4 : _this__u8e3s4.z(0, maxSize);
  };
  protoOf(UpdatePeerReviewAllocationUseCase).ppk = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) {
    var tmp = new $invokeCOROUTINE$36(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UpdatePeerReviewAllocationUseCase).qpk = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion, $super) {
    resetAllocations = resetAllocations === VOID ? false : resetAllocations;
    return $super === VOID ? this.ppk(existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) : $super.ppk.call(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
  };
  function AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation) {
    this.zpk_1 = $effectiveDb;
    this.apl_1 = $person;
    this.bpl_1 = $systemPermissions;
    this.cpl_1 = $createPersonParentApprovalIfMinor;
    this.dpl_1 = $addedByPersonUid;
    this.epl_1 = $relationship;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddNewPersonUseCase$invoke$slambda).iok = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.iok(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.zpk_1.n7d().insertAsync(this.apl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gpl_1 = suspendResult;
            this.hpl_1 = this.apl_1.f96_1.equals(new Long(0, 0)) ? this.gpl_1 : this.apl_1.f96_1;
            this.hd_1 = 2;
            suspendResult = this.zpk_1.p7f().yi0(new SystemPermission(VOID, this.hpl_1, VOID, this.bpl_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (isDateOfBirthAMinor(Companion_getInstance_6().fmh(this.apl_1.o96_1)) ? this.cpl_1 : false) {
              this.hd_1 = 3;
              var tmp_0 = this.zpk_1.x7e();
              var tmp1_ppjApprovalTiemstamp = systemTimeInMillis();
              suspendResult = tmp_0.ugs(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, this.dpl_1, this.hpl_1, this.epl_1, VOID, VOID, VOID, 1, tmp1_ppjApprovalTiemstamp), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return this.hpl_1;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new AddNewPersonUseCase$invoke$slambda(this.zpk_1, this.apl_1, this.bpl_1, this.cpl_1, this.dpl_1, this.epl_1, completion);
    i.fpl_1 = it;
    return i;
  };
  function AddNewPersonUseCase$invoke$slambda_0($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation) {
    var i = new AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation);
    var l = function (it, $completion) {
      return i.iok(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddNewPersonUseCase(db, repo) {
    this.ipl_1 = db;
    this.jpl_1 = repo;
  }
  protoOf(AddNewPersonUseCase).kpl = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion) {
    var tmp0_elvis_lhs = this.jpl_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.ipl_1 : tmp0_elvis_lhs;
    return withDoorTransactionAsync(effectiveDb, VOID, AddNewPersonUseCase$invoke$slambda_0(effectiveDb, person, systemPermissions, createPersonParentApprovalIfMinor, addedByPersonUid, relationship, null), $completion);
  };
  protoOf(AddNewPersonUseCase).lpl = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion, $super) {
    addedByPersonUid = addedByPersonUid === VOID ? new Long(0, 0) : addedByPersonUid;
    createPersonParentApprovalIfMinor = createPersonParentApprovalIfMinor === VOID ? true : createPersonParentApprovalIfMinor;
    var tmp;
    if (systemPermissions === VOID) {
      Companion_getInstance_7();
      tmp = new Long(0, 0);
    } else {
      tmp = systemPermissions;
    }
    systemPermissions = tmp;
    var tmp_0;
    if (relationship === VOID) {
      tmp_0 = 8;
    } else {
      tmp_0 = relationship;
    }
    relationship = tmp_0;
    return $super === VOID ? this.kpl(person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion) : $super.kpl.call(this, person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion);
  };
  function BulkAddPersonException(message, errors) {
    message = message === VOID ? null : message;
    IllegalArgumentException_init_$Init$_0(message, this);
    captureStack(this, BulkAddPersonException);
    this.mpl_1 = errors;
  }
  protoOf(BulkAddPersonException).toString = function () {
    var tmp0_elvis_lhs = this.message;
    return (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs) + ' ' + joinToString(this.mpl_1);
  };
  function $serializer_42() {
    $serializer_instance_42 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsDataError', this, 3);
    tmp0_serialDesc.t4f('lineNum', false);
    tmp0_serialDesc.t4f('colName', false);
    tmp0_serialDesc.t4f('invalidValue', false);
    this.npl_1 = tmp0_serialDesc;
  }
  protoOf($serializer_42).q44 = function () {
    return this.npl_1;
  };
  protoOf($serializer_42).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_42).s44 = function (decoder) {
    var tmp0_desc = this.npl_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return BulkAddPersonsDataError_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_42).opl = function (encoder, value) {
    var tmp0_desc = this.npl_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.r49(tmp0_desc, 0, value.ppl_1);
    tmp1_output.w49(tmp0_desc, 1, value.qpl_1);
    tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.rpl_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_42).r44 = function (encoder, value) {
    return this.opl(encoder, value instanceof BulkAddPersonsDataError ? value : THROW_CCE());
  };
  var $serializer_instance_42;
  function $serializer_getInstance_54() {
    if ($serializer_instance_42 == null)
      new $serializer_42();
    return $serializer_instance_42;
  }
  function BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_54().npl_1);
    }
    $this.ppl_1 = lineNum;
    $this.qpl_1 = colName;
    $this.rpl_1 = invalidValue;
    return $this;
  }
  function BulkAddPersonsDataError_init_$Create$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker) {
    return BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, objectCreate(protoOf(BulkAddPersonsDataError)));
  }
  function BulkAddPersonsDataError() {
  }
  protoOf(BulkAddPersonsDataError).toString = function () {
    return 'BulkAddPersonsDataError(lineNum=' + this.ppl_1 + ', colName=' + this.qpl_1 + ', invalidValue=' + this.rpl_1 + ')';
  };
  protoOf(BulkAddPersonsDataError).hashCode = function () {
    var result = this.ppl_1;
    result = imul(result, 31) + getStringHashCode(this.qpl_1) | 0;
    result = imul(result, 31) + (this.rpl_1 == null ? 0 : getStringHashCode(this.rpl_1)) | 0;
    return result;
  };
  protoOf(BulkAddPersonsDataError).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonsDataError))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonsDataError ? other : THROW_CCE();
    if (!(this.ppl_1 === tmp0_other_with_cast.ppl_1))
      return false;
    if (!(this.qpl_1 === tmp0_other_with_cast.qpl_1))
      return false;
    if (!(this.rpl_1 == tmp0_other_with_cast.rpl_1))
      return false;
    return true;
  };
  function BulkAddPersonsFromLocalUriUseCase() {
  }
  function Companion_51() {
  }
  var Companion_instance_100;
  function Companion_getInstance_68() {
    return Companion_instance_100;
  }
  function $serializer_43() {
    $serializer_instance_43 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsUseCase.BulkAddUsersResult', this, 1);
    tmp0_serialDesc.t4f('numImported', false);
    this.tpl_1 = tmp0_serialDesc;
  }
  protoOf($serializer_43).q44 = function () {
    return this.tpl_1;
  };
  protoOf($serializer_43).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance()];
  };
  protoOf($serializer_43).s44 = function (decoder) {
    var tmp0_desc = this.tpl_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return BulkAddUsersResult_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_43).upl = function (encoder, value) {
    var tmp0_desc = this.tpl_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.r49(tmp0_desc, 0, value.vpl_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_43).r44 = function (encoder, value) {
    return this.upl(encoder, value instanceof BulkAddUsersResult ? value : THROW_CCE());
  };
  var $serializer_instance_43;
  function $serializer_getInstance_55() {
    if ($serializer_instance_43 == null)
      new $serializer_43();
    return $serializer_instance_43;
  }
  function BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_55().tpl_1);
    }
    $this.vpl_1 = numImported;
    return $this;
  }
  function BulkAddUsersResult_init_$Create$(seen1, numImported, serializationConstructorMarker) {
    return BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, objectCreate(protoOf(BulkAddUsersResult)));
  }
  function BulkAddUsersResult(numImported) {
    this.vpl_1 = numImported;
  }
  protoOf(BulkAddUsersResult).toString = function () {
    return 'BulkAddUsersResult(numImported=' + this.vpl_1 + ')';
  };
  protoOf(BulkAddUsersResult).hashCode = function () {
    return this.vpl_1;
  };
  protoOf(BulkAddUsersResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddUsersResult))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddUsersResult ? other : THROW_CCE();
    if (!(this.vpl_1 === tmp0_other_with_cast.vpl_1))
      return false;
    return true;
  };
  function IPhoneNumberUtil() {
  }
  function formatInternationalOrNull(_this__u8e3s4, number) {
    var tmp;
    try {
      tmp = _this__u8e3s4.xpl(_this__u8e3s4.wpl(number, 'US'));
    } catch ($p) {
      var tmp_0;
      if ($p instanceof Error) {
        var e = $p;
        tmp_0 = null;
      } else {
        throw $p;
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function OnClickPhoneNumUseCase() {
  }
  function PhoneNumValidatorUseCase() {
  }
  function OnClickEmailUseCase() {
  }
  function ShareAppUseCase() {
  }
  function ShareTextUseCase() {
  }
  function GetShowPoweredByUseCase(showPoweredBy) {
    this.ypl_1 = showPoweredBy;
  }
  protoOf(GetShowPoweredByUseCase).xpe = function () {
    return this.ypl_1;
  };
  function Companion_52() {
    this.zpl_1 = 'en';
  }
  var Companion_instance_101;
  function Companion_getInstance_69() {
    return Companion_instance_101;
  }
  function $invokeCOROUTINE$37(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ipm_1 = _this__u8e3s4;
  }
  protoOf($invokeCOROUTINE$37).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.jpm_1 = plus(listOf_0(this.ipm_1.rpm_1.qpm_1), this.ipm_1.rpm_1.kpm_1);
            this.hd_1 = 1;
            suspendResult = this.ipm_1.spm_1.w7e().ihs(1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            var availableLocales = filterNotNull(ARGUMENT);
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.jpm_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (availableLocales.a1(element)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp0_elvis_lhs = tmp$ret$0;
            return tmp0_elvis_lhs == null ? 'en' : tmp0_elvis_lhs;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetLocaleForSiteTermsUseCase(supportedLangConfig, repo) {
    this.rpm_1 = supportedLangConfig;
    this.spm_1 = repo;
  }
  protoOf(GetLocaleForSiteTermsUseCase).tpm = function ($completion) {
    var tmp = new $invokeCOROUTINE$37(this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OnClickSendSmsUseCase() {
  }
  function Companion_53() {
    this.upm_1 = 'dismissed-social-warning-';
  }
  var Companion_instance_102;
  function Companion_getInstance_70() {
    return Companion_instance_102;
  }
  function DismissSocialWarningUseCase(settings) {
    this.vpm_1 = settings;
  }
  protoOf(DismissSocialWarningUseCase).wp1 = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    // Inline function 'com.russhwolf.settings.set' call
    this.vpm_1.zm7(key, true);
  };
  function Companion_54() {
    this.wpm_1 = 'dismissed-social-warning-';
    this.xpm_1 = 'https://beinternetawesome.withgoogle.com';
  }
  var Companion_instance_103;
  function Companion_getInstance_71() {
    return Companion_instance_103;
  }
  function ShowSocialWarningUseCase(settings) {
    this.ypm_1 = settings;
  }
  protoOf(ShowSocialWarningUseCase).up9 = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    return !this.ypm_1.am8(key, false);
  };
  function DeleteUrisUseCase() {
  }
  function IsTempFileCheckerUseCase() {
  }
  function ChunkIterator(chunkInfo) {
    this.zpm_1 = chunkInfo;
    this.apn_1 = 0;
  }
  protoOf(ChunkIterator).f = function () {
    return this.apn_1 < this.zpm_1.fpn_1;
  };
  protoOf(ChunkIterator).e = function () {
    // Inline function 'kotlin.also' call
    var this_0 = this.zpm_1.v(this.apn_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkIterator.next.<anonymous>' call
    this.apn_1 = this.apn_1 + 1 | 0;
    return this_0;
  };
  function Chunk(start, end, isLastChunk, size) {
    size = size === VOID ? end.mc(start).mb() : size;
    this.gpn_1 = start;
    this.hpn_1 = end;
    this.ipn_1 = isLastChunk;
    this.jpn_1 = size;
  }
  protoOf(Chunk).toString = function () {
    return 'Chunk(start=' + this.gpn_1.toString() + ', end=' + this.hpn_1.toString() + ', isLastChunk=' + this.ipn_1 + ', size=' + this.jpn_1 + ')';
  };
  protoOf(Chunk).hashCode = function () {
    var result = this.gpn_1.hashCode();
    result = imul(result, 31) + this.hpn_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ipn_1) | 0;
    result = imul(result, 31) + this.jpn_1 | 0;
    return result;
  };
  protoOf(Chunk).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Chunk))
      return false;
    var tmp0_other_with_cast = other instanceof Chunk ? other : THROW_CCE();
    if (!this.gpn_1.equals(tmp0_other_with_cast.gpn_1))
      return false;
    if (!this.hpn_1.equals(tmp0_other_with_cast.hpn_1))
      return false;
    if (!(this.ipn_1 === tmp0_other_with_cast.ipn_1))
      return false;
    if (!(this.jpn_1 === tmp0_other_with_cast.jpn_1))
      return false;
    return true;
  };
  function ChunkInfo(totalSize, chunkSize, fromByte) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    this.bpn_1 = totalSize;
    this.cpn_1 = chunkSize;
    this.dpn_1 = fromByte;
    this.epn_1 = this.bpn_1.mc(this.dpn_1);
    var tmp = this;
    // Inline function 'kotlin.comparisons.maxOf' call
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.Long.div' call
    var this_0 = this.epn_1;
    var other = this.cpn_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkInfo.numChunks.<anonymous>' call
    var it = this_0.bb(toLong(other));
    var tmp_0;
    // Inline function 'kotlin.mod' call
    var this_1 = this.epn_1;
    var other_0 = this.cpn_1;
    // Inline function 'kotlin.mod' call
    var other_1 = toLong(other_0);
    var r = this_1.nc(other_1);
    if (!(r.lc(other_1.uc(r.wc(other_1).uc(r.vc(r.b7())).sc(63))).mb() === 0)) {
      // Inline function 'kotlin.Long.plus' call
      tmp_0 = it.lc(toLong(1));
    } else {
      tmp_0 = it;
    }
    var a = tmp_0.mb();
    tmp.fpn_1 = Math.max(a, 1);
  }
  protoOf(ChunkInfo).w = function () {
    return new ChunkIterator(this);
  };
  protoOf(ChunkInfo).v = function (index) {
    var start = numberToLong(index).cb(toLong(this.cpn_1)).lc(this.dpn_1);
    // Inline function 'kotlin.math.min' call
    // Inline function 'kotlin.Long.plus' call
    var other = this.cpn_1;
    var a = start.lc(toLong(other));
    var b = this.bpn_1;
    var end = a.c7(b) <= 0 ? a : b;
    var isLastChunk = index === (this.fpn_1 - 1 | 0);
    return new Chunk(start, end, isLastChunk);
  };
  function UploadProgress(bytesTransferred, totalBytes) {
    this.kpn_1 = bytesTransferred;
    this.lpn_1 = totalBytes;
  }
  protoOf(UploadProgress).toString = function () {
    return 'UploadProgress(bytesTransferred=' + this.kpn_1.toString() + ', totalBytes=' + this.lpn_1.toString() + ')';
  };
  protoOf(UploadProgress).hashCode = function () {
    var result = this.kpn_1.hashCode();
    result = imul(result, 31) + this.lpn_1.hashCode() | 0;
    return result;
  };
  protoOf(UploadProgress).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UploadProgress))
      return false;
    var tmp0_other_with_cast = other instanceof UploadProgress ? other : THROW_CCE();
    if (!this.kpn_1.equals(tmp0_other_with_cast.kpn_1))
      return false;
    if (!this.lpn_1.equals(tmp0_other_with_cast.lpn_1))
      return false;
    return true;
  };
  function LastChunkResponse(body, statusCode, headers) {
    this.mpn_1 = body;
    this.npn_1 = statusCode;
    this.opn_1 = headers;
  }
  protoOf(LastChunkResponse).toString = function () {
    return 'LastChunkResponse(body=' + this.mpn_1 + ', statusCode=' + this.npn_1 + ', headers=' + this.opn_1 + ')';
  };
  protoOf(LastChunkResponse).hashCode = function () {
    var result = this.mpn_1 == null ? 0 : getStringHashCode(this.mpn_1);
    result = imul(result, 31) + this.npn_1 | 0;
    result = imul(result, 31) + hashCode(this.opn_1) | 0;
    return result;
  };
  protoOf(LastChunkResponse).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LastChunkResponse))
      return false;
    var tmp0_other_with_cast = other instanceof LastChunkResponse ? other : THROW_CCE();
    if (!(this.mpn_1 == tmp0_other_with_cast.mpn_1))
      return false;
    if (!(this.npn_1 === tmp0_other_with_cast.npn_1))
      return false;
    if (!equals(this.opn_1, tmp0_other_with_cast.opn_1))
      return false;
    return true;
  };
  function ChunkedUploadClientLocalUriUseCase$invoke$lambda(it) {
    return Unit_instance;
  }
  function ChunkedUploadClientLocalUriUseCase$invoke$lambda_0(it) {
    return Unit_instance;
  }
  function ChunkedUploadClientLocalUriUseCase() {
  }
  function Companion_55() {
    this.rpn_1 = 524288;
  }
  var Companion_instance_104;
  function Companion_getInstance_72() {
    return Companion_instance_104;
  }
  function get_HEADER_UPLOAD_UUID() {
    return HEADER_UPLOAD_UUID;
  }
  var HEADER_UPLOAD_UUID;
  function get_HEADER_IS_FINAL_CHUNK() {
    return HEADER_IS_FINAL_CHUNK;
  }
  var HEADER_IS_FINAL_CHUNK;
  function get_HEADER_UPLOAD_START_BYTE() {
    return HEADER_UPLOAD_START_BYTE;
  }
  var HEADER_UPLOAD_START_BYTE;
  function get_DEFAULT_CHUNK_SIZE() {
    return DEFAULT_CHUNK_SIZE;
  }
  var DEFAULT_CHUNK_SIZE;
  function GetUsernameSuggestionUseCase$invoke$lambda($usernameSuggestion) {
    return function () {
      return 'GetUsernameSuggestionUseCase:  ' + $usernameSuggestion;
    };
  }
  function GetUsernameSuggestionUseCase$invoke$lambda_0($e) {
    return function () {
      return 'GetUsernameSuggestionUseCase:-  exception ' + $e;
    };
  }
  function $invokeCOROUTINE$41(_this__u8e3s4, name, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.apo_1 = _this__u8e3s4;
    this.bpo_1 = name;
  }
  protoOf($invokeCOROUTINE$41).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.cpo_1 = this.apo_1.ipo_1;
            var tmp_1 = this;
            tmp_1.dpo_1 = this.cpo_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, removeSuffix(this.apo_1.jpo_1.wnt_1, '/') + '/api/username/getsuggestion');
            parameter(this_0, 'name', this.bpo_1);
            tmp_2.epo_1 = this_0;
            this.epo_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_3 = this;
            tmp_3.fpo_1 = this.dpo_1;
            var tmp_4 = this;
            tmp_4.gpo_1 = this.epo_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.gpo_1, this.fpo_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hpo_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.hpo_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var usernameSuggestion = suspendResult;
            var tmp_5 = Napier_getInstance();
            tmp_5.k5e(VOID, VOID, GetUsernameSuggestionUseCase$invoke$lambda(usernameSuggestion));
            return usernameSuggestion;
          case 3:
            this.id_1 = 4;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Error) {
              var e = this.kd_1;
              var tmp_7 = Napier_getInstance();
              tmp_7.k5e(VOID, VOID, GetUsernameSuggestionUseCase$invoke$lambda_0(e));
              throw e;
            } else {
              throw this.kd_1;
            }

          case 4:
            throw this.kd_1;
          case 5:
            this.id_1 = 4;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 4) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function GetUsernameSuggestionUseCase(httpClient, learningSpace) {
    this.ipo_1 = httpClient;
    this.jpo_1 = learningSpace;
  }
  protoOf(GetUsernameSuggestionUseCase).kpo = function (name, $completion) {
    var tmp = new $invokeCOROUTINE$41(this, name, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function StartUserSessionUseCase(accountManager) {
    this.lpo_1 = accountManager;
  }
  protoOf(StartUserSessionUseCase).mpo = function (session, nextDest, navController, goOptions, dontSetCurrentSession) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.lpo_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.domain.usersession.StartUserSessionUseCase.invoke.<anonymous>' call
    if (!dontSetCurrentSession) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver != null) {
      tmp0_safe_receiver.onx(session);
    }
    navigateToViewUri(navController, appendSelectedAccount(nextDest, session.onu_1.f96_1, session.pnu_1), goOptions);
  };
  protoOf(StartUserSessionUseCase).npo = function (session, nextDest, navController, goOptions, dontSetCurrentSession, $super) {
    var tmp;
    if (nextDest === VOID) {
      Companion_getInstance_140();
      tmp = 'CourseListHome';
    } else {
      tmp = nextDest;
    }
    nextDest = tmp;
    goOptions = goOptions === VOID ? new UstadGoOptions(VOID, VOID, true) : goOptions;
    dontSetCurrentSession = dontSetCurrentSession === VOID ? false : dontSetCurrentSession;
    var tmp_0;
    if ($super === VOID) {
      this.mpo(session, nextDest, navController, goOptions, dontSetCurrentSession);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.mpo.call(this, session, nextDest, navController, goOptions, dontSetCurrentSession);
    }
    return tmp_0;
  };
  function ValidateEmailUseCase() {
  }
  protoOf(ValidateEmailUseCase).up9 = function (email) {
    // Inline function 'kotlin.text.trim' call
    var trimmed = toString(trim(isCharSequence(email) ? email : THROW_CCE()));
    var atPos = indexOf(trimmed, _Char___init__impl__6a9atx(64));
    if (atPos === -1)
      return null;
    if (indexOf(trimmed, _Char___init__impl__6a9atx(46), atPos) === -1)
      return null;
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.text.any' call
      var inductionVariable = 0;
      while (inductionVariable < charSequenceLength(trimmed)) {
        var element = charSequenceGet(trimmed, inductionVariable);
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.domain.validateemail.ValidateEmailUseCase.invoke.<anonymous>' call
        if (((isWhitespace(element) ? true : element === _Char___init__impl__6a9atx(91)) ? true : element === _Char___init__impl__6a9atx(93)) ? true : element === _Char___init__impl__6a9atx(92)) {
          tmp$ret$2 = true;
          break $l$block;
        }
      }
      tmp$ret$2 = false;
    }
    if (tmp$ret$2)
      return null;
    return trimmed;
  };
  function Companion_56() {
    Companion_instance_105 = this;
    this.qpe_1 = 3;
    this.rpe_1 = 30;
    this.spe_1 = setOf([new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95))]);
  }
  protoOf(Companion_56).opo = function (character) {
    return isLetter(character) ? true : isDigit(character) ? true : this.spe_1.a1(new Char(character)) ? true : false;
  };
  var Companion_instance_105;
  function Companion_getInstance_73() {
    if (Companion_instance_105 == null)
      new Companion_56();
    return Companion_instance_105;
  }
  function ValidateUsernameUseCase_0() {
    Companion_getInstance_73();
  }
  protoOf(ValidateUsernameUseCase_0).up9 = function (username) {
    var tmp;
    if (username.length < 3) {
      tmp = Companion_getInstance_74().qpo_1;
    } else {
      if (username.length > 30) {
        tmp = Companion_getInstance_74().rpo_1;
      } else {
        var tmp0_safe_receiver = firstOrNull_0(username);
        var tmp_0;
        var tmp_1 = tmp0_safe_receiver;
        if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
          tmp_0 = null;
        } else {
          tmp_0 = isDigit(tmp0_safe_receiver);
        }
        if (tmp_0 === true) {
          tmp = Companion_getInstance_74().spo_1;
        } else {
          var tmp$ret$1;
          $l$block: {
            // Inline function 'kotlin.text.all' call
            var inductionVariable = 0;
            while (inductionVariable < charSequenceLength(username)) {
              var element = charSequenceGet(username, inductionVariable);
              inductionVariable = inductionVariable + 1 | 0;
              // Inline function 'com.ustadmobile.core.domain.validateusername.ValidateUsernameUseCase.invoke.<anonymous>' call
              if (!Companion_getInstance_73().opo(element)) {
                tmp$ret$1 = false;
                break $l$block;
              }
            }
            tmp$ret$1 = true;
          }
          if (!tmp$ret$1) {
            tmp = Companion_getInstance_74().tpo_1;
          } else {
            tmp = Companion_getInstance_74().ppo_1;
          }
        }
      }
    }
    return tmp;
  };
  function Companion_57() {
    Companion_instance_106 = this;
    this.ppo_1 = new ValidationResult();
    this.qpo_1 = new ValidationResult(strings_getInstance().wn7_1);
    this.rpo_1 = new ValidationResult(strings_getInstance().xn7_1);
    this.spo_1 = new ValidationResult(strings_getInstance().yn7_1);
    this.tpo_1 = new ValidationResult(strings_getInstance().zn7_1);
  }
  var Companion_instance_106;
  function Companion_getInstance_74() {
    if (Companion_instance_106 == null)
      new Companion_57();
    return Companion_instance_106;
  }
  function ValidationResult(errorMessage) {
    Companion_getInstance_74();
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.upo_1 = errorMessage;
  }
  protoOf(ValidationResult).toString = function () {
    return 'ValidationResult(errorMessage=' + this.upo_1 + ')';
  };
  protoOf(ValidationResult).hashCode = function () {
    return this.upo_1 == null ? 0 : this.upo_1.hashCode();
  };
  protoOf(ValidationResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ValidationResult))
      return false;
    var tmp0_other_with_cast = other instanceof ValidationResult ? other : THROW_CCE();
    if (!equals(this.upo_1, tmp0_other_with_cast.upo_1))
      return false;
    return true;
  };
  function isAnonymous(_this__u8e3s4) {
    return ((_this__u8e3s4.zj3_1 == null ? _this__u8e3s4.xj3_1 == null : false) ? _this__u8e3s4.aj4_1 == null : false) ? _this__u8e3s4.yj3_1 == null : false;
  }
  function _get_isIdOnly__t0wrie(_this__u8e3s4, $this) {
    var tmp;
    var tmp_0;
    if (_this__u8e3s4.wip_1 == null ? _this__u8e3s4.xip_1 == null : false) {
      var tmp_1 = _this__u8e3s4.yip_1;
      tmp_0 = tmp_1 === 0;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = _this__u8e3s4.zip_1 == null;
    } else {
      tmp = false;
    }
    return tmp;
  }
  function StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation) {
    this.dpp_1 = $activityEntities;
    this.epp_1 = $timeNow;
    this.fpp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(StoreActivitiesUseCase$invoke$slambda).mpq = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.mpq(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 18;
            var tmp_0 = this;
            var this_0 = this.dpp_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(item.npq_1.gl0(VOID, VOID, VOID, VOID, VOID, VOID, this.epp_1));
            }

            tmp_0.hpp_1 = destination;
            this.hd_1 = 1;
            suspendResult = this.fpp_1.tpq_1.h7e().pip(this.hpp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var this_1 = this.hpp_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element = tmp0_iterator_0.e();
              if (!_get_isIdOnly__t0wrie(element, this.fpp_1)) {
                destination_0.i1(element);
              }
            }

            tmp_1.ipp_1 = destination_0;
            this.jpp_1 = this.ipp_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.jpp_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.kpp_1 = this.jpp_1.e();
            var tmp_2 = this;
            tmp_2.lpp_1 = this.kpp_1;
            this.hd_1 = 3;
            suspendResult = this.fpp_1.tpq_1.h7e().qip(this.lpp_1.uip_1, this.lpp_1.xip_1, this.epp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            suspendResult = this.fpp_1.tpq_1.h7e().rip(this.lpp_1.uip_1, this.lpp_1.wip_1, this.lpp_1.xip_1, this.lpp_1.yip_1, this.lpp_1.zip_1, this.epp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 2;
            continue $sm;
          case 5:
            var tmp_3 = this;
            var this_2 = this.dpp_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element_0 = tmp0_iterator_1.e();
              var list = element_0.opq_1;
              addAll(destination_1, list);
            }

            tmp_3.mpp_1 = destination_1;
            var tmp_4 = this;
            var this_3 = this.dpp_1;
            var destination_2 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.w();
            while (tmp0_iterator_2.f()) {
              var element_1 = tmp0_iterator_2.e();
              var list_0 = element_1.ppq_1;
              addAll(destination_2, list_0);
            }

            tmp_4.npp_1 = destination_2;
            this.hd_1 = 6;
            var tmp_5 = this.fpp_1.spq_1.w7f();
            var this_4 = this.npp_1;
            var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_4, 10));
            var tmp0_iterator_3 = this_4.w();
            while (tmp0_iterator_3.f()) {
              var item_0 = tmp0_iterator_3.e();
              destination_3.i1(item_0.hiv_1);
            }

            suspendResult = tmp_5.eiv(toList(distinct(destination_3)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.opp_1 = suspendResult;
            this.ppp_1 = toSet(this.opp_1);
            this.hd_1 = 7;
            var tmp_6 = this.fpp_1.tpq_1.w7f();
            var this_5 = this.npp_1;
            var destination_4 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = this_5.w();
            while (tmp0_iterator_4.f()) {
              var element_2 = tmp0_iterator_4.e();
              if (!this.ppp_1.a1(element_2.hiv_1)) {
                destination_4.i1(element_2);
              }
            }

            suspendResult = tmp_6.div(destination_4, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            var tmp_7 = this;
            var this_6 = this.mpp_1;
            var first = ArrayList_init_$Create$();
            var second = ArrayList_init_$Create$();
            var tmp0_iterator_5 = this_6.w();
            while (tmp0_iterator_5.f()) {
              var element_3 = tmp0_iterator_5.e();
              if (element_3.nix_1.equals(new Long(0, 0))) {
                first.i1(element_3);
              } else {
                second.i1(element_3);
              }
            }

            tmp_7.qpp_1 = new Pair(first, second);
            this.rpp_1 = this.qpp_1.y6();
            this.spp_1 = this.qpp_1.z6();
            this.hd_1 = 8;
            suspendResult = this.fpp_1.tpq_1.v7f().cix(this.rpp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            var tmp_8 = this;
            tmp_8.tpp_1 = this.spp_1;
            this.upp_1 = this.tpp_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.upp_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.vpp_1 = this.upp_1.e();
            var tmp_9 = this;
            tmp_9.wpp_1 = this.vpp_1;
            this.xpp_1 = this.fpp_1.tpq_1.v7f();
            this.ypp_1 = this.wpp_1.iix_1;
            this.zpp_1 = this.wpp_1.nix_1;
            this.apq_1 = this.wpp_1.lix_1;
            this.bpq_1 = this.wpp_1.mix_1;
            this.cpq_1 = this.wpp_1.kix_1;
            this.dpq_1 = this.wpp_1.jix_1;
            this.hd_1 = 10;
            suspendResult = this.xpp_1.dix(this.ypp_1, this.dpq_1, this.apq_1, this.cpq_1, this.bpq_1, this.zpp_1, this.epp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            this.hd_1 = 9;
            continue $sm;
          case 11:
            var tmp_10 = this;
            tmp_10.epq_1 = this.mpp_1;
            this.fpq_1 = this.epq_1.w();
            this.hd_1 = 12;
            continue $sm;
          case 12:
            if (!this.fpq_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.gpq_1 = this.fpq_1.e();
            var tmp_11 = this;
            tmp_11.hpq_1 = this.gpq_1;
            this.hd_1 = 13;
            suspendResult = this.fpp_1.tpq_1.v7f().eix(this.hpq_1.iix_1, this.hpq_1.jix_1, this.hpq_1.mix_1, this.epp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            this.hd_1 = 12;
            continue $sm;
          case 14:
            this.hd_1 = 15;
            var tmp_12 = this.fpp_1.tpq_1.x7f();
            var this_7 = this.dpp_1;
            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_6 = this_7.w();
            while (tmp0_iterator_6.f()) {
              var element_4 = tmp0_iterator_6.e();
              var list_1 = element_4.qpq_1;
              addAll(destination_5, list_1);
            }

            suspendResult = tmp_12.zit(destination_5, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 15:
            var tmp_13 = this;
            var this_8 = this.dpp_1;
            var destination_6 = ArrayList_init_$Create$();
            var tmp0_iterator_7 = this_8.w();
            while (tmp0_iterator_7.f()) {
              var element_5 = tmp0_iterator_7.e();
              var tmp0_safe_receiver = element_5.rpq_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_6.i1(tmp0_safe_receiver);
              }
            }

            var tmp_14;
            if (!destination_6.c1()) {
              tmp_14 = destination_6;
            } else {
              tmp_14 = null;
            }

            tmp_13.ipq_1 = tmp_14;
            if (this.ipq_1 == null) {
              this.jpq_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              var tmp_15 = this;
              tmp_15.kpq_1 = this.ipq_1;
              var tmp_16 = this;
              tmp_16.lpq_1 = this.kpq_1;
              this.hd_1 = 16;
              suspendResult = this.fpp_1.tpq_1.y7f().hjd(this.lpq_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            this.jpq_1 = this.kpq_1;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            return this.jpq_1;
          case 18:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 18) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).yny = function (it, completion) {
    var i = new StoreActivitiesUseCase$invoke$slambda(this.dpp_1, this.epp_1, this.fpp_1, completion);
    i.gpp_1 = it;
    return i;
  };
  function StoreActivitiesUseCase$invoke$slambda_0($activityEntities, $timeNow, this$0, resultContinuation) {
    var i = new StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mpq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$42(_this__u8e3s4, activityEntities, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.cpr_1 = _this__u8e3s4;
    this.dpr_1 = activityEntities;
  }
  protoOf($invokeCOROUTINE$42).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.epr_1 = systemTimeInMillis();
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.cpr_1.tpq_1, VOID, StoreActivitiesUseCase$invoke$slambda_0(this.dpr_1, this.epr_1, this.cpr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function StoreActivitiesUseCase(db, repo) {
    this.spq_1 = db;
    var tmp = this;
    tmp.tpq_1 = repo == null ? this.spq_1 : repo;
  }
  protoOf(StoreActivitiesUseCase).fpr = function (activityEntities, $completion) {
    var tmp = new $invokeCOROUTINE$42(this, activityEntities, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function XapiException(responseCode, message, cause) {
    cause = cause === VOID ? null : cause;
    Exception_init_$Init$_1(message, cause, this);
    captureStack(this, XapiException);
    this.gpr_1 = responseCode;
  }
  function XapiJson$_init_$lambda_lhwgtd($this$Json) {
    $this$Json.d4q_1 = false;
    $this$Json.f4q_1 = true;
    return Unit_instance;
  }
  function XapiJson(json) {
    var tmp;
    if (json === VOID) {
      tmp = Json_0(VOID, XapiJson$_init_$lambda_lhwgtd);
    } else {
      tmp = json;
    }
    json = tmp;
    this.hpr_1 = json;
  }
  protoOf(XapiJson).toString = function () {
    return 'XapiJson(json=' + this.hpr_1 + ')';
  };
  protoOf(XapiJson).hashCode = function () {
    return hashCode(this.hpr_1);
  };
  protoOf(XapiJson).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiJson))
      return false;
    var tmp0_other_with_cast = other instanceof XapiJson ? other : THROW_CCE();
    if (!equals(this.hpr_1, tmp0_other_with_cast.hpr_1))
      return false;
    return true;
  };
  function xapiRequireValidUuidOrNullAsString(uuid, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid uuid' : errorMessage;
    try {
      if (!(uuid == null)) {
        uuidFrom(uuid);
      }
      return uuid;
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, errorMessage + ': ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidUuidOrNull(uuid, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid uuid' : errorMessage;
    try {
      var tmp;
      if (uuid == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.domain.xapi.xapiRequireValidUuidOrNull.<anonymous>' call
        tmp = uuidFrom(uuid);
      }
      return tmp;
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, errorMessage + ': ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidIRI(iri, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid iri' : errorMessage;
    if (iri == null)
      throw new XapiException(400, errorMessage + ': iri is null');
    xapiRequireValidIRIOrNull(iri);
    return iri;
  }
  function xapiRequireDurationOrNullAsLong(duration) {
    var tmp;
    if (duration == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.xapiRequireDurationOrNullAsLong.<anonymous>' call
      var tmp_0;
      try {
        tmp_0 = _Duration___get_inWholeMilliseconds__impl__msfiry(Companion_getInstance_8().jm(duration));
      } catch ($p) {
        var tmp_1;
        if ($p instanceof Error) {
          var e = $p;
          throw new XapiException(400, 'Invalid duration: ' + e.message, e);
        } else {
          throw $p;
        }
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function xapiRequireTimestampAsLong(timestampStr) {
    try {
      return Companion_getInstance_6().o2r(timestampStr).emh();
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, 'Invalid timestamp: ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidIRIOrNull(iri, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid IRI:' : errorMessage;
    if (!(iri == null)) {
      try {
        Companion_getInstance_3().o2r(iri);
      } catch ($p) {
        if ($p instanceof Error) {
          var e = $p;
          throw new XapiException(400, errorMessage + ': ' + e.message, e);
        } else {
          throw $p;
        }
      }
    }
    return iri;
  }
  function StatementStoreResult(statementUuids) {
    this.ipr_1 = statementUuids;
  }
  protoOf(StatementStoreResult).toString = function () {
    return 'StatementStoreResult(statementUuids=' + this.ipr_1 + ')';
  };
  protoOf(StatementStoreResult).hashCode = function () {
    return hashCode(this.ipr_1);
  };
  protoOf(StatementStoreResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementStoreResult))
      return false;
    var tmp0_other_with_cast = other instanceof StatementStoreResult ? other : THROW_CCE();
    if (!equals(this.ipr_1, tmp0_other_with_cast.ipr_1))
      return false;
    return true;
  };
  function storeStatements($this, statements, xapiSession, $completion) {
    var tmp = new $storeStatementsCOROUTINE$43($this, statements, xapiSession, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function XapiStatementResource$storeStatements$slambda($statementEntities, this$0, $xapiSession, resultContinuation) {
    this.fps_1 = $statementEntities;
    this.gps_1 = this$0;
    this.hps_1 = $xapiSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(XapiStatementResource$storeStatements$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(XapiStatementResource$storeStatements$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(XapiStatementResource$storeStatements$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 18;
            var tmp$ret$0;
            l$ret$1: do {
              var this_0 = this.fps_1;
              var tmp_0;
              if (isInterface(this_0, Collection)) {
                tmp_0 = this_0.c1();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = false;
                break l$ret$1;
              }
              var tmp0_iterator = this_0.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_safe_receiver = element.cpt_1;
                var tmp_1;
                if (tmp0_safe_receiver == null) {
                  tmp_1 = null;
                } else {
                  tmp_1 = tmp0_safe_receiver.yjf_1 ? tmp0_safe_receiver.gjf_1 === true : false;
                }
                if (tmp_1 === true) {
                  tmp$ret$0 = true;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = false;
            }
             while (false);
            if (tmp$ret$0) {
              this.jps_1 = this.gps_1.uok_1.z7f();
              this.kps_1 = this.hps_1.ijz_1;
              this.lps_1 = systemTimeInMillis();
              this.hd_1 = 1;
              suspendResult = this.jps_1.ajz(true, this.lps_1, this.kps_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            var tmp_2 = this.gps_1.uok_1.j7e();
            var this_1 = this.fps_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver_0 = element_0.cpt_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_0);
              }
            }

            suspendResult = tmp_2.mje(destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_3 = this.gps_1.uok_1.a7g();
            var this_2 = this.fps_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element_1 = tmp0_iterator_1.e();
              var tmp0_safe_receiver_1 = element_1.dpt_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_1);
              }
            }

            suspendResult = tmp_3.cjw(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_4 = this;
            var this_3 = this.fps_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.w();
            while (tmp0_iterator_2.f()) {
              var element_2 = tmp0_iterator_2.e();
              var tmp0_elvis_lhs = element_2.ept_1;
              var list = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
              addAll(destination_1, list);
            }

            tmp_4.mps_1 = destination_1;
            var tmp_5 = this;
            var this_4 = this.mps_1;
            var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_4, 10));
            var tmp0_iterator_3 = this_4.w();
            while (tmp0_iterator_3.f()) {
              var item = tmp0_iterator_3.e();
              destination_2.i1(item.hpt_1);
            }

            var destination_3 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = destination_2.w();
            while (tmp0_iterator_4.f()) {
              var element_3 = tmp0_iterator_4.e();
              var tmp_6 = element_3.ej4_1;
              if (tmp_6 === 1) {
                destination_3.i1(element_3);
              }
            }

            var tmp_7;
            if (!destination_3.c1()) {
              tmp_7 = destination_3;
            } else {
              tmp_7 = null;
            }

            tmp_5.nps_1 = tmp_7;
            if (this.nps_1 == null) {
              this.ops_1 = null;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.pps_1 = this.nps_1;
              var tmp_9 = this;
              tmp_9.qps_1 = this.pps_1;
              this.hd_1 = 5;
              suspendResult = insertOrUpdateActorsIfNameChanged(this.gps_1.uok_1.k7e(), this.qps_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 5:
            this.ops_1 = this.pps_1;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var tmp_10 = this;
            var this_5 = this.mps_1;
            var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_5, 10));
            var tmp0_iterator_5 = this_5.w();
            while (tmp0_iterator_5.f()) {
              var item_0 = tmp0_iterator_5.e();
              destination_4.i1(item_0.hpt_1);
            }

            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_6 = destination_4.w();
            while (tmp0_iterator_6.f()) {
              var element_4 = tmp0_iterator_6.e();
              var tmp_11 = element_4.ej4_1;
              if (tmp_11 === 2) {
                destination_5.i1(element_4);
              }
            }

            tmp_10.rps_1 = destination_5;
            this.hd_1 = 7;
            var tmp_12 = this.gps_1.pok_1.k7e();
            var this_6 = this.rps_1;
            var destination_6 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_6, 10));
            var tmp0_iterator_7 = this_6.w();
            while (tmp0_iterator_7.f()) {
              var item_1 = tmp0_iterator_7.e();
              destination_6.i1(item_1.uj3_1);
            }

            suspendResult = tmp_12.aj3(destination_6, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.sps_1 = suspendResult;
            var tmp_13 = this;
            var this_7 = this.mps_1;
            var destination_7 = ArrayList_init_$Create$();
            var tmp0_iterator_8 = this_7.w();
            while (tmp0_iterator_8.f()) {
              var element_5 = tmp0_iterator_8.e();
              var list_0 = element_5.ipt_1;
              addAll(destination_7, list_0);
            }

            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination_7, 10)), 16);
            var destination_8 = LinkedHashMap_init_$Create$_0(capacity);
            var tmp0_iterator_9 = destination_7.w();
            while (tmp0_iterator_9.f()) {
              var element_6 = tmp0_iterator_9.e();
              destination_8.s(element_6.uj3_1, element_6);
            }

            tmp_13.tps_1 = destination_8;
            var tmp_14 = this;
            tmp_14.ups_1 = this.rps_1;
            this.vps_1 = this.ups_1.w();
            this.hd_1 = 8;
            continue $sm;
          case 8:
            if (!this.vps_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.wps_1 = this.vps_1.e();
            var tmp_15 = this;
            tmp_15.xps_1 = this.wps_1;
            var tmp_16 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_10 = this.sps_1.w();
              while (tmp0_iterator_10.f()) {
                var element_7 = tmp0_iterator_10.e();
                if (element_7.wj4_1.equals(this.xps_1.uj3_1)) {
                  tmp$ret$2 = element_7;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = null;
            }
             while (false);
            tmp_16.yps_1 = tmp$ret$2;
            var tmp_17 = this;
            var tmp_18;
            if (!isAnonymous(this.xps_1)) {
              var tmp_19 = this.xps_1.cj4_1;
              var tmp0_safe_receiver_2 = this.yps_1;
              tmp_18 = !tmp_19.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.xj4_1);
            } else {
              tmp_18 = true;
            }

            tmp_17.zps_1 = tmp_18;
            var tmp_20 = this;
            var this_8 = this.mps_1;
            var destination_9 = ArrayList_init_$Create$();
            var tmp0_iterator_11 = this_8.w();
            while (tmp0_iterator_11.f()) {
              var element_8 = tmp0_iterator_11.e();
              var list_1 = element_8.jpt_1;
              addAll(destination_9, list_1);
            }

            var destination_10 = ArrayList_init_$Create$();
            var tmp0_iterator_12 = destination_9.w();
            while (tmp0_iterator_12.f()) {
              var element_9 = tmp0_iterator_12.e();
              if (element_9.rj8_1.equals(this.xps_1.uj3_1)) {
                destination_10.i1(element_9);
              }
            }

            tmp_20.apt_1 = destination_10;
            var tmp_21 = this;
            var this_9 = this.apt_1;
            var destination_11 = ArrayList_init_$Create$();
            var tmp0_iterator_13 = this_9.w();
            while (tmp0_iterator_13.f()) {
              var element_10 = tmp0_iterator_13.e();
              var tmp0_safe_receiver_3 = this.tps_1.q(element_10.sj8_1);
              if (tmp0_safe_receiver_3 == null)
                null;
              else {
                destination_11.i1(tmp0_safe_receiver_3);
              }
            }

            tmp_21.bpt_1 = destination_11;
            this.hd_1 = 9;
            suspendResult = insertOrUpdateActorsIfNameChanged(this.gps_1.uok_1.k7e(), this.bpt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            if (!this.zps_1 ? !(this.yps_1 == null) : false) {
              this.hd_1 = 12;
              var tmp_22 = this.gps_1.uok_1.u7f();
              var this_10 = this.apt_1;
              var destination_12 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_10, 10));
              var tmp0_iterator_14 = this_10.w();
              while (tmp0_iterator_14.f()) {
                var item_2 = tmp0_iterator_14.e();
                destination_12.i1(item_2.cl1(VOID, VOID, this.yps_1.yj4_1));
              }
              suspendResult = insertOrUpdateIfLastModChanged(tmp_22, destination_12, this.yps_1.yj4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              suspendResult = this.gps_1.uok_1.k7e().yj2(listOf_0(this.xps_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            suspendResult = this.gps_1.uok_1.u7f().nj8(this.apt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            this.hd_1 = 13;
            continue $sm;
          case 12:
            this.hd_1 = 13;
            continue $sm;
          case 13:
            this.hd_1 = 8;
            continue $sm;
          case 14:
            this.hd_1 = 15;
            var tmp_23 = this.gps_1.uok_1.g7e();
            var this_11 = this.fps_1;
            var destination_13 = ArrayList_init_$Create$();
            var tmp0_iterator_15 = this_11.w();
            while (tmp0_iterator_15.f()) {
              var element_11 = tmp0_iterator_15.e();
              var tmp0_safe_receiver_4 = element_11.fpt_1;
              var tmp0_safe_receiver_5 = tmp0_safe_receiver_4 == null ? null : tmp0_safe_receiver_4.kpt_1;
              if (tmp0_safe_receiver_5 == null)
                null;
              else {
                destination_13.i1(tmp0_safe_receiver_5);
              }
            }

            suspendResult = tmp_23.ejx(destination_13, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 15:
            this.hd_1 = 16;
            var tmp_24 = this.gps_1.uok_1.t7f();
            var this_12 = this.fps_1;
            var destination_14 = ArrayList_init_$Create$();
            var tmp0_iterator_16 = this_12.w();
            while (tmp0_iterator_16.f()) {
              var element_12 = tmp0_iterator_16.e();
              var tmp0_safe_receiver_6 = element_12.fpt_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_6 == null ? null : tmp0_safe_receiver_6.lpt_1;
              var list_2 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
              addAll(destination_14, list_2);
            }

            suspendResult = tmp_24.cjy(destination_14, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 16:
            this.hd_1 = 17;
            var this_13 = this.fps_1;
            var destination_15 = ArrayList_init_$Create$();
            var tmp0_iterator_17 = this_13.w();
            while (tmp0_iterator_17.f()) {
              var element_13 = tmp0_iterator_17.e();
              var tmp0_elvis_lhs_0 = element_13.gpt_1;
              var list_3 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
              addAll(destination_15, list_3);
            }

            suspendResult = this.gps_1.tok_1.fpr(destination_15, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 17:
            return Unit_instance;
          case 18:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 18) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(XapiStatementResource$storeStatements$slambda).yny = function (it, completion) {
    var i = new XapiStatementResource$storeStatements$slambda(this.fps_1, this.gps_1, this.hps_1, completion);
    i.ips_1 = it;
    return i;
  };
  function XapiStatementResource$storeStatements$slambda_0($statementEntities, this$0, $xapiSession, resultContinuation) {
    var i = new XapiStatementResource$storeStatements$slambda($statementEntities, this$0, $xapiSession, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $storeStatementsCOROUTINE$43(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.rpr_1 = _this__u8e3s4;
    this.spr_1 = statements;
    this.tpr_1 = xapiSession;
  }
  protoOf($storeStatementsCOROUTINE$43).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.upr_1 = identifierHash(agent(this.tpr_1, this.rpr_1.rok_1), this.rpr_1.qok_1);
            var tmp_0 = this;
            var it = knownActorUidToPersonUidsMap(this.tpr_1, this.rpr_1.vok_1);
            var tmp_1;
            if (!it.r(this.upr_1)) {
              tmp_1 = plus_3(it, to(this.upr_1, this.tpr_1.njz_1));
            } else {
              tmp_1 = it;
            }

            tmp_0.vpr_1 = tmp_1;
            var tmp_2 = this;
            var this_0 = this.spr_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var timeNowStr = System_instance.ymd().toString();
              var tmp1_elvis_lhs = element.spt_1;
              var tmp4_timestamp = tmp1_elvis_lhs == null ? timeNowStr : tmp1_elvis_lhs;
              var tmp0_elvis_lhs = xapiRequireValidUuidOrNullAsString(element.mpt_1);
              var tmp5_id = tmp0_elvis_lhs == null ? randomUuidAsString() : tmp0_elvis_lhs;
              var tmp2_name = this.tpr_1.pjz_1;
              var tmp3_homePage = this.rpr_1.rok_1.wnt_1;
              var tmp6_authority = new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(tmp3_homePage, tmp2_name));
              var exactStatement = element.ypt(tmp5_id, VOID, VOID, VOID, VOID, VOID, tmp4_timestamp, timeNowStr, tmp6_authority);
              var tmp7_stringHasher = this.rpr_1.qok_1;
              var tmp8_exactJson = this.rpr_1.vok_1.r45(Companion_getInstance_90().n4r(), exactStatement);
              var tmp9_primaryKeyManager = get_doorPrimaryKeyManager(this.rpr_1.pok_1);
              var tmp10_hasherFactory = this.rpr_1.sok_1;
              var tmp11_json = this.rpr_1.vok_1;
              var tmp12_learningSpace = this.rpr_1.rok_1;
              var list = toEntities_3(exactStatement, tmp7_stringHasher, tmp9_primaryKeyManager, tmp10_hasherFactory, tmp11_json, this.tpr_1, this.vpr_1, tmp8_exactJson, false, tmp12_learningSpace);
              addAll(destination, list);
            }

            tmp_2.wpr_1 = destination;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.rpr_1.uok_1, VOID, XapiStatementResource$storeStatements$slambda_0(this.wpr_1, this.rpr_1, this.tpr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_1 = this.wpr_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver = element_0.cpt_1;
              var tmp_3;
              if (tmp0_safe_receiver == null) {
                tmp_3 = null;
              } else {
                tmp_3 = Uuid_init_$Create$(tmp0_safe_receiver.wje_1, tmp0_safe_receiver.xje_1);
              }
              var tmp0_safe_receiver_0 = tmp_3;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_0);
              }
            }

            return new StatementStoreResult(destination_0);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $postCOROUTINE$45(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ipu_1 = _this__u8e3s4;
    this.jpu_1 = statements;
    this.kpu_1 = xapiSession;
  }
  protoOf($postCOROUTINE$45).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = storeStatements(this.ipu_1, this.jpu_1, this.kpu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            return ARGUMENT.ipr_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function XapiStatementResource(db, repo, xxHasher, learningSpace, xapiJson, hasherFactory, storeActivitiesUseCase) {
    this.pok_1 = db;
    this.qok_1 = xxHasher;
    this.rok_1 = learningSpace;
    this.sok_1 = hasherFactory;
    this.tok_1 = storeActivitiesUseCase;
    var tmp = this;
    tmp.uok_1 = repo == null ? this.pok_1 : repo;
    this.vok_1 = xapiJson.hpr_1;
  }
  protoOf(XapiStatementResource).wok = function (statements, xapiSession, $completion) {
    var tmp = new $postCOROUTINE$45(this, statements, xapiSession, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function XapiGroupAndPersonUidMap(group, actorUidToPersonUidMap) {
    this.jom_1 = group;
    this.kom_1 = actorUidToPersonUidMap;
  }
  protoOf(XapiGroupAndPersonUidMap).toString = function () {
    return 'XapiGroupAndPersonUidMap(group=' + this.jom_1 + ', actorUidToPersonUidMap=' + this.kom_1 + ')';
  };
  protoOf(XapiGroupAndPersonUidMap).hashCode = function () {
    var result = this.jom_1.hashCode();
    result = imul(result, 31) + hashCode(this.kom_1) | 0;
    return result;
  };
  protoOf(XapiGroupAndPersonUidMap).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiGroupAndPersonUidMap))
      return false;
    var tmp0_other_with_cast = other instanceof XapiGroupAndPersonUidMap ? other : THROW_CCE();
    if (!this.jom_1.equals(tmp0_other_with_cast.jom_1))
      return false;
    if (!equals(this.kom_1, tmp0_other_with_cast.kom_1))
      return false;
    return true;
  };
  function $invokeCOROUTINE$47(_this__u8e3s4, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tpu_1 = _this__u8e3s4;
    this.upu_1 = groupSetUid;
    this.vpu_1 = groupNum;
    this.wpu_1 = clazzUid;
    this.xpu_1 = assignmentUid;
    this.ypu_1 = accountPersonUid;
  }
  protoOf($invokeCOROUTINE$47).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.tpu_1.fom_1.s7d().vd3(this.upu_1, this.vpu_1, this.wpu_1, this.xpu_1, this.ypu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var groupMembers = suspendResult;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = groupMembers.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var tmp0_safe_receiver = element.cd6_1;
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toXapiAgent(tmp0_safe_receiver, this.tpu_1.gom_1);
              var tmp_0;
              if (tmp1_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = element.bd6_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.sd4_1;
                tmp_0 = new Pair(tmp1_safe_receiver, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
              }
              var tmp0_safe_receiver_1 = tmp_0;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_1);
              }
            }

            var membersAndPersonUids = destination;
            var tmp_1 = new XapiAccount(this.tpu_1.gom_1.wnt_1, 'cgs-' + this.upu_1.toString() + '-' + this.vpu_1);
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(membersAndPersonUids, 10));
            var tmp0_iterator_0 = membersAndPersonUids.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(item.w6_1);
            }

            var tmp_2 = new XapiGroup(VOID, VOID, VOID, VOID, VOID, tmp_1, destination_0);
            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(membersAndPersonUids, 10)), 16);
            var destination_1 = LinkedHashMap_init_$Create$_0(capacity);
            var tmp0_iterator_1 = membersAndPersonUids.w();
            while (tmp0_iterator_1.f()) {
              var element_0 = tmp0_iterator_1.e();
              var pair = to(identifierHash(element_0.w6_1, this.tpu_1.hom_1), element_0.x6_1);
              destination_1.s(pair.w6_1, pair.x6_1);
            }

            return new XapiGroupAndPersonUidMap(tmp_2, destination_1);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function CreateXapiGroupForCourseGroupUseCase(repo, learningSpace, stringHasher) {
    this.fom_1 = repo;
    this.gom_1 = learningSpace;
    this.hom_1 = stringHasher;
  }
  protoOf(CreateXapiGroupForCourseGroupUseCase).iom = function (groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$47(this, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function insertOrUpdateActorsIfNameChanged(_this__u8e3s4, actors, $completion) {
    var tmp = new $insertOrUpdateActorsIfNameChangedCOROUTINE$48(_this__u8e3s4, actors, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertOrUpdateActorsIfNameChangedCOROUTINE$48(_this__u8e3s4, actors, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.hpv_1 = _this__u8e3s4;
    this.ipv_1 = actors;
  }
  protoOf($insertOrUpdateActorsIfNameChangedCOROUTINE$48).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.hpv_1.xj2(this.ipv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jpv_1 = systemTimeInMillis();
            var tmp_0 = this;
            tmp_0.kpv_1 = this.ipv_1;
            this.lpv_1 = this.kpv_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.lpv_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.mpv_1 = this.lpv_1.e();
            var tmp_1 = this;
            tmp_1.npv_1 = this.mpv_1;
            this.hd_1 = 3;
            suspendResult = this.hpv_1.zj2(this.npv_1.uj3_1, this.npv_1.wj3_1, this.jpv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 2;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function insertOrUpdateIfLastModChanged(_this__u8e3s4, memberJoins, lastModTime, $completion) {
    var tmp = new $insertOrUpdateIfLastModChangedCOROUTINE$49(_this__u8e3s4, memberJoins, lastModTime, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertOrUpdateIfLastModChangedCOROUTINE$49(_this__u8e3s4, memberJoins, lastModTime, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wpv_1 = _this__u8e3s4;
    this.xpv_1 = memberJoins;
    this.ypv_1 = lastModTime;
  }
  protoOf($insertOrUpdateIfLastModChangedCOROUTINE$49).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.wpv_1.mj8(this.xpv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.zpv_1 = this.xpv_1;
            this.apw_1 = this.zpv_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.apw_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.bpw_1 = this.apw_1.e();
            var tmp_1 = this;
            tmp_1.cpw_1 = this.bpw_1;
            this.hd_1 = 3;
            suspendResult = this.wpv_1.oj8(this.cpw_1.rj8_1, this.cpw_1.sj8_1, this.ypv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 2;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function agent(_this__u8e3s4, learningSpace) {
    var tmp0_account = new XapiAccount(learningSpace.wnt_1, _this__u8e3s4.pjz_1);
    var tmp1_objectType = XapiObjectType_Agent_getInstance();
    return new XapiAgent(VOID, VOID, VOID, VOID, tmp1_objectType, tmp0_account);
  }
  function knownActorUidToPersonUidsMap(_this__u8e3s4, json) {
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    var this_0 = _this__u8e3s4.ak0_1;
    if (charSequenceLength(this_0) > 0) {
      tmp = json.s45(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), _this__u8e3s4.ak0_1);
    } else {
      tmp = emptyMap();
    }
    return tmp;
  }
  function authorizationHeader(_this__u8e3s4) {
    return 'Basic ' + encodeBase64(_this__u8e3s4.ijz_1.toString() + ':' + _this__u8e3s4.yjz_1);
  }
  function get_registrationUuid(_this__u8e3s4) {
    return Uuid_init_$Create$(_this__u8e3s4.kjz_1, _this__u8e3s4.ljz_1);
  }
  function get_resultProgressExtension(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.qpt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ipw_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.ext.<get-resultProgressExtension>.<anonymous>' call
      var tmp$ret$1;
      $l$block: {
        // Inline function 'kotlin.collections.firstNotNullOfOrNull' call
        var tmp0_iterator = get_XAPI_PROGRESSED_EXTENSIONS().w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.domain.xapi.ext.<get-resultProgressExtension>.<anonymous>.<anonymous>' call
          var tmp0_safe_receiver_0 = tmp1_safe_receiver.q(element);
          var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : get_jsonPrimitive(tmp0_safe_receiver_0);
          var result = tmp1_safe_receiver_0 == null ? null : get_intOrNull(tmp1_safe_receiver_0);
          if (!(result == null)) {
            tmp$ret$1 = result;
            break $l$block;
          }
        }
        tmp$ret$1 = null;
      }
      tmp = tmp$ret$1;
    }
    return tmp;
  }
  function FormattedStatementResponse(string, stringResource) {
    stringResource = stringResource === VOID ? null : stringResource;
    this.jpw_1 = string;
    this.kpw_1 = stringResource;
  }
  protoOf(FormattedStatementResponse).lpw = function () {
    return !(this.jpw_1 == null) ? true : !(this.kpw_1 == null);
  };
  protoOf(FormattedStatementResponse).toString = function () {
    return 'FormattedStatementResponse(string=' + this.jpw_1 + ', stringResource=' + this.kpw_1 + ')';
  };
  protoOf(FormattedStatementResponse).hashCode = function () {
    var result = this.jpw_1 == null ? 0 : getStringHashCode(this.jpw_1);
    result = imul(result, 31) + (this.kpw_1 == null ? 0 : this.kpw_1.hashCode()) | 0;
    return result;
  };
  protoOf(FormattedStatementResponse).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof FormattedStatementResponse))
      return false;
    var tmp0_other_with_cast = other instanceof FormattedStatementResponse ? other : THROW_CCE();
    if (!(this.jpw_1 == tmp0_other_with_cast.jpw_1))
      return false;
    if (!equals(this.kpw_1, tmp0_other_with_cast.kpw_1))
      return false;
    return true;
  };
  function Companion_58() {
    Companion_instance_107 = this;
    var tmp = this;
    tmp.mpw_1 = listOf([2, 7, 8, 5, 6]);
  }
  var Companion_instance_107;
  function Companion_getInstance_75() {
    if (Companion_instance_107 == null)
      new Companion_58();
    return Companion_instance_107;
  }
  function FormatStatementResponseUseCase$invoke$slambda($activityEntity, $statement, this$0, resultContinuation) {
    this.vpw_1 = $activityEntity;
    this.wpw_1 = $statement;
    this.xpw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(FormatStatementResponseUseCase$invoke$slambda).jpx = function ($this$flow, $completion) {
    var tmp = this.kpx($this$flow, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(FormatStatementResponseUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.jpx((!(p1 == null) ? isInterface(p1, FlowCollector) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(FormatStatementResponseUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            var tmp0_safe_receiver = this.vpw_1;
            tmp_0.zpw_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yip_1;
            this.apx_1 = this.wpw_1.njf_1;
            var tmp_1;
            if (this.apx_1 == null ? true : this.zpw_1 == null) {
              tmp_1 = true;
            } else {
              tmp_1 = this.zpw_1 === 0;
            }

            if (tmp_1) {
              this.hd_1 = 10;
              var tmp1_safe_receiver = this.apx_1;
              var tmp_2;
              if (tmp1_safe_receiver == null) {
                tmp_2 = null;
              } else {
                tmp_2 = toString(trim(isCharSequence(tmp1_safe_receiver) ? tmp1_safe_receiver : THROW_CCE()));
              }
              suspendResult = this.ypw_1.t1d(new FormattedStatementResponse(tmp_2), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            this.bpx_1 = this.zpw_1;
            if (Companion_getInstance_75().mpw_1.a1(this.bpx_1)) {
              var tmp_3 = this;
              tmp_3.cpx_1 = listOfNotNull([this.xpw_1.lpx_1, this.xpw_1.mpx_1]);
              this.dpx_1 = this.cpx_1.w();
              this.hd_1 = 5;
              continue $sm;
            } else {
              if (this.bpx_1 === 1) {
                this.epx_1 = toBooleanStrictOrNull(this.apx_1);
                this.hd_1 = 4;
                var tmp_4;
                if (this.epx_1 === true) {
                  tmp_4 = strings_getInstance().wnq_1;
                } else if (this.epx_1 === false) {
                  tmp_4 = strings_getInstance().xnq_1;
                } else {
                  tmp_4 = null;
                }
                suspendResult = this.ypw_1.t1d(new FormattedStatementResponse(null, tmp_4), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_5;
                if (this.bpx_1 === 3) {
                  tmp_5 = true;
                } else {
                  tmp_5 = this.bpx_1 === 4;
                }
                if (tmp_5) {
                  this.hd_1 = 3;
                  var this_0 = htmlToPlainText(replace(this.apx_1, '[,]', ', '));
                  suspendResult = this.ypw_1.t1d(new FormattedStatementResponse(toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()))), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.hd_1 = 2;
                  var this_1 = htmlToPlainText(this.apx_1);
                  suspendResult = this.ypw_1.t1d(new FormattedStatementResponse(toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()))), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 2:
            this.hd_1 = 9;
            continue $sm;
          case 3:
            this.hd_1 = 9;
            continue $sm;
          case 4:
            this.hd_1 = 9;
            continue $sm;
          case 5:
            if (!this.dpx_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.fpx_1 = this.dpx_1.e();
            var tmp_6 = this;
            tmp_6.gpx_1 = this.fpx_1;
            this.hd_1 = 6;
            suspendResult = this.gpx_1.v7f().fix(this.wpw_1.bjf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hpx_1 = suspendResult;
            var tmp_7 = this;
            var tmp0_subject = this.zpw_1;
            var tmp_8;
            var tmp_9;
            var tmp_10;
            if (tmp0_subject === 2) {
              tmp_10 = true;
            } else {
              tmp_10 = tmp0_subject === 7;
            }

            if (tmp_10) {
              tmp_9 = true;
            } else {
              tmp_9 = tmp0_subject === 8;
            }

            if (tmp_9) {
              var tmp_11;
              if (this.zpw_1 === 8) {
                tmp_11 = 'scale';
              } else {
                tmp_11 = 'choices';
              }
              var propPrefix = tmp_11;
              var responseIds = split(this.apx_1, ['[,]']);
              var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(responseIds, 10));
              var tmp0_iterator = responseIds.w();
              while (tmp0_iterator.f()) {
                var item = tmp0_iterator.e();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp0_iterator_0 = this.hpx_1.w();
                  while (tmp0_iterator_0.f()) {
                    var element = tmp0_iterator_0.e();
                    if (element.lix_1 === propPrefix + '-' + item) {
                      tmp$ret$0 = element;
                      break l$ret$1;
                    }
                  }
                  tmp$ret$0 = null;
                }
                 while (false);
                var tmp0_safe_receiver_0 = tmp$ret$0;
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.mix_1;
                destination.i1(tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs);
              }
              tmp_8 = joinToString(destination, ', ');
            } else {
              if (tmp0_subject === 5) {
                var this_2 = split(this.apx_1, ['[,]']);
                var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_1 = this_2.w();
                while (tmp0_iterator_1.f()) {
                  var item_0 = tmp0_iterator_1.e();
                  var pairStrList = split(item_0, ['[.]'], VOID, 2);
                  var sourceId = first_0(pairStrList);
                  var targetId = getOrNull(pairStrList, 1);
                  var tmp$ret$2;
                  l$ret$3: do {
                    var tmp0_iterator_2 = this.hpx_1.w();
                    while (tmp0_iterator_2.f()) {
                      var element_0 = tmp0_iterator_2.e();
                      if (element_0.lix_1 === 'source-' + sourceId) {
                        tmp$ret$2 = element_0;
                        break l$ret$3;
                      }
                    }
                    tmp$ret$2 = null;
                  }
                   while (false);
                  var tmp0_safe_receiver_1 = tmp$ret$2;
                  var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.mix_1;
                  var sourceText = tmp1_elvis_lhs_0 == null ? sourceId : tmp1_elvis_lhs_0;
                  var tmp$ret$4;
                  l$ret$5: do {
                    var tmp0_iterator_3 = this.hpx_1.w();
                    while (tmp0_iterator_3.f()) {
                      var element_1 = tmp0_iterator_3.e();
                      if (element_1.lix_1 === 'target-' + targetId) {
                        tmp$ret$4 = element_1;
                        break l$ret$5;
                      }
                    }
                    tmp$ret$4 = null;
                  }
                   while (false);
                  var tmp2_safe_receiver = tmp$ret$4;
                  var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.mix_1;
                  var targetText = tmp3_elvis_lhs == null ? targetId : tmp3_elvis_lhs;
                  destination_0.i1(sourceText + ' - ' + targetText);
                }
                tmp_8 = joinToString(destination_0, ', ');
              } else {
                if (tmp0_subject === 6) {
                  var this_3 = split(this.apx_1, ['[,]']);
                  var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
                  var tmp0_iterator_4 = this_3.w();
                  while (tmp0_iterator_4.f()) {
                    var item_1 = tmp0_iterator_4.e();
                    var stepStrList = split(item_1, ['[.]'], VOID, 2);
                    var stepId = first_0(stepStrList);
                    var stepResponse = getOrNull(stepStrList, 1);
                    var tmp$ret$6;
                    l$ret$7: do {
                      var tmp0_iterator_5 = this.hpx_1.w();
                      while (tmp0_iterator_5.f()) {
                        var element_2 = tmp0_iterator_5.e();
                        if (element_2.lix_1 === 'steps-' + stepId) {
                          tmp$ret$6 = element_2;
                          break l$ret$7;
                        }
                      }
                      tmp$ret$6 = null;
                    }
                     while (false);
                    var tmp0_safe_receiver_2 = tmp$ret$6;
                    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.mix_1;
                    var stepText = tmp1_elvis_lhs_1 == null ? stepId : tmp1_elvis_lhs_1;
                    destination_1.i1(stepText + ': ' + (stepResponse == null ? '' : stepResponse));
                  }
                  tmp_8 = joinToString(destination_1, ', ');
                } else {
                  tmp_8 = null;
                }
              }
            }

            tmp_7.ipx_1 = tmp_8;
            this.hd_1 = 7;
            var tmp1_elvis_lhs_2 = this.ipx_1;
            var this_4 = htmlToPlainText(tmp1_elvis_lhs_2 == null ? this.apx_1 : tmp1_elvis_lhs_2);
            suspendResult = this.ypw_1.t1d(new FormattedStatementResponse(toString(trim(isCharSequence(this_4) ? this_4 : THROW_CCE()))), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.hd_1 = 5;
            continue $sm;
          case 8:
            this.hd_1 = 9;
            continue $sm;
          case 9:
            return Unit_instance;
          case 10:
            return Unit_instance;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(FormatStatementResponseUseCase$invoke$slambda).kpx = function ($this$flow, completion) {
    var i = new FormatStatementResponseUseCase$invoke$slambda(this.vpw_1, this.wpw_1, this.xpw_1, completion);
    i.ypw_1 = $this$flow;
    return i;
  };
  function FormatStatementResponseUseCase$invoke$slambda_0($activityEntity, $statement, this$0, resultContinuation) {
    var i = new FormatStatementResponseUseCase$invoke$slambda($activityEntity, $statement, this$0, resultContinuation);
    var l = function ($this$flow, $completion) {
      return i.jpx($this$flow, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function FormatStatementResponseUseCase(db, repo) {
    Companion_getInstance_75();
    this.lpx_1 = db;
    this.mpx_1 = repo;
  }
  protoOf(FormatStatementResponseUseCase).npx = function (statement, activityEntity) {
    return flow(FormatStatementResponseUseCase$invoke$slambda_0(activityEntity, statement, this, null));
  };
  function Companion_59() {
    Companion_instance_108 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.opx_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, null, null];
  }
  var Companion_instance_108;
  function Companion_getInstance_76() {
    if (Companion_instance_108 == null)
      new Companion_59();
    return Companion_instance_108;
  }
  function $serializer_44() {
    $serializer_instance_44 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.Attachment', this, 6);
    tmp0_serialDesc.t4f('usageType', true);
    tmp0_serialDesc.t4f('display', true);
    tmp0_serialDesc.t4f('description', true);
    tmp0_serialDesc.t4f('contentType', true);
    tmp0_serialDesc.t4f('length', true);
    tmp0_serialDesc.t4f('sha2', true);
    this.ppx_1 = tmp0_serialDesc;
  }
  protoOf($serializer_44).q44 = function () {
    return this.ppx_1;
  };
  protoOf($serializer_44).k4g = function () {
    var tmp0_cached = Companion_getInstance_76().opx_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable(StringSerializer_getInstance()), LongSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_44).s44 = function (decoder) {
    var tmp0_desc = this.ppx_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = new Long(0, 0);
    var tmp9_local5 = null;
    var tmp10_input = decoder.i48(tmp0_desc);
    var tmp11_cached = Companion_getInstance_76().opx_1;
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.o48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.o48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return Attachment_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_44).qpx = function (encoder, value) {
    var tmp0_desc = this.ppx_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_76().opx_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.rpx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.rpx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.spx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.spx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.tpx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, tmp2_cached[2], value.tpx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.upx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.upx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !value.vpx_1.equals(new Long(0, 0))) {
      tmp1_output.s49(tmp0_desc, 4, value.vpx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.wpx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.wpx_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_44).r44 = function (encoder, value) {
    return this.qpx(encoder, value instanceof Attachment ? value : THROW_CCE());
  };
  var $serializer_instance_44;
  function $serializer_getInstance_56() {
    if ($serializer_instance_44 == null)
      new $serializer_44();
    return $serializer_instance_44;
  }
  function Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_56().ppx_1);
    }
    if (0 === (seen1 & 1))
      $this.rpx_1 = null;
    else
      $this.rpx_1 = usageType;
    if (0 === (seen1 & 2))
      $this.spx_1 = null;
    else
      $this.spx_1 = display;
    if (0 === (seen1 & 4))
      $this.tpx_1 = null;
    else
      $this.tpx_1 = description;
    if (0 === (seen1 & 8))
      $this.upx_1 = null;
    else
      $this.upx_1 = contentType;
    if (0 === (seen1 & 16))
      $this.vpx_1 = new Long(0, 0);
    else
      $this.vpx_1 = length;
    if (0 === (seen1 & 32))
      $this.wpx_1 = null;
    else
      $this.wpx_1 = sha2;
    return $this;
  }
  function Attachment_init_$Create$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker) {
    return Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, objectCreate(protoOf(Attachment)));
  }
  function Attachment(usageType, display, description, contentType, length, sha2) {
    Companion_getInstance_76();
    usageType = usageType === VOID ? null : usageType;
    display = display === VOID ? null : display;
    description = description === VOID ? null : description;
    contentType = contentType === VOID ? null : contentType;
    length = length === VOID ? new Long(0, 0) : length;
    sha2 = sha2 === VOID ? null : sha2;
    this.rpx_1 = usageType;
    this.spx_1 = display;
    this.tpx_1 = description;
    this.upx_1 = contentType;
    this.vpx_1 = length;
    this.wpx_1 = sha2;
  }
  protoOf(Attachment).toString = function () {
    return 'Attachment(usageType=' + this.rpx_1 + ', display=' + this.spx_1 + ', description=' + this.tpx_1 + ', contentType=' + this.upx_1 + ', length=' + this.vpx_1.toString() + ', sha2=' + this.wpx_1 + ')';
  };
  protoOf(Attachment).hashCode = function () {
    var result = this.rpx_1 == null ? 0 : getStringHashCode(this.rpx_1);
    result = imul(result, 31) + (this.spx_1 == null ? 0 : hashCode(this.spx_1)) | 0;
    result = imul(result, 31) + (this.tpx_1 == null ? 0 : hashCode(this.tpx_1)) | 0;
    result = imul(result, 31) + (this.upx_1 == null ? 0 : getStringHashCode(this.upx_1)) | 0;
    result = imul(result, 31) + this.vpx_1.hashCode() | 0;
    result = imul(result, 31) + (this.wpx_1 == null ? 0 : getStringHashCode(this.wpx_1)) | 0;
    return result;
  };
  protoOf(Attachment).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Attachment))
      return false;
    var tmp0_other_with_cast = other instanceof Attachment ? other : THROW_CCE();
    if (!(this.rpx_1 == tmp0_other_with_cast.rpx_1))
      return false;
    if (!equals(this.spx_1, tmp0_other_with_cast.spx_1))
      return false;
    if (!equals(this.tpx_1, tmp0_other_with_cast.tpx_1))
      return false;
    if (!(this.upx_1 == tmp0_other_with_cast.upx_1))
      return false;
    if (!this.vpx_1.equals(tmp0_other_with_cast.vpx_1))
      return false;
    if (!(this.wpx_1 == tmp0_other_with_cast.wpx_1))
      return false;
    return true;
  };
  function Companion_60() {
  }
  var Companion_instance_109;
  function Companion_getInstance_77() {
    return Companion_instance_109;
  }
  function $serializer_45() {
    $serializer_instance_45 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAccount', this, 2);
    tmp0_serialDesc.t4f('homePage', false);
    tmp0_serialDesc.t4f('name', false);
    this.xpx_1 = tmp0_serialDesc;
  }
  protoOf($serializer_45).q44 = function () {
    return this.xpx_1;
  };
  protoOf($serializer_45).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_45).s44 = function (decoder) {
    var tmp0_desc = this.xpx_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return XapiAccount_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_45).ypx = function (encoder, value) {
    var tmp0_desc = this.xpx_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.zpx_1);
    tmp1_output.w49(tmp0_desc, 1, value.apy_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_45).r44 = function (encoder, value) {
    return this.ypx(encoder, value instanceof XapiAccount ? value : THROW_CCE());
  };
  var $serializer_instance_45;
  function $serializer_getInstance_57() {
    if ($serializer_instance_45 == null)
      new $serializer_45();
    return $serializer_instance_45;
  }
  function XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_57().xpx_1);
    }
    $this.zpx_1 = homePage;
    $this.apy_1 = name;
    return $this;
  }
  function XapiAccount_init_$Create$(seen1, homePage, name, serializationConstructorMarker) {
    return XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, objectCreate(protoOf(XapiAccount)));
  }
  function XapiAccount(homePage, name) {
    this.zpx_1 = homePage;
    this.apy_1 = name;
  }
  protoOf(XapiAccount).toString = function () {
    return 'XapiAccount(homePage=' + this.zpx_1 + ', name=' + this.apy_1 + ')';
  };
  protoOf(XapiAccount).hashCode = function () {
    var result = getStringHashCode(this.zpx_1);
    result = imul(result, 31) + getStringHashCode(this.apy_1) | 0;
    return result;
  };
  protoOf(XapiAccount).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiAccount))
      return false;
    var tmp0_other_with_cast = other instanceof XapiAccount ? other : THROW_CCE();
    if (!(this.zpx_1 === tmp0_other_with_cast.zpx_1))
      return false;
    if (!(this.apy_1 === tmp0_other_with_cast.apy_1))
      return false;
    return true;
  };
  function Companion_61() {
    Companion_instance_110 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.bpy_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  var Companion_instance_110;
  function Companion_getInstance_78() {
    if (Companion_instance_110 == null)
      new Companion_61();
    return Companion_instance_110;
  }
  function $serializer_46() {
    $serializer_instance_46 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivity.Interaction', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('description', true);
    this.cpy_1 = tmp0_serialDesc;
  }
  protoOf($serializer_46).q44 = function () {
    return this.cpy_1;
  };
  protoOf($serializer_46).k4g = function () {
    var tmp0_cached = Companion_getInstance_78().bpy_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1])];
  };
  protoOf($serializer_46).s44 = function (decoder) {
    var tmp0_desc = this.cpy_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_78().bpy_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return Interaction_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_46).dpy = function (encoder, value) {
    var tmp0_desc = this.cpy_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_78().bpy_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.epy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.epy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.fpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.fpy_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_46).r44 = function (encoder, value) {
    return this.dpy(encoder, value instanceof Interaction ? value : THROW_CCE());
  };
  var $serializer_instance_46;
  function $serializer_getInstance_58() {
    if ($serializer_instance_46 == null)
      new $serializer_46();
    return $serializer_instance_46;
  }
  function Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_58().cpy_1);
    }
    if (0 === (seen1 & 1))
      $this.epy_1 = null;
    else
      $this.epy_1 = id;
    if (0 === (seen1 & 2))
      $this.fpy_1 = null;
    else
      $this.fpy_1 = description;
    return $this;
  }
  function Interaction_init_$Create$(seen1, id, description, serializationConstructorMarker) {
    return Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, objectCreate(protoOf(Interaction)));
  }
  function Interaction(id, description) {
    Companion_getInstance_78();
    id = id === VOID ? null : id;
    description = description === VOID ? null : description;
    this.epy_1 = id;
    this.fpy_1 = description;
  }
  protoOf(Interaction).toString = function () {
    return 'Interaction(id=' + this.epy_1 + ', description=' + this.fpy_1 + ')';
  };
  protoOf(Interaction).hashCode = function () {
    var result = this.epy_1 == null ? 0 : getStringHashCode(this.epy_1);
    result = imul(result, 31) + (this.fpy_1 == null ? 0 : hashCode(this.fpy_1)) | 0;
    return result;
  };
  protoOf(Interaction).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Interaction))
      return false;
    var tmp0_other_with_cast = other instanceof Interaction ? other : THROW_CCE();
    if (!(this.epy_1 == tmp0_other_with_cast.epy_1))
      return false;
    if (!equals(this.fpy_1, tmp0_other_with_cast.fpy_1))
      return false;
    return true;
  };
  function Companion_62() {
    Companion_instance_111 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.gpy_1 = [new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance()), null, null, new ArrayListSerializer(StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_58()), new ArrayListSerializer($serializer_getInstance_58()), new ArrayListSerializer($serializer_getInstance_58()), new ArrayListSerializer($serializer_getInstance_58()), new ArrayListSerializer($serializer_getInstance_58())];
  }
  var Companion_instance_111;
  function Companion_getInstance_79() {
    if (Companion_instance_111 == null)
      new Companion_62();
    return Companion_instance_111;
  }
  function $serializer_47() {
    $serializer_instance_47 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('Activity', this, 12);
    tmp0_serialDesc.t4f('name', true);
    tmp0_serialDesc.t4f('description', true);
    tmp0_serialDesc.t4f('type', true);
    tmp0_serialDesc.t4f('extensions', true);
    tmp0_serialDesc.t4f('moreInfo', true);
    tmp0_serialDesc.t4f('interactionType', true);
    tmp0_serialDesc.t4f('correctResponsePattern', true);
    tmp0_serialDesc.t4f('choices', true);
    tmp0_serialDesc.t4f('scale', true);
    tmp0_serialDesc.t4f('source', true);
    tmp0_serialDesc.t4f('target', true);
    tmp0_serialDesc.t4f('steps', true);
    this.hpy_1 = tmp0_serialDesc;
  }
  protoOf($serializer_47).q44 = function () {
    return this.hpy_1;
  };
  protoOf($serializer_47).k4g = function () {
    var tmp0_cached = Companion_getInstance_79().gpy_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[3]), get_nullable(StringSerializer_getInstance()), get_nullable(XapiInteractionTypeSerializer_instance), get_nullable(tmp0_cached[6]), get_nullable(tmp0_cached[7]), get_nullable(tmp0_cached[8]), get_nullable(tmp0_cached[9]), get_nullable(tmp0_cached[10]), get_nullable(tmp0_cached[11])];
  };
  protoOf($serializer_47).s44 = function (decoder) {
    var tmp0_desc = this.hpy_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_local11 = null;
    var tmp16_input = decoder.i48(tmp0_desc);
    var tmp17_cached = Companion_getInstance_79().gpy_1;
    if (tmp16_input.x48()) {
      tmp4_local0 = tmp16_input.w48(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.w48(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.w48(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.w48(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.w48(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.w48(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.w48(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.w48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.w48(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.w48(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.w48(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.w48(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.w48(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.w48(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.w48(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.w48(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.w48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.w48(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.j48(tmp0_desc);
    return XapiActivity_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, null);
  };
  protoOf($serializer_47).ipy = function (encoder, value) {
    var tmp0_desc = this.hpy_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_79().gpy_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.jpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, tmp2_cached[0], value.jpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.kpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.kpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.lpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.lpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.mpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, tmp2_cached[3], value.mpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.npy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.npy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.opy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, value.opy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.ppy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, tmp2_cached[6], value.ppy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.qpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, tmp2_cached[7], value.qpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.rpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 8, tmp2_cached[8], value.rpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.spy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, tmp2_cached[9], value.spy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 10) ? true : !(value.tpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 10, tmp2_cached[10], value.tpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 11) ? true : !(value.upy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 11, tmp2_cached[11], value.upy_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_47).r44 = function (encoder, value) {
    return this.ipy(encoder, value instanceof XapiActivity ? value : THROW_CCE());
  };
  var $serializer_instance_47;
  function $serializer_getInstance_59() {
    if ($serializer_instance_47 == null)
      new $serializer_47();
    return $serializer_instance_47;
  }
  function XapiActivity_init_$Init$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_59().hpy_1);
    }
    if (0 === (seen1 & 1))
      $this.jpy_1 = null;
    else
      $this.jpy_1 = name;
    if (0 === (seen1 & 2))
      $this.kpy_1 = null;
    else
      $this.kpy_1 = description;
    if (0 === (seen1 & 4))
      $this.lpy_1 = null;
    else
      $this.lpy_1 = type;
    if (0 === (seen1 & 8))
      $this.mpy_1 = null;
    else
      $this.mpy_1 = extensions;
    if (0 === (seen1 & 16))
      $this.npy_1 = null;
    else
      $this.npy_1 = moreInfo;
    if (0 === (seen1 & 32))
      $this.opy_1 = null;
    else
      $this.opy_1 = interactionType;
    if (0 === (seen1 & 64))
      $this.ppy_1 = null;
    else
      $this.ppy_1 = correctResponsePattern;
    if (0 === (seen1 & 128))
      $this.qpy_1 = null;
    else
      $this.qpy_1 = choices;
    if (0 === (seen1 & 256))
      $this.rpy_1 = null;
    else
      $this.rpy_1 = scale;
    if (0 === (seen1 & 512))
      $this.spy_1 = null;
    else
      $this.spy_1 = source;
    if (0 === (seen1 & 1024))
      $this.tpy_1 = null;
    else
      $this.tpy_1 = target;
    if (0 === (seen1 & 2048))
      $this.upy_1 = null;
    else
      $this.upy_1 = steps;
    return $this;
  }
  function XapiActivity_init_$Create$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker) {
    return XapiActivity_init_$Init$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker, objectCreate(protoOf(XapiActivity)));
  }
  function XapiActivity(name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps) {
    Companion_getInstance_79();
    name = name === VOID ? null : name;
    description = description === VOID ? null : description;
    type = type === VOID ? null : type;
    extensions = extensions === VOID ? null : extensions;
    moreInfo = moreInfo === VOID ? null : moreInfo;
    interactionType = interactionType === VOID ? null : interactionType;
    correctResponsePattern = correctResponsePattern === VOID ? null : correctResponsePattern;
    choices = choices === VOID ? null : choices;
    scale = scale === VOID ? null : scale;
    source = source === VOID ? null : source;
    target = target === VOID ? null : target;
    steps = steps === VOID ? null : steps;
    this.jpy_1 = name;
    this.kpy_1 = description;
    this.lpy_1 = type;
    this.mpy_1 = extensions;
    this.npy_1 = moreInfo;
    this.opy_1 = interactionType;
    this.ppy_1 = correctResponsePattern;
    this.qpy_1 = choices;
    this.rpy_1 = scale;
    this.spy_1 = source;
    this.tpy_1 = target;
    this.upy_1 = steps;
  }
  protoOf(XapiActivity).toString = function () {
    return 'XapiActivity(name=' + this.jpy_1 + ', description=' + this.kpy_1 + ', type=' + this.lpy_1 + ', extensions=' + this.mpy_1 + ', moreInfo=' + this.npy_1 + ', interactionType=' + this.opy_1 + ', correctResponsePattern=' + this.ppy_1 + ', choices=' + this.qpy_1 + ', scale=' + this.rpy_1 + ', source=' + this.spy_1 + ', target=' + this.tpy_1 + ', steps=' + this.upy_1 + ')';
  };
  protoOf(XapiActivity).hashCode = function () {
    var result = this.jpy_1 == null ? 0 : hashCode(this.jpy_1);
    result = imul(result, 31) + (this.kpy_1 == null ? 0 : hashCode(this.kpy_1)) | 0;
    result = imul(result, 31) + (this.lpy_1 == null ? 0 : getStringHashCode(this.lpy_1)) | 0;
    result = imul(result, 31) + (this.mpy_1 == null ? 0 : hashCode(this.mpy_1)) | 0;
    result = imul(result, 31) + (this.npy_1 == null ? 0 : getStringHashCode(this.npy_1)) | 0;
    result = imul(result, 31) + (this.opy_1 == null ? 0 : this.opy_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ppy_1 == null ? 0 : hashCode(this.ppy_1)) | 0;
    result = imul(result, 31) + (this.qpy_1 == null ? 0 : hashCode(this.qpy_1)) | 0;
    result = imul(result, 31) + (this.rpy_1 == null ? 0 : hashCode(this.rpy_1)) | 0;
    result = imul(result, 31) + (this.spy_1 == null ? 0 : hashCode(this.spy_1)) | 0;
    result = imul(result, 31) + (this.tpy_1 == null ? 0 : hashCode(this.tpy_1)) | 0;
    result = imul(result, 31) + (this.upy_1 == null ? 0 : hashCode(this.upy_1)) | 0;
    return result;
  };
  protoOf(XapiActivity).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiActivity))
      return false;
    var tmp0_other_with_cast = other instanceof XapiActivity ? other : THROW_CCE();
    if (!equals(this.jpy_1, tmp0_other_with_cast.jpy_1))
      return false;
    if (!equals(this.kpy_1, tmp0_other_with_cast.kpy_1))
      return false;
    if (!(this.lpy_1 == tmp0_other_with_cast.lpy_1))
      return false;
    if (!equals(this.mpy_1, tmp0_other_with_cast.mpy_1))
      return false;
    if (!(this.npy_1 == tmp0_other_with_cast.npy_1))
      return false;
    if (!equals(this.opy_1, tmp0_other_with_cast.opy_1))
      return false;
    if (!equals(this.ppy_1, tmp0_other_with_cast.ppy_1))
      return false;
    if (!equals(this.qpy_1, tmp0_other_with_cast.qpy_1))
      return false;
    if (!equals(this.rpy_1, tmp0_other_with_cast.rpy_1))
      return false;
    if (!equals(this.spy_1, tmp0_other_with_cast.spy_1))
      return false;
    if (!equals(this.tpy_1, tmp0_other_with_cast.tpy_1))
      return false;
    if (!equals(this.upy_1, tmp0_other_with_cast.upy_1))
      return false;
    return true;
  };
  function ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    activityLangMapEntries = activityLangMapEntries === VOID ? emptyList() : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? emptyList() : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? emptyList() : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? null : statementContextActivityJoin;
    this.npq_1 = activityEntity;
    this.opq_1 = activityLangMapEntries;
    this.ppq_1 = activityInteractionEntities;
    this.qpq_1 = activityExtensionEntities;
    this.rpq_1 = statementContextActivityJoin;
  }
  protoOf(ActivityEntities).vpy = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    return new ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).wpy = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin, $super) {
    activityEntity = activityEntity === VOID ? this.npq_1 : activityEntity;
    activityLangMapEntries = activityLangMapEntries === VOID ? this.opq_1 : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? this.ppq_1 : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? this.qpq_1 : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? this.rpq_1 : statementContextActivityJoin;
    return $super === VOID ? this.vpy(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) : $super.vpy.call(this, activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).toString = function () {
    return 'ActivityEntities(activityEntity=' + this.npq_1 + ', activityLangMapEntries=' + this.opq_1 + ', activityInteractionEntities=' + this.ppq_1 + ', activityExtensionEntities=' + this.qpq_1 + ', statementContextActivityJoin=' + this.rpq_1 + ')';
  };
  protoOf(ActivityEntities).hashCode = function () {
    var result = this.npq_1.hashCode();
    result = imul(result, 31) + hashCode(this.opq_1) | 0;
    result = imul(result, 31) + hashCode(this.ppq_1) | 0;
    result = imul(result, 31) + hashCode(this.qpq_1) | 0;
    result = imul(result, 31) + (this.rpq_1 == null ? 0 : this.rpq_1.hashCode()) | 0;
    return result;
  };
  protoOf(ActivityEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActivityEntities))
      return false;
    var tmp0_other_with_cast = other instanceof ActivityEntities ? other : THROW_CCE();
    if (!this.npq_1.equals(tmp0_other_with_cast.npq_1))
      return false;
    if (!equals(this.opq_1, tmp0_other_with_cast.opq_1))
      return false;
    if (!equals(this.ppq_1, tmp0_other_with_cast.ppq_1))
      return false;
    if (!equals(this.qpq_1, tmp0_other_with_cast.qpq_1))
      return false;
    if (!equals(this.rpq_1, tmp0_other_with_cast.rpq_1))
      return false;
    return true;
  };
  function toEntities(_this__u8e3s4, activityId, stringHasher, json) {
    xapiRequireValidIRI(activityId, 'Activity ID is not a valid IRI: ' + activityId);
    var activityUid = stringHasher.hm7(activityId);
    var tmp9_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.qpy_1;
    var tmp;
    if (tmp9_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp9_safe_receiver, 10));
      var tmp0_iterator = tmp9_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$0 = toEntities$toEntities(item, stringHasher, activityUid, 1, 'choices');
        destination.i1(tmp$ret$0);
      }
      tmp = destination;
    }
    var tmp_0 = toEmptyIfNull(tmp);
    var tmp7_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.rpy_1;
    var tmp_1;
    if (tmp7_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp7_safe_receiver, 10));
      var tmp0_iterator_0 = tmp7_safe_receiver.w();
      while (tmp0_iterator_0.f()) {
        var item_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$3 = toEntities$toEntities(item_0, stringHasher, activityUid, 2, 'scale');
        destination_0.i1(tmp$ret$3);
      }
      tmp_1 = destination_0;
    }
    var tmp_2 = plus(tmp_0, toEmptyIfNull(tmp_1));
    var tmp5_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.spy_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp5_safe_receiver, 10));
      var tmp0_iterator_1 = tmp5_safe_receiver.w();
      while (tmp0_iterator_1.f()) {
        var item_1 = tmp0_iterator_1.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$6 = toEntities$toEntities(item_1, stringHasher, activityUid, 3, 'source');
        destination_1.i1(tmp$ret$6);
      }
      tmp_3 = destination_1;
    }
    var tmp_4 = plus(tmp_2, toEmptyIfNull(tmp_3));
    var tmp3_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.tpy_1;
    var tmp_5;
    if (tmp3_safe_receiver == null) {
      tmp_5 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp3_safe_receiver, 10));
      var tmp0_iterator_2 = tmp3_safe_receiver.w();
      while (tmp0_iterator_2.f()) {
        var item_2 = tmp0_iterator_2.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$9 = toEntities$toEntities(item_2, stringHasher, activityUid, 4, 'target');
        destination_2.i1(tmp$ret$9);
      }
      tmp_5 = destination_2;
    }
    var tmp_6 = plus(tmp_4, toEmptyIfNull(tmp_5));
    var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.upy_1;
    var tmp_7;
    if (tmp1_safe_receiver == null) {
      tmp_7 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
      var tmp0_iterator_3 = tmp1_safe_receiver.w();
      while (tmp0_iterator_3.f()) {
        var item_3 = tmp0_iterator_3.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$12 = toEntities$toEntities(item_3, stringHasher, activityUid, 5, 'steps');
        destination_3.i1(tmp$ret$12);
      }
      tmp_7 = destination_3;
    }
    var interactionEntitiesAndLangMaps = plus(tmp_6, toEmptyIfNull(tmp_7));
    var tmp_8 = _this__u8e3s4 == null ? null : _this__u8e3s4.lpy_1;
    var tmp_9 = _this__u8e3s4 == null ? null : _this__u8e3s4.npy_1;
    var tmp13_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.opy_1;
    var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.apz_1;
    var tmp_10;
    if (tmp14_elvis_lhs == null) {
      tmp_10 = 0;
    } else {
      tmp_10 = tmp14_elvis_lhs;
    }
    var tmp_11 = tmp_10;
    var tmp16_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.ppy_1;
    var tmp_12;
    if (tmp16_safe_receiver == null) {
      tmp_12 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      // Inline function 'kotlinx.serialization.encodeToString' call
      // Inline function 'kotlinx.serialization.serializer' call
      var this_0 = json.t45();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_1 = serializer(this_0, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false))]), false));
      var tmp$ret$16 = isInterface(this_1, KSerializer) ? this_1 : THROW_CCE();
      tmp_12 = json.r45(tmp$ret$16, tmp16_safe_receiver);
    }
    var tmp_13 = new ActivityEntity(activityUid, activityId, tmp_8, tmp_9, tmp_11, tmp_12);
    var tmp20_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.jpy_1;
    var tmp_14;
    if (tmp20_safe_receiver == null) {
      tmp_14 = null;
    } else {
      tmp_14 = toEntities$toLangMapEntries(tmp20_safe_receiver, activityUid, stringHasher, 'name');
    }
    var tmp_15 = toEmptyIfNull(tmp_14);
    var tmp18_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.kpy_1;
    var tmp_16;
    if (tmp18_safe_receiver == null) {
      tmp_16 = null;
    } else {
      tmp_16 = toEntities$toLangMapEntries(tmp18_safe_receiver, activityUid, stringHasher, 'description');
    }
    var tmp_17 = plus(tmp_15, toEmptyIfNull(tmp_16));
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var destination_4 = ArrayList_init_$Create$();
    var tmp0_iterator_4 = interactionEntitiesAndLangMaps.w();
    while (tmp0_iterator_4.f()) {
      var element = tmp0_iterator_4.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var list = element.x6_1;
      addAll(destination_4, list);
    }
    var tmp_18 = plus(tmp_17, destination_4);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_5 = ArrayList_init_$Create$_0(collectionSizeOrDefault(interactionEntitiesAndLangMaps, 10));
    var tmp0_iterator_5 = interactionEntitiesAndLangMaps.w();
    while (tmp0_iterator_5.f()) {
      var item_4 = tmp0_iterator_5.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var tmp$ret$23 = item_4.w6_1;
      destination_5.i1(tmp$ret$23);
    }
    var tmp_19 = destination_5;
    var tmp22_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.mpy_1;
    var tmp_20;
    if (tmp22_safe_receiver == null) {
      tmp_20 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_6 = ArrayList_init_$Create$_0(tmp22_safe_receiver.u());
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator_6 = tmp22_safe_receiver.q2().w();
      while (tmp0_iterator_6.f()) {
        var item_5 = tmp0_iterator_6.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        // Inline function 'kotlin.collections.component1' call
        var key = item_5.s2();
        // Inline function 'kotlin.collections.component2' call
        var value = item_5.t2();
        var tmp$ret$29 = new ActivityExtensionEntity(activityUid, stringHasher.hm7(key), xapiRequireValidIRI(key, activityId + ' extension ' + key + ' is not a valid IRI'), json.r45(Companion_instance_23.n4r(), value));
        destination_6.i1(tmp$ret$29);
      }
      tmp_20 = destination_6;
    }
    var tmp23_elvis_lhs = tmp_20;
    return new ActivityEntities(tmp_13, tmp_18, tmp_19, tmp23_elvis_lhs == null ? emptyList() : tmp23_elvis_lhs);
  }
  function toEntities$toLangMapEntries(_this__u8e3s4, activityUid, $stringHasher, propName, almeAieHash) {
    almeAieHash = almeAieHash === VOID ? new Long(0, 0) : almeAieHash;
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.q2();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.toLangMapEntries.<anonymous>' call
      // Inline function 'kotlin.collections.component1' call
      var lang = item.s2();
      // Inline function 'kotlin.collections.component2' call
      var text = item.t2();
      var tmp$ret$2 = new ActivityLangMapEntry(activityUid, $stringHasher.hm7(propName + '-' + lang), lang, propName, text, almeAieHash);
      destination.i1(tmp$ret$2);
    }
    return destination;
  }
  function toEntities$toEntities(_this__u8e3s4, $stringHasher, activityUid, propId, propName) {
    var aieHash = $stringHasher.hm7('' + propId + _this__u8e3s4.epy_1);
    var tmp = new ActivityInteractionEntity(activityUid, aieHash, propId, _this__u8e3s4.epy_1);
    var tmp0_safe_receiver = _this__u8e3s4.fpy_1;
    return to(tmp, toEmptyIfNull(tmp0_safe_receiver == null ? null : toEntities$toLangMapEntries(tmp0_safe_receiver, activityUid, $stringHasher, propName + '-' + _this__u8e3s4.epy_1, aieHash)));
  }
  function Companion_63() {
  }
  protoOf(Companion_63).n4r = function () {
    return XapiActorSerializer_getInstance();
  };
  protoOf(Companion_63).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_112;
  function Companion_getInstance_80() {
    return Companion_instance_112;
  }
  function XapiActor() {
  }
  function XapiActorSerializer() {
    XapiActorSerializer_instance = this;
    JsonContentPolymorphicSerializer.call(this, getKClass(XapiActor));
  }
  protoOf(XapiActorSerializer).l4r = function (element) {
    var tmp0_safe_receiver = get_jsonObject(element).ba('type');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g3b();
    var tmp;
    if (tmp2_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiActorSerializer.selectDeserializer.<anonymous>' call
      tmp = valueOf(tmp2_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp;
    var objectType = tmp3_elvis_lhs == null ? XapiObjectType_Agent_getInstance() : tmp3_elvis_lhs;
    var tmp_0;
    switch (objectType.za_1) {
      case 3:
        tmp_0 = Companion_instance_113.n4r();
        break;
      case 4:
        tmp_0 = Companion_getInstance_85().n4r();
        break;
      default:
        throw new XapiException(400, 'Invalid object type for actor: must be Agent or Group');
    }
    return tmp_0;
  };
  var XapiActorSerializer_instance;
  function XapiActorSerializer_getInstance() {
    if (XapiActorSerializer_instance == null)
      new XapiActorSerializer();
    return XapiActorSerializer_instance;
  }
  function identifierHash(_this__u8e3s4, xxHasher) {
    var tmp;
    if (!(_this__u8e3s4.epz() == null)) {
      var tmp0_safe_receiver = _this__u8e3s4.epz();
      var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.apy_1;
      var tmp1_safe_receiver = _this__u8e3s4.epz();
      tmp = '' + tmp_0 + '@' + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zpx_1);
    } else if (!(_this__u8e3s4.bpz() == null)) {
      tmp = _this__u8e3s4.bpz();
    } else if (!(_this__u8e3s4.cpz() == null)) {
      tmp = _this__u8e3s4.cpz();
    } else if (!(_this__u8e3s4.dpz() == null)) {
      tmp = _this__u8e3s4.dpz();
    } else {
      tmp = null;
    }
    var idStr = tmp;
    var tmp_1;
    if (idStr == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.identifierHash.<anonymous>' call
      tmp_1 = xxHasher.hm7(idStr);
    }
    var tmp3_elvis_lhs = tmp_1;
    return tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
  }
  function ActorEntities(actor, groupMemberAgents, groupMemberJoins) {
    groupMemberAgents = groupMemberAgents === VOID ? emptyList() : groupMemberAgents;
    groupMemberJoins = groupMemberJoins === VOID ? emptyList() : groupMemberJoins;
    this.hpt_1 = actor;
    this.ipt_1 = groupMemberAgents;
    this.jpt_1 = groupMemberJoins;
  }
  protoOf(ActorEntities).toString = function () {
    return 'ActorEntities(actor=' + this.hpt_1 + ', groupMemberAgents=' + this.ipt_1 + ', groupMemberJoins=' + this.jpt_1 + ')';
  };
  protoOf(ActorEntities).hashCode = function () {
    var result = this.hpt_1.hashCode();
    result = imul(result, 31) + hashCode(this.ipt_1) | 0;
    result = imul(result, 31) + hashCode(this.jpt_1) | 0;
    return result;
  };
  protoOf(ActorEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActorEntities))
      return false;
    var tmp0_other_with_cast = other instanceof ActorEntities ? other : THROW_CCE();
    if (!this.hpt_1.equals(tmp0_other_with_cast.hpt_1))
      return false;
    if (!equals(this.ipt_1, tmp0_other_with_cast.ipt_1))
      return false;
    if (!equals(this.jpt_1, tmp0_other_with_cast.jpt_1))
      return false;
    return true;
  };
  function toEntities_0(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap) {
    knownActorUidToPersonUidMap = knownActorUidToPersonUidMap === VOID ? emptyMap() : knownActorUidToPersonUidMap;
    var tmp;
    if (_this__u8e3s4 instanceof XapiAgent) {
      tmp = new ActorEntities(toActorEntity(_this__u8e3s4, stringHasher, knownActorUidToPersonUidMap));
    } else {
      if (_this__u8e3s4 instanceof XapiGroup) {
        tmp = toGroupEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
      } else {
        noWhenBranchMatchedException();
      }
    }
    return tmp;
  }
  function Companion_64() {
  }
  protoOf(Companion_64).n4r = function () {
    return $serializer_getInstance_60();
  };
  var Companion_instance_113;
  function Companion_getInstance_81() {
    return Companion_instance_113;
  }
  function $serializer_48() {
    $serializer_instance_48 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAgent', this, 6);
    tmp0_serialDesc.t4f('name', true);
    tmp0_serialDesc.t4f('mbox', true);
    tmp0_serialDesc.t4f('mbox_sha1sum', true);
    tmp0_serialDesc.t4f('openid', true);
    tmp0_serialDesc.t4f('objectType', true);
    tmp0_serialDesc.t4f('account', true);
    this.ipz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_48).q44 = function () {
    return this.ipz_1;
  };
  protoOf($serializer_48).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiObjectTypeSerializer_instance), get_nullable($serializer_getInstance_57())];
  };
  protoOf($serializer_48).s44 = function (decoder) {
    var tmp0_desc = this.ipz_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.i48(tmp0_desc);
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return XapiAgent_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_48).jpz = function (encoder, value) {
    var tmp0_desc = this.ipz_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.kpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.kpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.lpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.lpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.mpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.mpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.npz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.npz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.opz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.opz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.ppz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, $serializer_getInstance_57(), value.ppz_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_48).r44 = function (encoder, value) {
    return this.jpz(encoder, value instanceof XapiAgent ? value : THROW_CCE());
  };
  var $serializer_instance_48;
  function $serializer_getInstance_60() {
    if ($serializer_instance_48 == null)
      new $serializer_48();
    return $serializer_instance_48;
  }
  function XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_60().ipz_1);
    }
    if (0 === (seen1 & 1))
      $this.kpz_1 = null;
    else
      $this.kpz_1 = name;
    if (0 === (seen1 & 2))
      $this.lpz_1 = null;
    else
      $this.lpz_1 = mbox;
    if (0 === (seen1 & 4))
      $this.mpz_1 = null;
    else
      $this.mpz_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.npz_1 = null;
    else
      $this.npz_1 = openid;
    if (0 === (seen1 & 16))
      $this.opz_1 = null;
    else
      $this.opz_1 = objectType;
    if (0 === (seen1 & 32))
      $this.ppz_1 = null;
    else
      $this.ppz_1 = account;
    return $this;
  }
  function XapiAgent_init_$Create$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker) {
    return XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, objectCreate(protoOf(XapiAgent)));
  }
  function XapiAgent(name, mbox, mbox_sha1sum, openid, objectType, account) {
    name = name === VOID ? null : name;
    mbox = mbox === VOID ? null : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? null : mbox_sha1sum;
    openid = openid === VOID ? null : openid;
    objectType = objectType === VOID ? null : objectType;
    account = account === VOID ? null : account;
    this.kpz_1 = name;
    this.lpz_1 = mbox;
    this.mpz_1 = mbox_sha1sum;
    this.npz_1 = openid;
    this.opz_1 = objectType;
    this.ppz_1 = account;
  }
  protoOf(XapiAgent).bpz = function () {
    return this.lpz_1;
  };
  protoOf(XapiAgent).cpz = function () {
    return this.mpz_1;
  };
  protoOf(XapiAgent).dpz = function () {
    return this.npz_1;
  };
  protoOf(XapiAgent).qpz = function () {
    return this.opz_1;
  };
  protoOf(XapiAgent).epz = function () {
    return this.ppz_1;
  };
  protoOf(XapiAgent).toString = function () {
    return 'XapiAgent(name=' + this.kpz_1 + ', mbox=' + this.lpz_1 + ', mbox_sha1sum=' + this.mpz_1 + ', openid=' + this.npz_1 + ', objectType=' + this.opz_1 + ', account=' + this.ppz_1 + ')';
  };
  protoOf(XapiAgent).hashCode = function () {
    var result = this.kpz_1 == null ? 0 : getStringHashCode(this.kpz_1);
    result = imul(result, 31) + (this.lpz_1 == null ? 0 : getStringHashCode(this.lpz_1)) | 0;
    result = imul(result, 31) + (this.mpz_1 == null ? 0 : getStringHashCode(this.mpz_1)) | 0;
    result = imul(result, 31) + (this.npz_1 == null ? 0 : getStringHashCode(this.npz_1)) | 0;
    result = imul(result, 31) + (this.opz_1 == null ? 0 : this.opz_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ppz_1 == null ? 0 : this.ppz_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiAgent).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiAgent))
      return false;
    var tmp0_other_with_cast = other instanceof XapiAgent ? other : THROW_CCE();
    if (!(this.kpz_1 == tmp0_other_with_cast.kpz_1))
      return false;
    if (!(this.lpz_1 == tmp0_other_with_cast.lpz_1))
      return false;
    if (!(this.mpz_1 == tmp0_other_with_cast.mpz_1))
      return false;
    if (!(this.npz_1 == tmp0_other_with_cast.npz_1))
      return false;
    if (!equals(this.opz_1, tmp0_other_with_cast.opz_1))
      return false;
    if (!equals(this.ppz_1, tmp0_other_with_cast.ppz_1))
      return false;
    return true;
  };
  function toActorEntity(_this__u8e3s4, xxHasher, knownActorUidToPersonUidMap, lastModifiedTime) {
    lastModifiedTime = lastModifiedTime === VOID ? systemTimeInMillis() : lastModifiedTime;
    var uid = identifierHash(_this__u8e3s4, xxHasher);
    var tmp0_elvis_lhs = knownActorUidToPersonUidMap.q(uid);
    var tmp5_actorPersonUid = tmp0_elvis_lhs == null ? new Long(0, 0) : tmp0_elvis_lhs;
    var tmp6_actorMbox = _this__u8e3s4.lpz_1;
    var tmp7_actorMbox_sha1sum = _this__u8e3s4.mpz_1;
    var tmp8_actorOpenid = _this__u8e3s4.npz_1;
    var tmp1_safe_receiver = _this__u8e3s4.ppz_1;
    var tmp9_actorAccountName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.apy_1;
    var tmp2_safe_receiver = _this__u8e3s4.ppz_1;
    var tmp10_actorAccountHomePage = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.zpx_1;
    var tmp3_safe_receiver = _this__u8e3s4.kpz_1;
    var tmp;
    if (tmp3_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toActorEntity.<anonymous>' call
      tmp = xxHasher.hm7(tmp3_safe_receiver);
    }
    var tmp4_elvis_lhs = tmp;
    var tmp11_actorEtag = tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs;
    return new ActorEntity(uid, tmp5_actorPersonUid, VOID, tmp6_actorMbox, tmp7_actorMbox_sha1sum, tmp8_actorOpenid, tmp9_actorAccountName, tmp10_actorAccountHomePage, tmp11_actorEtag, lastModifiedTime, 1);
  }
  function Companion_65() {
    Companion_instance_114 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.rpz_1 = [null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  var Companion_instance_114;
  function Companion_getInstance_82() {
    if (Companion_instance_114 == null)
      new Companion_65();
    return Companion_instance_114;
  }
  function $serializer_49() {
    $serializer_instance_49 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiContext', this, 9);
    tmp0_serialDesc.t4f('instructor', true);
    tmp0_serialDesc.t4f('registration', true);
    tmp0_serialDesc.t4f('language', true);
    tmp0_serialDesc.t4f('platform', true);
    tmp0_serialDesc.t4f('revision', true);
    tmp0_serialDesc.t4f('team', true);
    tmp0_serialDesc.t4f('statement', true);
    tmp0_serialDesc.t4f('contextActivities', true);
    tmp0_serialDesc.t4f('extensions', true);
    this.spz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_49).q44 = function () {
    return this.spz_1;
  };
  protoOf($serializer_49).k4g = function () {
    var tmp0_cached = Companion_getInstance_82().rpz_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(XapiActorSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiActorSerializer_getInstance()), get_nullable($serializer_getInstance_67()), get_nullable(XapiContextActivitiesSerializer_getInstance()), get_nullable(tmp0_cached[8])];
  };
  protoOf($serializer_49).s44 = function (decoder) {
    var tmp0_desc = this.spz_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_input = decoder.i48(tmp0_desc);
    var tmp14_cached = Companion_getInstance_82().rpz_1;
    if (tmp13_input.x48()) {
      tmp4_local0 = tmp13_input.w48(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.w48(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.w48(tmp0_desc, 6, $serializer_getInstance_67(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.w48(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.w48(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.w48(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.w48(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.w48(tmp0_desc, 6, $serializer_getInstance_67(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.w48(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.w48(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.j48(tmp0_desc);
    return XapiContext_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);
  };
  protoOf($serializer_49).tpz = function (encoder, value) {
    var tmp0_desc = this.spz_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_82().rpz_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.upz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, XapiActorSerializer_getInstance(), value.upz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.vpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.vpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.wpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.wpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.xpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.xpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.ypz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.ypz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.zpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, XapiActorSerializer_getInstance(), value.zpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.aq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, $serializer_getInstance_67(), value.aq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.bq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), value.bq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.cq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 8, tmp2_cached[8], value.cq0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_49).r44 = function (encoder, value) {
    return this.tpz(encoder, value instanceof XapiContext ? value : THROW_CCE());
  };
  var $serializer_instance_49;
  function $serializer_getInstance_61() {
    if ($serializer_instance_49 == null)
      new $serializer_49();
    return $serializer_instance_49;
  }
  function XapiContext_init_$Init$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_61().spz_1);
    }
    if (0 === (seen1 & 1))
      $this.upz_1 = null;
    else
      $this.upz_1 = instructor;
    if (0 === (seen1 & 2))
      $this.vpz_1 = null;
    else
      $this.vpz_1 = registration;
    if (0 === (seen1 & 4))
      $this.wpz_1 = null;
    else
      $this.wpz_1 = language;
    if (0 === (seen1 & 8))
      $this.xpz_1 = null;
    else
      $this.xpz_1 = platform;
    if (0 === (seen1 & 16))
      $this.ypz_1 = null;
    else
      $this.ypz_1 = revision;
    if (0 === (seen1 & 32))
      $this.zpz_1 = null;
    else
      $this.zpz_1 = team;
    if (0 === (seen1 & 64))
      $this.aq0_1 = null;
    else
      $this.aq0_1 = statement;
    if (0 === (seen1 & 128))
      $this.bq0_1 = null;
    else
      $this.bq0_1 = contextActivities;
    if (0 === (seen1 & 256))
      $this.cq0_1 = null;
    else
      $this.cq0_1 = extensions;
    return $this;
  }
  function XapiContext_init_$Create$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker) {
    return XapiContext_init_$Init$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker, objectCreate(protoOf(XapiContext)));
  }
  function XapiContext(instructor, registration, language, platform, revision, team, statement, contextActivities, extensions) {
    Companion_getInstance_82();
    instructor = instructor === VOID ? null : instructor;
    registration = registration === VOID ? null : registration;
    language = language === VOID ? null : language;
    platform = platform === VOID ? null : platform;
    revision = revision === VOID ? null : revision;
    team = team === VOID ? null : team;
    statement = statement === VOID ? null : statement;
    contextActivities = contextActivities === VOID ? null : contextActivities;
    extensions = extensions === VOID ? null : extensions;
    this.upz_1 = instructor;
    this.vpz_1 = registration;
    this.wpz_1 = language;
    this.xpz_1 = platform;
    this.ypz_1 = revision;
    this.zpz_1 = team;
    this.aq0_1 = statement;
    this.bq0_1 = contextActivities;
    this.cq0_1 = extensions;
  }
  protoOf(XapiContext).toString = function () {
    return 'XapiContext(instructor=' + this.upz_1 + ', registration=' + this.vpz_1 + ', language=' + this.wpz_1 + ', platform=' + this.xpz_1 + ', revision=' + this.ypz_1 + ', team=' + this.zpz_1 + ', statement=' + this.aq0_1 + ', contextActivities=' + this.bq0_1 + ', extensions=' + this.cq0_1 + ')';
  };
  protoOf(XapiContext).hashCode = function () {
    var result = this.upz_1 == null ? 0 : hashCode(this.upz_1);
    result = imul(result, 31) + (this.vpz_1 == null ? 0 : getStringHashCode(this.vpz_1)) | 0;
    result = imul(result, 31) + (this.wpz_1 == null ? 0 : getStringHashCode(this.wpz_1)) | 0;
    result = imul(result, 31) + (this.xpz_1 == null ? 0 : getStringHashCode(this.xpz_1)) | 0;
    result = imul(result, 31) + (this.ypz_1 == null ? 0 : getStringHashCode(this.ypz_1)) | 0;
    result = imul(result, 31) + (this.zpz_1 == null ? 0 : hashCode(this.zpz_1)) | 0;
    result = imul(result, 31) + (this.aq0_1 == null ? 0 : this.aq0_1.hashCode()) | 0;
    result = imul(result, 31) + (this.bq0_1 == null ? 0 : this.bq0_1.hashCode()) | 0;
    result = imul(result, 31) + (this.cq0_1 == null ? 0 : hashCode(this.cq0_1)) | 0;
    return result;
  };
  protoOf(XapiContext).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContext))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContext ? other : THROW_CCE();
    if (!equals(this.upz_1, tmp0_other_with_cast.upz_1))
      return false;
    if (!(this.vpz_1 == tmp0_other_with_cast.vpz_1))
      return false;
    if (!(this.wpz_1 == tmp0_other_with_cast.wpz_1))
      return false;
    if (!(this.xpz_1 == tmp0_other_with_cast.xpz_1))
      return false;
    if (!(this.ypz_1 == tmp0_other_with_cast.ypz_1))
      return false;
    if (!equals(this.zpz_1, tmp0_other_with_cast.zpz_1))
      return false;
    if (!equals(this.aq0_1, tmp0_other_with_cast.aq0_1))
      return false;
    if (!equals(this.bq0_1, tmp0_other_with_cast.bq0_1))
      return false;
    if (!equals(this.cq0_1, tmp0_other_with_cast.cq0_1))
      return false;
    return true;
  };
  function Companion_66() {
  }
  var Companion_instance_115;
  function Companion_getInstance_83() {
    return Companion_instance_115;
  }
  function XapiContextActivities(parent, grouping, category, other) {
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.dq0_1 = parent;
    this.eq0_1 = grouping;
    this.fq0_1 = category;
    this.gq0_1 = other;
  }
  protoOf(XapiContextActivities).toString = function () {
    return 'XapiContextActivities(parent=' + this.dq0_1 + ', grouping=' + this.eq0_1 + ', category=' + this.fq0_1 + ', other=' + this.gq0_1 + ')';
  };
  protoOf(XapiContextActivities).hashCode = function () {
    var result = this.dq0_1 == null ? 0 : hashCode(this.dq0_1);
    result = imul(result, 31) + (this.eq0_1 == null ? 0 : hashCode(this.eq0_1)) | 0;
    result = imul(result, 31) + (this.fq0_1 == null ? 0 : hashCode(this.fq0_1)) | 0;
    result = imul(result, 31) + (this.gq0_1 == null ? 0 : hashCode(this.gq0_1)) | 0;
    return result;
  };
  protoOf(XapiContextActivities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContextActivities))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContextActivities ? other : THROW_CCE();
    if (!equals(this.dq0_1, tmp0_other_with_cast.dq0_1))
      return false;
    if (!equals(this.eq0_1, tmp0_other_with_cast.eq0_1))
      return false;
    if (!equals(this.fq0_1, tmp0_other_with_cast.fq0_1))
      return false;
    if (!equals(this.gq0_1, tmp0_other_with_cast.gq0_1))
      return false;
    return true;
  };
  function deserialize$propertyToObjectList(jsonObject, jsonDecoder, propName) {
    var jsonElement = jsonObject.ba(propName);
    var tmp;
    if (!(jsonElement == null)) {
      tmp = decodeListOrSingleObjectAsList(jsonDecoder.m4r(), Companion_instance_123.n4r(), jsonElement);
    } else {
      tmp = null;
    }
    return tmp;
  }
  function XapiContextActivitiesSerializer() {
    XapiContextActivitiesSerializer_instance = this;
    this.hq0_1 = Companion_getInstance_84().n4r().q44();
  }
  protoOf(XapiContextActivitiesSerializer).q44 = function () {
    return this.hq0_1;
  };
  protoOf(XapiContextActivitiesSerializer).jq0 = function (encoder, value) {
    encoder.z49(Companion_getInstance_84().n4r(), toSurrogate(value));
  };
  protoOf(XapiContextActivitiesSerializer).r44 = function (encoder, value) {
    return this.jq0(encoder, value instanceof XapiContextActivities ? value : THROW_CCE());
  };
  protoOf(XapiContextActivitiesSerializer).s44 = function (decoder) {
    var tmp0_elvis_lhs = isInterface(decoder, JsonDecoder) ? decoder : null;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalStateException_init_$Create$_0();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var jsonDecoder = tmp;
    var tmp_0 = jsonDecoder.k4r();
    var jsonObject = tmp_0 instanceof JsonObject ? tmp_0 : THROW_CCE();
    return new XapiContextActivities(deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'parent'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'grouping'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'category'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'other'));
  };
  var XapiContextActivitiesSerializer_instance;
  function XapiContextActivitiesSerializer_getInstance() {
    if (XapiContextActivitiesSerializer_instance == null)
      new XapiContextActivitiesSerializer();
    return XapiContextActivitiesSerializer_instance;
  }
  function Companion_67() {
    Companion_instance_116 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.iq0_1 = [new ArrayListSerializer($serializer_getInstance_67()), new ArrayListSerializer($serializer_getInstance_67()), new ArrayListSerializer($serializer_getInstance_67()), new ArrayListSerializer($serializer_getInstance_67())];
  }
  protoOf(Companion_67).n4r = function () {
    return $serializer_getInstance_62();
  };
  var Companion_instance_116;
  function Companion_getInstance_84() {
    if (Companion_instance_116 == null)
      new Companion_67();
    return Companion_instance_116;
  }
  function $serializer_50() {
    $serializer_instance_50 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('XapiContextActivities', this, 4);
    tmp0_serialDesc.t4f('parent', true);
    tmp0_serialDesc.t4f('grouping', true);
    tmp0_serialDesc.t4f('category', true);
    tmp0_serialDesc.t4f('other', true);
    this.kq0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_50).q44 = function () {
    return this.kq0_1;
  };
  protoOf($serializer_50).k4g = function () {
    var tmp0_cached = Companion_getInstance_84().iq0_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable(tmp0_cached[3])];
  };
  protoOf($serializer_50).s44 = function (decoder) {
    var tmp0_desc = this.kq0_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    var tmp9_cached = Companion_getInstance_84().iq0_1;
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.w48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.w48(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.w48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.w48(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return XapiContextActivitiesSurrogate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_50).lq0 = function (encoder, value) {
    var tmp0_desc = this.kq0_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_84().iq0_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.mq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, tmp2_cached[0], value.mq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.nq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.nq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.oq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, tmp2_cached[2], value.oq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.pq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, tmp2_cached[3], value.pq0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_50).r44 = function (encoder, value) {
    return this.lq0(encoder, value instanceof XapiContextActivitiesSurrogate ? value : THROW_CCE());
  };
  var $serializer_instance_50;
  function $serializer_getInstance_62() {
    if ($serializer_instance_50 == null)
      new $serializer_50();
    return $serializer_instance_50;
  }
  function XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_62().kq0_1);
    }
    if (0 === (seen1 & 1))
      $this.mq0_1 = null;
    else
      $this.mq0_1 = parent;
    if (0 === (seen1 & 2))
      $this.nq0_1 = null;
    else
      $this.nq0_1 = grouping;
    if (0 === (seen1 & 4))
      $this.oq0_1 = null;
    else
      $this.oq0_1 = category;
    if (0 === (seen1 & 8))
      $this.pq0_1 = null;
    else
      $this.pq0_1 = other;
    return $this;
  }
  function XapiContextActivitiesSurrogate_init_$Create$(seen1, parent, grouping, category, other, serializationConstructorMarker) {
    return XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, objectCreate(protoOf(XapiContextActivitiesSurrogate)));
  }
  function XapiContextActivitiesSurrogate(parent, grouping, category, other) {
    Companion_getInstance_84();
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.mq0_1 = parent;
    this.nq0_1 = grouping;
    this.oq0_1 = category;
    this.pq0_1 = other;
  }
  function toSurrogate(_this__u8e3s4) {
    return new XapiContextActivitiesSurrogate(_this__u8e3s4.dq0_1, _this__u8e3s4.eq0_1, _this__u8e3s4.fq0_1, _this__u8e3s4.gq0_1);
  }
  function toEntities_1(_this__u8e3s4, stringHasher, json, statementUuid) {
    var tmp = toEntities$toEntitiesInternal(_this__u8e3s4.dq0_1, stringHasher, json, statementUuid, 1);
    var tmp_0 = plus(tmp, toEntities$toEntitiesInternal(_this__u8e3s4.eq0_1, stringHasher, json, statementUuid, 2));
    var tmp_1 = plus(tmp_0, toEntities$toEntitiesInternal(_this__u8e3s4.fq0_1, stringHasher, json, statementUuid, 3));
    return plus(tmp_1, toEntities$toEntitiesInternal(_this__u8e3s4.gq0_1, stringHasher, json, statementUuid, 4));
  }
  function toEntities_2(_this__u8e3s4, stringHasher, json, statementUuid, contextType) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var activityUid = stringHasher.hm7(item.rq0_1);
      var scajToHash = stringHasher.hm7('' + contextType + '-' + item.rq0_1);
      var statementContextActivityJoin = new StatementContextActivityJoin(statementUuid.vmd(), statementUuid.wmd(), scajToHash, contextType, activityUid, item.rq0_1);
      var tmp0_safe_receiver = item.sq0_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toEntities(tmp0_safe_receiver, item.rq0_1, stringHasher, json);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.wpy(VOID, VOID, VOID, VOID, statementContextActivityJoin);
      var tmp$ret$0 = tmp2_elvis_lhs == null ? new ActivityEntities(new ActivityEntity(activityUid, item.rq0_1), VOID, VOID, VOID, statementContextActivityJoin) : tmp2_elvis_lhs;
      destination.i1(tmp$ret$0);
    }
    return destination;
  }
  function toEntities$toEntitiesInternal(_this__u8e3s4, $stringHasher, $json, $statementUuid, type) {
    return toEmptyIfNull(_this__u8e3s4 == null ? null : toEntities_2(_this__u8e3s4, $stringHasher, $json, $statementUuid, type));
  }
  function Companion_68() {
    Companion_instance_117 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.hpz_1 = [null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_60())];
  }
  protoOf(Companion_68).n4r = function () {
    return $serializer_getInstance_63();
  };
  var Companion_instance_117;
  function Companion_getInstance_85() {
    if (Companion_instance_117 == null)
      new Companion_68();
    return Companion_instance_117;
  }
  function $serializer_51() {
    $serializer_instance_51 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiGroup', this, 7);
    tmp0_serialDesc.t4f('name', true);
    tmp0_serialDesc.t4f('mbox', true);
    tmp0_serialDesc.t4f('mbox_sha1sum', true);
    tmp0_serialDesc.t4f('openid', true);
    tmp0_serialDesc.t4f('objectType', true);
    tmp0_serialDesc.t4f('account', true);
    tmp0_serialDesc.t4f('member', true);
    this.tq0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_51).q44 = function () {
    return this.tq0_1;
  };
  protoOf($serializer_51).k4g = function () {
    var tmp0_cached = Companion_getInstance_85().hpz_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiObjectTypeSerializer_instance), get_nullable($serializer_getInstance_57()), tmp0_cached[6]];
  };
  protoOf($serializer_51).s44 = function (decoder) {
    var tmp0_desc = this.tq0_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_input = decoder.i48(tmp0_desc);
    var tmp12_cached = Companion_getInstance_85().hpz_1;
    if (tmp11_input.x48()) {
      tmp4_local0 = tmp11_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp11_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp11_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp11_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp11_input.w48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp11_input.w48(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp11_input.u48(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp11_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp11_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp11_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp11_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp11_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp11_input.w48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp11_input.w48(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp11_input.u48(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp11_input.j48(tmp0_desc);
    return XapiGroup_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);
  };
  protoOf($serializer_51).uq0 = function (encoder, value) {
    var tmp0_desc = this.tq0_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_85().hpz_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.vq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.vq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.wq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.wq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.xq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.xq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.yq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.yq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.zq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.zq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.aq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, $serializer_getInstance_57(), value.aq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !equals(value.bq1_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 6, tmp2_cached[6], value.bq1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_51).r44 = function (encoder, value) {
    return this.uq0(encoder, value instanceof XapiGroup ? value : THROW_CCE());
  };
  var $serializer_instance_51;
  function $serializer_getInstance_63() {
    if ($serializer_instance_51 == null)
      new $serializer_51();
    return $serializer_instance_51;
  }
  function XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_63().tq0_1);
    }
    if (0 === (seen1 & 1))
      $this.vq0_1 = null;
    else
      $this.vq0_1 = name;
    if (0 === (seen1 & 2))
      $this.wq0_1 = null;
    else
      $this.wq0_1 = mbox;
    if (0 === (seen1 & 4))
      $this.xq0_1 = null;
    else
      $this.xq0_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.yq0_1 = null;
    else
      $this.yq0_1 = openid;
    if (0 === (seen1 & 16))
      $this.zq0_1 = null;
    else
      $this.zq0_1 = objectType;
    if (0 === (seen1 & 32))
      $this.aq1_1 = null;
    else
      $this.aq1_1 = account;
    if (0 === (seen1 & 64))
      $this.bq1_1 = emptyList();
    else
      $this.bq1_1 = member;
    return $this;
  }
  function XapiGroup_init_$Create$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker) {
    return XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, objectCreate(protoOf(XapiGroup)));
  }
  function XapiGroup(name, mbox, mbox_sha1sum, openid, objectType, account, member) {
    Companion_getInstance_85();
    name = name === VOID ? null : name;
    mbox = mbox === VOID ? null : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? null : mbox_sha1sum;
    openid = openid === VOID ? null : openid;
    objectType = objectType === VOID ? null : objectType;
    account = account === VOID ? null : account;
    member = member === VOID ? emptyList() : member;
    this.vq0_1 = name;
    this.wq0_1 = mbox;
    this.xq0_1 = mbox_sha1sum;
    this.yq0_1 = openid;
    this.zq0_1 = objectType;
    this.aq1_1 = account;
    this.bq1_1 = member;
  }
  protoOf(XapiGroup).bpz = function () {
    return this.wq0_1;
  };
  protoOf(XapiGroup).cpz = function () {
    return this.xq0_1;
  };
  protoOf(XapiGroup).dpz = function () {
    return this.yq0_1;
  };
  protoOf(XapiGroup).qpz = function () {
    return this.zq0_1;
  };
  protoOf(XapiGroup).epz = function () {
    return this.aq1_1;
  };
  protoOf(XapiGroup).toString = function () {
    return 'XapiGroup(name=' + this.vq0_1 + ', mbox=' + this.wq0_1 + ', mbox_sha1sum=' + this.xq0_1 + ', openid=' + this.yq0_1 + ', objectType=' + this.zq0_1 + ', account=' + this.aq1_1 + ', member=' + this.bq1_1 + ')';
  };
  protoOf(XapiGroup).hashCode = function () {
    var result = this.vq0_1 == null ? 0 : getStringHashCode(this.vq0_1);
    result = imul(result, 31) + (this.wq0_1 == null ? 0 : getStringHashCode(this.wq0_1)) | 0;
    result = imul(result, 31) + (this.xq0_1 == null ? 0 : getStringHashCode(this.xq0_1)) | 0;
    result = imul(result, 31) + (this.yq0_1 == null ? 0 : getStringHashCode(this.yq0_1)) | 0;
    result = imul(result, 31) + (this.zq0_1 == null ? 0 : this.zq0_1.hashCode()) | 0;
    result = imul(result, 31) + (this.aq1_1 == null ? 0 : this.aq1_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.bq1_1) | 0;
    return result;
  };
  protoOf(XapiGroup).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiGroup))
      return false;
    var tmp0_other_with_cast = other instanceof XapiGroup ? other : THROW_CCE();
    if (!(this.vq0_1 == tmp0_other_with_cast.vq0_1))
      return false;
    if (!(this.wq0_1 == tmp0_other_with_cast.wq0_1))
      return false;
    if (!(this.xq0_1 == tmp0_other_with_cast.xq0_1))
      return false;
    if (!(this.yq0_1 == tmp0_other_with_cast.yq0_1))
      return false;
    if (!equals(this.zq0_1, tmp0_other_with_cast.zq0_1))
      return false;
    if (!equals(this.aq1_1, tmp0_other_with_cast.aq1_1))
      return false;
    if (!equals(this.bq1_1, tmp0_other_with_cast.bq1_1))
      return false;
    return true;
  };
  function toGroupEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap) {
    knownActorUidToPersonUidMap = knownActorUidToPersonUidMap === VOID ? emptyMap() : knownActorUidToPersonUidMap;
    var modTime = systemTimeInMillis();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.bq1_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$0 = to(identifierHash(item, stringHasher), toActorEntity(item, stringHasher, knownActorUidToPersonUidMap));
      destination.i1(tmp$ret$0);
    }
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp = toGroupEntities$lambda;
    var tmp$ret$3 = new sam$kotlin_Comparator$0_0(tmp);
    var memberActors = sortedWith(destination, tmp$ret$3);
    var hasher = hasherFactory.gm7(new Long(0, 0));
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator_0 = memberActors.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      hasher.jm7(toByteArray(element.w6_1));
    }
    var memberHash = hasher.km7();
    var tmp_0;
    if (get_isAnonymous(_this__u8e3s4)) {
      tmp_0 = primaryKeyManager.n62(68);
    } else {
      tmp_0 = identifierHash(_this__u8e3s4, stringHasher);
    }
    var tmp2_actorUid = tmp_0;
    var tmp4_actorName = _this__u8e3s4.vq0_1;
    var tmp5_actorMbox = _this__u8e3s4.wq0_1;
    var tmp6_actorMbox_sha1sum = _this__u8e3s4.xq0_1;
    var tmp7_actorOpenid = _this__u8e3s4.yq0_1;
    var tmp0_safe_receiver = _this__u8e3s4.aq1_1;
    var tmp8_actorAccountName = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.apy_1;
    var tmp1_safe_receiver = _this__u8e3s4.aq1_1;
    var tmp9_actorAccountHomePage = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zpx_1;
    var groupActor = new ActorEntity(tmp2_actorUid, VOID, tmp4_actorName, tmp5_actorMbox, tmp6_actorMbox_sha1sum, tmp7_actorOpenid, tmp8_actorAccountName, tmp9_actorAccountHomePage, memberHash, modTime, 2);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(memberActors, 10));
    var tmp0_iterator_1 = memberActors.w();
    while (tmp0_iterator_1.f()) {
      var item_0 = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$5 = item_0.x6_1;
      destination_0.i1(tmp$ret$5);
    }
    var tmp_1 = destination_0;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(memberActors, 10));
    var tmp0_iterator_2 = memberActors.w();
    while (tmp0_iterator_2.f()) {
      var item_1 = tmp0_iterator_2.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$8 = new GroupMemberActorJoin(groupActor.uj3_1, item_1.x6_1.uj3_1, modTime);
      destination_1.i1(tmp$ret$8);
    }
    return new ActorEntities(groupActor, tmp_1, destination_1);
  }
  function get_isAnonymous(_this__u8e3s4) {
    return (_this__u8e3s4.wq0_1 == null ? _this__u8e3s4.yq0_1 == null : false) ? _this__u8e3s4.aq1_1 == null : false;
  }
  function sam$kotlin_Comparator$0_0(function_0) {
    this.cq1_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_0).pa = function (a, b) {
    return this.cq1_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
    return this.pa(a, b);
  };
  function toGroupEntities$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
    var tmp = a.w6_1;
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
    var tmp$ret$1 = b.w6_1;
    return compareValues(tmp, tmp$ret$1);
  }
  function _get_$cachedSerializer__te6jhj_0($this) {
    return $this.dq1_1.t2();
  }
  function XapiInteractionType$Companion$_anonymous__3zafad() {
    return XapiInteractionTypeSerializer_instance;
  }
  var XapiInteractionType_TrueFalse_instance;
  var XapiInteractionType_Choice_instance;
  var XapiInteractionType_FillIn_instance;
  var XapiInteractionType_LongFillIn_instance;
  var XapiInteractionType_Matching_instance;
  var XapiInteractionType_Performance_instance;
  var XapiInteractionType_Sequencing_instance;
  var XapiInteractionType_Likert_instance;
  var XapiInteractionType_Numeric_instance;
  var XapiInteractionType_Other_instance;
  function Companion_69() {
    Companion_instance_118 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.dq1_1 = lazy(tmp_0, XapiInteractionType$Companion$_anonymous__3zafad);
  }
  protoOf(Companion_69).eq1 = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = get_entries_0().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.Companion.fromJsonFieldValue.<anonymous>' call
        if (element.zpy_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? XapiInteractionType_Other_getInstance() : tmp0_elvis_lhs;
  };
  protoOf(Companion_69).n4r = function () {
    return _get_$cachedSerializer__te6jhj_0(this);
  };
  protoOf(Companion_69).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_118;
  function Companion_getInstance_86() {
    XapiInteractionType_initEntries();
    if (Companion_instance_118 == null)
      new Companion_69();
    return Companion_instance_118;
  }
  function values_1() {
    return [XapiInteractionType_TrueFalse_getInstance(), XapiInteractionType_Choice_getInstance(), XapiInteractionType_FillIn_getInstance(), XapiInteractionType_LongFillIn_getInstance(), XapiInteractionType_Matching_getInstance(), XapiInteractionType_Performance_getInstance(), XapiInteractionType_Sequencing_getInstance(), XapiInteractionType_Likert_getInstance(), XapiInteractionType_Numeric_getInstance(), XapiInteractionType_Other_getInstance()];
  }
  function get_entries_0() {
    if ($ENTRIES_0 == null)
      $ENTRIES_0 = enumEntries(values_1());
    return $ENTRIES_0;
  }
  var XapiInteractionType_entriesInitialized;
  function XapiInteractionType_initEntries() {
    if (XapiInteractionType_entriesInitialized)
      return Unit_instance;
    XapiInteractionType_entriesInitialized = true;
    XapiInteractionType_TrueFalse_instance = new XapiInteractionType('TrueFalse', 0, 'true-false', 1);
    XapiInteractionType_Choice_instance = new XapiInteractionType('Choice', 1, 'choice', 2);
    XapiInteractionType_FillIn_instance = new XapiInteractionType('FillIn', 2, 'fill-in', 3);
    XapiInteractionType_LongFillIn_instance = new XapiInteractionType('LongFillIn', 3, 'long-fill-in', 4);
    XapiInteractionType_Matching_instance = new XapiInteractionType('Matching', 4, 'matching', 5);
    XapiInteractionType_Performance_instance = new XapiInteractionType('Performance', 5, 'performance', 6);
    XapiInteractionType_Sequencing_instance = new XapiInteractionType('Sequencing', 6, 'sequencing', 7);
    XapiInteractionType_Likert_instance = new XapiInteractionType('Likert', 7, 'likert', 8);
    XapiInteractionType_Numeric_instance = new XapiInteractionType('Numeric', 8, 'numeric', 9);
    XapiInteractionType_Other_instance = new XapiInteractionType('Other', 9, 'other', 10);
    Companion_getInstance_86();
  }
  var $ENTRIES_0;
  function XapiInteractionType(name, ordinal, jsonFieldValue, dbFlag) {
    Enum.call(this, name, ordinal);
    this.zpy_1 = jsonFieldValue;
    this.apz_1 = dbFlag;
  }
  function XapiInteractionTypeSerializer() {
  }
  protoOf(XapiInteractionTypeSerializer).q44 = function () {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer_2(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    return (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).q44();
  };
  protoOf(XapiInteractionTypeSerializer).s44 = function (decoder) {
    return Companion_getInstance_86().eq1(decoder.d48());
  };
  protoOf(XapiInteractionTypeSerializer).fq1 = function (encoder, value) {
    encoder.l49(value.zpy_1);
  };
  protoOf(XapiInteractionTypeSerializer).r44 = function (encoder, value) {
    return this.fq1(encoder, value instanceof XapiInteractionType ? value : THROW_CCE());
  };
  var XapiInteractionTypeSerializer_instance;
  function XapiInteractionTypeSerializer_getInstance() {
    return XapiInteractionTypeSerializer_instance;
  }
  function XapiInteractionType_TrueFalse_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_TrueFalse_instance;
  }
  function XapiInteractionType_Choice_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Choice_instance;
  }
  function XapiInteractionType_FillIn_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_FillIn_instance;
  }
  function XapiInteractionType_LongFillIn_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_LongFillIn_instance;
  }
  function XapiInteractionType_Matching_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Matching_instance;
  }
  function XapiInteractionType_Performance_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Performance_instance;
  }
  function XapiInteractionType_Sequencing_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Sequencing_instance;
  }
  function XapiInteractionType_Likert_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Likert_instance;
  }
  function XapiInteractionType_Numeric_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Numeric_instance;
  }
  function XapiInteractionType_Other_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Other_instance;
  }
  function _get_$cachedSerializer__te6jhj_1($this) {
    return $this.gq1_1.t2();
  }
  function XapiObjectType$Companion$_anonymous__v4av7w() {
    return XapiObjectTypeSerializer_instance;
  }
  var XapiObjectType_StatementRef_instance;
  var XapiObjectType_SubStatement_instance;
  var XapiObjectType_Activity_instance;
  var XapiObjectType_Agent_instance;
  var XapiObjectType_Group_instance;
  var XapiObjectType_Statement_instance;
  function Companion_70() {
    Companion_instance_119 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.gq1_1 = lazy(tmp_0, XapiObjectType$Companion$_anonymous__v4av7w);
  }
  protoOf(Companion_70).n4r = function () {
    return _get_$cachedSerializer__te6jhj_1(this);
  };
  protoOf(Companion_70).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_119;
  function Companion_getInstance_87() {
    XapiObjectType_initEntries();
    if (Companion_instance_119 == null)
      new Companion_70();
    return Companion_instance_119;
  }
  function valueOf(value) {
    switch (value) {
      case 'StatementRef':
        return XapiObjectType_StatementRef_getInstance();
      case 'SubStatement':
        return XapiObjectType_SubStatement_getInstance();
      case 'Activity':
        return XapiObjectType_Activity_getInstance();
      case 'Agent':
        return XapiObjectType_Agent_getInstance();
      case 'Group':
        return XapiObjectType_Group_getInstance();
      case 'Statement':
        return XapiObjectType_Statement_getInstance();
      default:
        XapiObjectType_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  var XapiObjectType_entriesInitialized;
  function XapiObjectType_initEntries() {
    if (XapiObjectType_entriesInitialized)
      return Unit_instance;
    XapiObjectType_entriesInitialized = true;
    XapiObjectType_StatementRef_instance = new XapiObjectType('StatementRef', 0);
    XapiObjectType_SubStatement_instance = new XapiObjectType('SubStatement', 1);
    XapiObjectType_Activity_instance = new XapiObjectType('Activity', 2);
    XapiObjectType_Agent_instance = new XapiObjectType('Agent', 3);
    XapiObjectType_Group_instance = new XapiObjectType('Group', 4);
    XapiObjectType_Statement_instance = new XapiObjectType('Statement', 5);
    Companion_getInstance_87();
  }
  function XapiObjectType(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function XapiObjectTypeSerializer() {
  }
  protoOf(XapiObjectTypeSerializer).q44 = function () {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer_2(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    return (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).q44();
  };
  protoOf(XapiObjectTypeSerializer).s44 = function (decoder) {
    var strValue = decoder.d48();
    return valueOf(strValue);
  };
  protoOf(XapiObjectTypeSerializer).hq1 = function (encoder, value) {
    encoder.l49(value.toString());
  };
  protoOf(XapiObjectTypeSerializer).r44 = function (encoder, value) {
    return this.hq1(encoder, value instanceof XapiObjectType ? value : THROW_CCE());
  };
  var XapiObjectTypeSerializer_instance;
  function XapiObjectTypeSerializer_getInstance() {
    return XapiObjectTypeSerializer_instance;
  }
  function get_typeFlag(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.za_1) {
      case 0:
        tmp = 3;
        break;
      case 1:
        tmp = 4;
        break;
      case 2:
        tmp = 5;
        break;
      case 3:
        tmp = 1;
        break;
      case 4:
        tmp = 2;
        break;
      case 5:
        tmp = 6;
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function XapiObjectType_StatementRef_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_StatementRef_instance;
  }
  function XapiObjectType_SubStatement_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_SubStatement_instance;
  }
  function XapiObjectType_Activity_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Activity_instance;
  }
  function XapiObjectType_Agent_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Agent_instance;
  }
  function XapiObjectType_Group_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Group_instance;
  }
  function XapiObjectType_Statement_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Statement_instance;
  }
  function Companion_71() {
  }
  var Companion_instance_120;
  function Companion_getInstance_88() {
    return Companion_instance_120;
  }
  function $serializer_52() {
    $serializer_instance_52 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult.Score', this, 4);
    tmp0_serialDesc.t4f('scaled', true);
    tmp0_serialDesc.t4f('raw', true);
    tmp0_serialDesc.t4f('min', true);
    tmp0_serialDesc.t4f('max', true);
    this.iq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_52).q44 = function () {
    return this.iq1_1;
  };
  protoOf($serializer_52).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance())];
  };
  protoOf($serializer_52).s44 = function (decoder) {
    var tmp0_desc = this.iq1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.w48(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.w48(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.w48(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.w48(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return Score_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_52).jq1 = function (encoder, value) {
    var tmp0_desc = this.iq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.kq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, FloatSerializer_getInstance(), value.kq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.lq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, FloatSerializer_getInstance(), value.lq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.mq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, FloatSerializer_getInstance(), value.mq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.nq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, FloatSerializer_getInstance(), value.nq1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_52).r44 = function (encoder, value) {
    return this.jq1(encoder, value instanceof Score ? value : THROW_CCE());
  };
  var $serializer_instance_52;
  function $serializer_getInstance_64() {
    if ($serializer_instance_52 == null)
      new $serializer_52();
    return $serializer_instance_52;
  }
  function Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_64().iq1_1);
    }
    if (0 === (seen1 & 1))
      $this.kq1_1 = null;
    else
      $this.kq1_1 = scaled;
    if (0 === (seen1 & 2))
      $this.lq1_1 = null;
    else
      $this.lq1_1 = raw;
    if (0 === (seen1 & 4))
      $this.mq1_1 = null;
    else
      $this.mq1_1 = min;
    if (0 === (seen1 & 8))
      $this.nq1_1 = null;
    else
      $this.nq1_1 = max;
    return $this;
  }
  function Score_init_$Create$(seen1, scaled, raw, min, max, serializationConstructorMarker) {
    return Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, objectCreate(protoOf(Score)));
  }
  function Score(scaled, raw, min, max) {
    scaled = scaled === VOID ? null : scaled;
    raw = raw === VOID ? null : raw;
    min = min === VOID ? null : min;
    max = max === VOID ? null : max;
    this.kq1_1 = scaled;
    this.lq1_1 = raw;
    this.mq1_1 = min;
    this.nq1_1 = max;
  }
  protoOf(Score).toString = function () {
    return 'Score(scaled=' + this.kq1_1 + ', raw=' + this.lq1_1 + ', min=' + this.mq1_1 + ', max=' + this.nq1_1 + ')';
  };
  protoOf(Score).hashCode = function () {
    var result = this.kq1_1 == null ? 0 : getNumberHashCode(this.kq1_1);
    result = imul(result, 31) + (this.lq1_1 == null ? 0 : getNumberHashCode(this.lq1_1)) | 0;
    result = imul(result, 31) + (this.mq1_1 == null ? 0 : getNumberHashCode(this.mq1_1)) | 0;
    result = imul(result, 31) + (this.nq1_1 == null ? 0 : getNumberHashCode(this.nq1_1)) | 0;
    return result;
  };
  protoOf(Score).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Score))
      return false;
    var tmp0_other_with_cast = other instanceof Score ? other : THROW_CCE();
    if (!equals(this.kq1_1, tmp0_other_with_cast.kq1_1))
      return false;
    if (!equals(this.lq1_1, tmp0_other_with_cast.lq1_1))
      return false;
    if (!equals(this.mq1_1, tmp0_other_with_cast.mq1_1))
      return false;
    if (!equals(this.nq1_1, tmp0_other_with_cast.nq1_1))
      return false;
    return true;
  };
  function Companion_72() {
    Companion_instance_121 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.oq1_1 = [null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  var Companion_instance_121;
  function Companion_getInstance_89() {
    if (Companion_instance_121 == null)
      new Companion_72();
    return Companion_instance_121;
  }
  function $serializer_53() {
    $serializer_instance_53 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult', this, 6);
    tmp0_serialDesc.t4f('completion', true);
    tmp0_serialDesc.t4f('success', true);
    tmp0_serialDesc.t4f('score', true);
    tmp0_serialDesc.t4f('duration', true);
    tmp0_serialDesc.t4f('response', true);
    tmp0_serialDesc.t4f('extensions', true);
    this.pq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_53).q44 = function () {
    return this.pq1_1;
  };
  protoOf($serializer_53).k4g = function () {
    var tmp0_cached = Companion_getInstance_89().oq1_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable($serializer_getInstance_64()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[5])];
  };
  protoOf($serializer_53).s44 = function (decoder) {
    var tmp0_desc = this.pq1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.i48(tmp0_desc);
    var tmp11_cached = Companion_getInstance_89().oq1_1;
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, $serializer_getInstance_64(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, $serializer_getInstance_64(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return XapiResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_53).qq1 = function (encoder, value) {
    var tmp0_desc = this.pq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_89().oq1_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.dpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, BooleanSerializer_getInstance(), value.dpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.epw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, BooleanSerializer_getInstance(), value.epw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.fpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_64(), value.fpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.gpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.gpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.hpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.hpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.ipw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, tmp2_cached[5], value.ipw_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_53).r44 = function (encoder, value) {
    return this.qq1(encoder, value instanceof XapiResult ? value : THROW_CCE());
  };
  var $serializer_instance_53;
  function $serializer_getInstance_65() {
    if ($serializer_instance_53 == null)
      new $serializer_53();
    return $serializer_instance_53;
  }
  function XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_65().pq1_1);
    }
    if (0 === (seen1 & 1))
      $this.dpw_1 = null;
    else
      $this.dpw_1 = completion;
    if (0 === (seen1 & 2))
      $this.epw_1 = null;
    else
      $this.epw_1 = success;
    if (0 === (seen1 & 4))
      $this.fpw_1 = null;
    else
      $this.fpw_1 = score;
    if (0 === (seen1 & 8))
      $this.gpw_1 = null;
    else
      $this.gpw_1 = duration;
    if (0 === (seen1 & 16))
      $this.hpw_1 = null;
    else
      $this.hpw_1 = response;
    if (0 === (seen1 & 32))
      $this.ipw_1 = null;
    else
      $this.ipw_1 = extensions;
    return $this;
  }
  function XapiResult_init_$Create$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker) {
    return XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, objectCreate(protoOf(XapiResult)));
  }
  function XapiResult(completion, success, score, duration, response, extensions) {
    Companion_getInstance_89();
    completion = completion === VOID ? null : completion;
    success = success === VOID ? null : success;
    score = score === VOID ? null : score;
    duration = duration === VOID ? null : duration;
    response = response === VOID ? null : response;
    extensions = extensions === VOID ? null : extensions;
    this.dpw_1 = completion;
    this.epw_1 = success;
    this.fpw_1 = score;
    this.gpw_1 = duration;
    this.hpw_1 = response;
    this.ipw_1 = extensions;
  }
  protoOf(XapiResult).toString = function () {
    return 'XapiResult(completion=' + this.dpw_1 + ', success=' + this.epw_1 + ', score=' + this.fpw_1 + ', duration=' + this.gpw_1 + ', response=' + this.hpw_1 + ', extensions=' + this.ipw_1 + ')';
  };
  protoOf(XapiResult).hashCode = function () {
    var result = this.dpw_1 == null ? 0 : getBooleanHashCode(this.dpw_1);
    result = imul(result, 31) + (this.epw_1 == null ? 0 : getBooleanHashCode(this.epw_1)) | 0;
    result = imul(result, 31) + (this.fpw_1 == null ? 0 : this.fpw_1.hashCode()) | 0;
    result = imul(result, 31) + (this.gpw_1 == null ? 0 : getStringHashCode(this.gpw_1)) | 0;
    result = imul(result, 31) + (this.hpw_1 == null ? 0 : getStringHashCode(this.hpw_1)) | 0;
    result = imul(result, 31) + (this.ipw_1 == null ? 0 : hashCode(this.ipw_1)) | 0;
    return result;
  };
  protoOf(XapiResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiResult))
      return false;
    var tmp0_other_with_cast = other instanceof XapiResult ? other : THROW_CCE();
    if (!(this.dpw_1 == tmp0_other_with_cast.dpw_1))
      return false;
    if (!(this.epw_1 == tmp0_other_with_cast.epw_1))
      return false;
    if (!equals(this.fpw_1, tmp0_other_with_cast.fpw_1))
      return false;
    if (!(this.gpw_1 == tmp0_other_with_cast.gpw_1))
      return false;
    if (!(this.hpw_1 == tmp0_other_with_cast.hpw_1))
      return false;
    if (!equals(this.ipw_1, tmp0_other_with_cast.ipw_1))
      return false;
    return true;
  };
  function get_XAPI_PROGRESSED_EXTENSIONS() {
    _init_properties_XapiStatement_kt__raho1n();
    return XAPI_PROGRESSED_EXTENSIONS;
  }
  var XAPI_PROGRESSED_EXTENSIONS;
  function get_XAPI_RESULT_EXTENSION_PROGRESS() {
    return XAPI_RESULT_EXTENSION_PROGRESS;
  }
  var XAPI_RESULT_EXTENSION_PROGRESS;
  function Companion_73() {
    Companion_instance_122 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.zpt_1 = [null, null, null, null, null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_56()), null];
  }
  protoOf(Companion_73).n4r = function () {
    return $serializer_getInstance_66();
  };
  var Companion_instance_122;
  function Companion_getInstance_90() {
    if (Companion_instance_122 == null)
      new Companion_73();
    return Companion_instance_122;
  }
  function $serializer_54() {
    $serializer_instance_54 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatement', this, 12);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('actor', false);
    tmp0_serialDesc.t4f('verb', false);
    tmp0_serialDesc.t4f('object', false);
    tmp0_serialDesc.t4f('result', true);
    tmp0_serialDesc.t4f('context', true);
    tmp0_serialDesc.t4f('timestamp', true);
    tmp0_serialDesc.t4f('stored', true);
    tmp0_serialDesc.t4f('authority', true);
    tmp0_serialDesc.t4f('version', true);
    tmp0_serialDesc.t4f('attachments', true);
    tmp0_serialDesc.t4f('objectType', true);
    this.rq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_54).q44 = function () {
    return this.rq1_1;
  };
  protoOf($serializer_54).k4g = function () {
    var tmp0_cached = Companion_getInstance_90().zpt_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), XapiActorSerializer_getInstance(), $serializer_getInstance_69(), XapiStatementObjectSerializer_getInstance(), get_nullable($serializer_getInstance_65()), get_nullable($serializer_getInstance_61()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiActorSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[10]), get_nullable(XapiObjectTypeSerializer_instance)];
  };
  protoOf($serializer_54).s44 = function (decoder) {
    var tmp0_desc = this.rq1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_local11 = null;
    var tmp16_input = decoder.i48(tmp0_desc);
    var tmp17_cached = Companion_getInstance_90().zpt_1;
    if (tmp16_input.x48()) {
      tmp4_local0 = tmp16_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.u48(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.u48(tmp0_desc, 2, $serializer_getInstance_69(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.u48(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.w48(tmp0_desc, 4, $serializer_getInstance_65(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, $serializer_getInstance_61(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.w48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.w48(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.w48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.w48(tmp0_desc, 11, XapiObjectTypeSerializer_instance, tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.u48(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.u48(tmp0_desc, 2, $serializer_getInstance_69(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.u48(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.w48(tmp0_desc, 4, $serializer_getInstance_65(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, $serializer_getInstance_61(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.w48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.w48(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.w48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.w48(tmp0_desc, 11, XapiObjectTypeSerializer_instance, tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.j48(tmp0_desc);
    return XapiStatement_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, null);
  };
  protoOf($serializer_54).sq1 = function (encoder, value) {
    var tmp0_desc = this.rq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_90().zpt_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.mpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.mpt_1);
    }
    tmp1_output.y49(tmp0_desc, 1, XapiActorSerializer_getInstance(), value.npt_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_69(), value.opt_1);
    tmp1_output.y49(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), value.ppt_1);
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.qpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, $serializer_getInstance_65(), value.qpt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.rpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, $serializer_getInstance_61(), value.rpt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.spt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, StringSerializer_getInstance(), value.spt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.tpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, StringSerializer_getInstance(), value.tpt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.upt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 8, XapiActorSerializer_getInstance(), value.upt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.vpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, StringSerializer_getInstance(), value.vpt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 10) ? true : !(value.wpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 10, tmp2_cached[10], value.wpt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 11) ? true : !(value.xpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 11, XapiObjectTypeSerializer_instance, value.xpt_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_54).r44 = function (encoder, value) {
    return this.sq1(encoder, value instanceof XapiStatement ? value : THROW_CCE());
  };
  var $serializer_instance_54;
  function $serializer_getInstance_66() {
    if ($serializer_instance_54 == null)
      new $serializer_54();
    return $serializer_instance_54;
  }
  function XapiStatement_init_$Init$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker, $this) {
    if (!(14 === (14 & seen1))) {
      throwMissingFieldException(seen1, 14, $serializer_getInstance_66().rq1_1);
    }
    if (0 === (seen1 & 1))
      $this.mpt_1 = null;
    else
      $this.mpt_1 = id;
    $this.npt_1 = actor;
    $this.opt_1 = verb;
    $this.ppt_1 = object;
    if (0 === (seen1 & 16))
      $this.qpt_1 = null;
    else
      $this.qpt_1 = result;
    if (0 === (seen1 & 32))
      $this.rpt_1 = null;
    else
      $this.rpt_1 = context;
    if (0 === (seen1 & 64))
      $this.spt_1 = null;
    else
      $this.spt_1 = timestamp;
    if (0 === (seen1 & 128))
      $this.tpt_1 = null;
    else
      $this.tpt_1 = stored;
    if (0 === (seen1 & 256))
      $this.upt_1 = null;
    else
      $this.upt_1 = authority;
    if (0 === (seen1 & 512))
      $this.vpt_1 = null;
    else
      $this.vpt_1 = version;
    if (0 === (seen1 & 1024))
      $this.wpt_1 = null;
    else
      $this.wpt_1 = attachments;
    if (0 === (seen1 & 2048))
      $this.xpt_1 = null;
    else
      $this.xpt_1 = objectType;
    return $this;
  }
  function XapiStatement_init_$Create$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker) {
    return XapiStatement_init_$Init$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker, objectCreate(protoOf(XapiStatement)));
  }
  function XapiStatement(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) {
    Companion_getInstance_90();
    id = id === VOID ? null : id;
    result = result === VOID ? null : result;
    context = context === VOID ? null : context;
    timestamp = timestamp === VOID ? null : timestamp;
    stored = stored === VOID ? null : stored;
    authority = authority === VOID ? null : authority;
    version = version === VOID ? null : version;
    attachments = attachments === VOID ? null : attachments;
    objectType = objectType === VOID ? null : objectType;
    this.mpt_1 = id;
    this.npt_1 = actor;
    this.opt_1 = verb;
    this.ppt_1 = object;
    this.qpt_1 = result;
    this.rpt_1 = context;
    this.spt_1 = timestamp;
    this.tpt_1 = stored;
    this.upt_1 = authority;
    this.vpt_1 = version;
    this.wpt_1 = attachments;
    this.xpt_1 = objectType;
  }
  protoOf(XapiStatement).qpz = function () {
    return this.xpt_1;
  };
  protoOf(XapiStatement).tq1 = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) {
    return new XapiStatement(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).ypt = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, $super) {
    id = id === VOID ? this.mpt_1 : id;
    actor = actor === VOID ? this.npt_1 : actor;
    verb = verb === VOID ? this.opt_1 : verb;
    object = object === VOID ? this.ppt_1 : object;
    result = result === VOID ? this.qpt_1 : result;
    context = context === VOID ? this.rpt_1 : context;
    timestamp = timestamp === VOID ? this.spt_1 : timestamp;
    stored = stored === VOID ? this.tpt_1 : stored;
    authority = authority === VOID ? this.upt_1 : authority;
    version = version === VOID ? this.vpt_1 : version;
    attachments = attachments === VOID ? this.wpt_1 : attachments;
    objectType = objectType === VOID ? this.xpt_1 : objectType;
    return $super === VOID ? this.tq1(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) : $super.tq1.call(this, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).toString = function () {
    return 'XapiStatement(id=' + this.mpt_1 + ', actor=' + this.npt_1 + ', verb=' + this.opt_1 + ', object=' + this.ppt_1 + ', result=' + this.qpt_1 + ', context=' + this.rpt_1 + ', timestamp=' + this.spt_1 + ', stored=' + this.tpt_1 + ', authority=' + this.upt_1 + ', version=' + this.vpt_1 + ', attachments=' + this.wpt_1 + ', objectType=' + this.xpt_1 + ')';
  };
  protoOf(XapiStatement).hashCode = function () {
    var result = this.mpt_1 == null ? 0 : getStringHashCode(this.mpt_1);
    result = imul(result, 31) + hashCode(this.npt_1) | 0;
    result = imul(result, 31) + this.opt_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.ppt_1) | 0;
    result = imul(result, 31) + (this.qpt_1 == null ? 0 : this.qpt_1.hashCode()) | 0;
    result = imul(result, 31) + (this.rpt_1 == null ? 0 : this.rpt_1.hashCode()) | 0;
    result = imul(result, 31) + (this.spt_1 == null ? 0 : getStringHashCode(this.spt_1)) | 0;
    result = imul(result, 31) + (this.tpt_1 == null ? 0 : getStringHashCode(this.tpt_1)) | 0;
    result = imul(result, 31) + (this.upt_1 == null ? 0 : hashCode(this.upt_1)) | 0;
    result = imul(result, 31) + (this.vpt_1 == null ? 0 : getStringHashCode(this.vpt_1)) | 0;
    result = imul(result, 31) + (this.wpt_1 == null ? 0 : hashCode(this.wpt_1)) | 0;
    result = imul(result, 31) + (this.xpt_1 == null ? 0 : this.xpt_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiStatement).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatement))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatement ? other : THROW_CCE();
    if (!(this.mpt_1 == tmp0_other_with_cast.mpt_1))
      return false;
    if (!equals(this.npt_1, tmp0_other_with_cast.npt_1))
      return false;
    if (!this.opt_1.equals(tmp0_other_with_cast.opt_1))
      return false;
    if (!equals(this.ppt_1, tmp0_other_with_cast.ppt_1))
      return false;
    if (!equals(this.qpt_1, tmp0_other_with_cast.qpt_1))
      return false;
    if (!equals(this.rpt_1, tmp0_other_with_cast.rpt_1))
      return false;
    if (!(this.spt_1 == tmp0_other_with_cast.spt_1))
      return false;
    if (!(this.tpt_1 == tmp0_other_with_cast.tpt_1))
      return false;
    if (!equals(this.upt_1, tmp0_other_with_cast.upt_1))
      return false;
    if (!(this.vpt_1 == tmp0_other_with_cast.vpt_1))
      return false;
    if (!equals(this.wpt_1, tmp0_other_with_cast.wpt_1))
      return false;
    if (!equals(this.xpt_1, tmp0_other_with_cast.xpt_1))
      return false;
    return true;
  };
  function StatementEntities(statementEntity, statementEntityJson, actorEntities, verbEntities, activityEntities) {
    statementEntity = statementEntity === VOID ? null : statementEntity;
    statementEntityJson = statementEntityJson === VOID ? null : statementEntityJson;
    actorEntities = actorEntities === VOID ? null : actorEntities;
    verbEntities = verbEntities === VOID ? null : verbEntities;
    activityEntities = activityEntities === VOID ? null : activityEntities;
    this.cpt_1 = statementEntity;
    this.dpt_1 = statementEntityJson;
    this.ept_1 = actorEntities;
    this.fpt_1 = verbEntities;
    this.gpt_1 = activityEntities;
  }
  protoOf(StatementEntities).toString = function () {
    return 'StatementEntities(statementEntity=' + this.cpt_1 + ', statementEntityJson=' + this.dpt_1 + ', actorEntities=' + this.ept_1 + ', verbEntities=' + this.fpt_1 + ', activityEntities=' + this.gpt_1 + ')';
  };
  protoOf(StatementEntities).hashCode = function () {
    var result = this.cpt_1 == null ? 0 : this.cpt_1.hashCode();
    result = imul(result, 31) + (this.dpt_1 == null ? 0 : this.dpt_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ept_1 == null ? 0 : hashCode(this.ept_1)) | 0;
    result = imul(result, 31) + (this.fpt_1 == null ? 0 : this.fpt_1.hashCode()) | 0;
    result = imul(result, 31) + (this.gpt_1 == null ? 0 : hashCode(this.gpt_1)) | 0;
    return result;
  };
  protoOf(StatementEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementEntities))
      return false;
    var tmp0_other_with_cast = other instanceof StatementEntities ? other : THROW_CCE();
    if (!equals(this.cpt_1, tmp0_other_with_cast.cpt_1))
      return false;
    if (!equals(this.dpt_1, tmp0_other_with_cast.dpt_1))
      return false;
    if (!equals(this.ept_1, tmp0_other_with_cast.ept_1))
      return false;
    if (!equals(this.fpt_1, tmp0_other_with_cast.fpt_1))
      return false;
    if (!equals(this.gpt_1, tmp0_other_with_cast.gpt_1))
      return false;
    return true;
  };
  function toEntities_3(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, exactJson, isSubStatement, learningSpace) {
    isSubStatement = isSubStatement === VOID ? false : isSubStatement;
    _init_properties_XapiStatement_kt__raho1n();
    var tmp0_safe_receiver = _this__u8e3s4.mpt_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      tmp = uuidFrom(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('id is null');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var statementUuid = tmp_0;
    var tmp_1;
    if (isSubStatement) {
      var tmp_2 = _this__u8e3s4.ppt_1;
      tmp_1 = tmp_2 instanceof XapiStatement;
    } else {
      tmp_1 = false;
    }
    if (tmp_1)
      throw new XapiException(400, 'SubStatement cannot have another nested subs== XapiObjectType.SubStatementtatement');
    var tmp2_safe_receiver = _this__u8e3s4.rpt_1;
    var contextRegistration = xapiRequireValidUuidOrNull(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vpz_1, 'Invalid context registration uuid');
    var statementActorEntities = toEntities_0(_this__u8e3s4.npt_1, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp3_safe_receiver = _this__u8e3s4.upt_1;
    var authorityActor = tmp3_safe_receiver == null ? null : toEntities_0(tmp3_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp4_safe_receiver = _this__u8e3s4.rpt_1;
    var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.upz_1;
    var contextInstructorActorEntities = tmp5_safe_receiver == null ? null : toEntities_0(tmp5_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var statementObjectForeignKeys = objectForeignKeys(_this__u8e3s4.ppt_1, stringHasher, statementUuid);
    var tmp34_statementIdHi = statementUuid.vmd();
    var tmp35_statementIdLo = statementUuid.wmd();
    var tmp_3;
    var tmp_4;
    var tmp6_safe_receiver = _this__u8e3s4.npt_1.epz();
    if ((tmp6_safe_receiver == null ? null : tmp6_safe_receiver.zpx_1) === learningSpace.wnt_1) {
      var tmp7_safe_receiver = _this__u8e3s4.npt_1.epz();
      tmp_4 = (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.apy_1) === xapiSession.pjz_1;
    } else {
      tmp_4 = false;
    }
    if (tmp_4) {
      tmp_3 = xapiSession.njz_1;
    } else {
      tmp_3 = new Long(0, 0);
    }
    var tmp36_statementActorPersonUid = tmp_3;
    var tmp37_statementActorUid = statementActorEntities.hpt_1.uj3_1;
    var tmp9_safe_receiver = authorityActor == null ? null : authorityActor.hpt_1;
    var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.uj3_1;
    var tmp38_authorityActorUid = tmp10_elvis_lhs == null ? new Long(0, 0) : tmp10_elvis_lhs;
    var tmp39_statementVerbUid = stringHasher.hm7(xapiRequireValidIRI(_this__u8e3s4.opt_1.uq1_1, 'Statement ' + statementUuid + ' VerbID ' + _this__u8e3s4.opt_1.uq1_1 + ' is not a valid IRI'));
    var tmp11_safe_receiver = _this__u8e3s4.qpt_1;
    var tmp40_resultCompletion = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.dpw_1;
    var tmp12_safe_receiver = _this__u8e3s4.qpt_1;
    var tmp41_resultSuccess = tmp12_safe_receiver == null ? null : tmp12_safe_receiver.epw_1;
    var tmp13_safe_receiver = _this__u8e3s4.qpt_1;
    var tmp14_safe_receiver = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.fpw_1;
    var tmp42_resultScoreScaled = tmp14_safe_receiver == null ? null : tmp14_safe_receiver.kq1_1;
    var tmp15_safe_receiver = _this__u8e3s4.qpt_1;
    var tmp16_safe_receiver = tmp15_safe_receiver == null ? null : tmp15_safe_receiver.fpw_1;
    var tmp43_resultScoreRaw = tmp16_safe_receiver == null ? null : tmp16_safe_receiver.lq1_1;
    var tmp17_safe_receiver = _this__u8e3s4.qpt_1;
    var tmp18_safe_receiver = tmp17_safe_receiver == null ? null : tmp17_safe_receiver.fpw_1;
    var tmp44_resultScoreMin = tmp18_safe_receiver == null ? null : tmp18_safe_receiver.mq1_1;
    var tmp19_safe_receiver = _this__u8e3s4.qpt_1;
    var tmp20_safe_receiver = tmp19_safe_receiver == null ? null : tmp19_safe_receiver.fpw_1;
    var tmp45_resultScoreMax = tmp20_safe_receiver == null ? null : tmp20_safe_receiver.nq1_1;
    var tmp21_safe_receiver = _this__u8e3s4.qpt_1;
    var tmp46_resultDuration = xapiRequireDurationOrNullAsLong(tmp21_safe_receiver == null ? null : tmp21_safe_receiver.gpw_1);
    var tmp22_safe_receiver = _this__u8e3s4.qpt_1;
    var tmp47_resultResponse = tmp22_safe_receiver == null ? null : tmp22_safe_receiver.hpw_1;
    var tmp23_safe_receiver = _this__u8e3s4.spt_1;
    var tmp_5;
    if (tmp23_safe_receiver == null) {
      tmp_5 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      tmp_5 = xapiRequireTimestampAsLong(tmp23_safe_receiver);
    }
    var tmp24_elvis_lhs = tmp_5;
    var tmp48_timestamp = tmp24_elvis_lhs == null ? systemTimeInMillis() : tmp24_elvis_lhs;
    var tmp49_stored = systemTimeInMillis();
    var tmp26_elvis_lhs = contextRegistration == null ? null : contextRegistration.vmd();
    var tmp50_contextRegistrationHi = tmp26_elvis_lhs == null ? new Long(0, 0) : tmp26_elvis_lhs;
    var tmp28_elvis_lhs = contextRegistration == null ? null : contextRegistration.wmd();
    var tmp51_contextRegistrationLo = tmp28_elvis_lhs == null ? new Long(0, 0) : tmp28_elvis_lhs;
    var tmp29_safe_receiver = _this__u8e3s4.rpt_1;
    var tmp52_contextPlatform = tmp29_safe_receiver == null ? null : tmp29_safe_receiver.xpz_1;
    var tmp31_safe_receiver = contextInstructorActorEntities == null ? null : contextInstructorActorEntities.hpt_1;
    var tmp32_elvis_lhs = tmp31_safe_receiver == null ? null : tmp31_safe_receiver.uj3_1;
    var tmp53_contextInstructorActorUid = tmp32_elvis_lhs == null ? new Long(0, 0) : tmp32_elvis_lhs;
    var tmp54_statementContentEntryUid = xapiSession.sjz_1;
    var tmp55_statementClazzUid = xapiSession.qjz_1;
    var tmp56_statementCbUid = xapiSession.rjz_1;
    var tmp_6;
    if (isCompletionOrProgress(_this__u8e3s4)) {
      var tmp_7;
      if (xapiSession.sjz_1.equals(new Long(0, 0))) {
        tmp_7 = true;
      } else {
        var tmp_8 = _this__u8e3s4.ppt_1;
        var tmp33_safe_receiver = tmp_8 instanceof XapiActivityStatementObject ? tmp_8 : null;
        tmp_7 = (tmp33_safe_receiver == null ? null : tmp33_safe_receiver.rq0_1) === xapiSession.ujz_1;
      }
      tmp_6 = tmp_7;
    } else {
      tmp_6 = false;
    }
    var tmp57_completionOrProgress = tmp_6;
    var tmp58_extensionProgress = get_resultProgressExtension(_this__u8e3s4);
    var tmp59_statementObjectType = get_objectTypeFlag(_this__u8e3s4.ppt_1);
    var tmp60_statementObjectUid1 = statementObjectForeignKeys.w6_1;
    var tmp61_statementObjectUid2 = statementObjectForeignKeys.x6_1;
    var tmp_9 = new StatementEntity(tmp34_statementIdHi, tmp35_statementIdLo, tmp36_statementActorPersonUid, tmp39_statementVerbUid, tmp59_statementObjectType, tmp60_statementObjectUid1, tmp61_statementObjectUid2, tmp37_statementActorUid, tmp38_authorityActorUid, VOID, tmp40_resultCompletion, tmp41_resultSuccess, tmp42_resultScoreScaled, tmp43_resultScoreRaw, tmp44_resultScoreMin, tmp45_resultScoreMax, tmp46_resultDuration, tmp47_resultResponse, tmp48_timestamp, tmp49_stored, tmp50_contextRegistrationHi, tmp51_contextRegistrationLo, tmp52_contextPlatform, VOID, VOID, tmp53_contextInstructorActorUid, VOID, tmp58_extensionProgress, tmp57_completionOrProgress, tmp54_statementContentEntryUid, VOID, tmp55_statementClazzUid, tmp56_statementCbUid, VOID, isSubStatement);
    var tmp_10 = new StatementEntityJson(statementUuid.vmd(), statementUuid.wmd(), VOID, exactJson);
    // Inline function 'kotlin.collections.buildList' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildListInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = ArrayList_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
    this_0.i1(statementActorEntities);
    if (contextInstructorActorEntities == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>.<anonymous>' call
      this_0.i1(contextInstructorActorEntities);
    }
    var tmp_11 = this_0.f3();
    var tmp_12 = toVerbEntities(_this__u8e3s4.opt_1, stringHasher);
    var tmp62_safe_receiver = _this__u8e3s4.rpt_1;
    var tmp63_safe_receiver = tmp62_safe_receiver == null ? null : tmp62_safe_receiver.bq0_1;
    return plus(listOf_0(new StatementEntities(tmp_9, tmp_10, tmp_11, tmp_12, toEmptyIfNull(tmp63_safe_receiver == null ? null : toEntities_1(tmp63_safe_receiver, stringHasher, json, statementUuid)))), objectToEntities(_this__u8e3s4.ppt_1, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, statementUuid, learningSpace));
  }
  function isCompletionOrProgress(_this__u8e3s4) {
    _init_properties_XapiStatement_kt__raho1n();
    var tmp;
    var tmp0_safe_receiver = _this__u8e3s4.qpt_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dpw_1) == null)) {
      tmp = true;
    } else {
      tmp = !(get_resultProgressExtension(_this__u8e3s4) == null);
    }
    return tmp;
  }
  var properties_initialized_XapiStatement_kt_2xltj7;
  function _init_properties_XapiStatement_kt__raho1n() {
    if (!properties_initialized_XapiStatement_kt_2xltj7) {
      properties_initialized_XapiStatement_kt_2xltj7 = true;
      XAPI_PROGRESSED_EXTENSIONS = listOf(['https://w3id.org/xapi/cmi5/result/extensions/progress', 'http://w3id.org/xapi/cmi5/result/extensions/progress']);
    }
  }
  function XapiStatementObject() {
  }
  function XapiStatementObjectSerializer() {
    XapiStatementObjectSerializer_instance = this;
    JsonContentPolymorphicSerializer.call(this, getKClass(XapiStatementObject));
  }
  protoOf(XapiStatementObjectSerializer).l4r = function (element) {
    var tmp0_safe_receiver = get_jsonObject(element).ba('objectType');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_0;
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiStatementObjectSerializer.selectDeserializer.<anonymous>' call
      if (!(tmp1_safe_receiver instanceof JsonNull)) {
        tmp_0 = tmp1_safe_receiver;
      } else {
        tmp_0 = null;
      }
      tmp = tmp_0;
    }
    var tmp2_safe_receiver = tmp;
    var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g3b();
    var tmp_1;
    if (tmp3_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiStatementObjectSerializer.selectDeserializer.<anonymous>' call
      tmp_1 = valueOf(tmp3_safe_receiver);
    }
    var tmp4_elvis_lhs = tmp_1;
    var objectType = tmp4_elvis_lhs == null ? XapiObjectType_Activity_getInstance() : tmp4_elvis_lhs;
    var tmp_2;
    switch (objectType.za_1) {
      case 2:
        tmp_2 = Companion_instance_123.n4r();
        break;
      case 3:
        tmp_2 = Companion_instance_113.n4r();
        break;
      case 4:
        tmp_2 = Companion_getInstance_85().n4r();
        break;
      case 0:
        tmp_2 = Companion_instance_124.n4r();
        break;
      case 1:
        tmp_2 = Companion_getInstance_90().n4r();
        break;
      default:
        throw new XapiException(400, 'Statement object type invalid');
    }
    return tmp_2;
  };
  var XapiStatementObjectSerializer_instance;
  function XapiStatementObjectSerializer_getInstance() {
    if (XapiStatementObjectSerializer_instance == null)
      new XapiStatementObjectSerializer();
    return XapiStatementObjectSerializer_instance;
  }
  function Companion_74() {
  }
  protoOf(Companion_74).n4r = function () {
    return $serializer_getInstance_67();
  };
  var Companion_instance_123;
  function Companion_getInstance_91() {
    return Companion_instance_123;
  }
  function $serializer_55() {
    $serializer_instance_55 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivityStatementObject', this, 3);
    tmp0_serialDesc.t4f('objectType', true);
    tmp0_serialDesc.t4f('id', false);
    tmp0_serialDesc.t4f('definition', true);
    this.yq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_55).q44 = function () {
    return this.yq1_1;
  };
  protoOf($serializer_55).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(XapiObjectTypeSerializer_instance), StringSerializer_getInstance(), get_nullable($serializer_getInstance_59())];
  };
  protoOf($serializer_55).s44 = function (decoder) {
    var tmp0_desc = this.yq1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.w48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, $serializer_getInstance_59(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.w48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, $serializer_getInstance_59(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return XapiActivityStatementObject_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_55).zq1 = function (encoder, value) {
    var tmp0_desc = this.yq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.qq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.qq0_1);
    }
    tmp1_output.w49(tmp0_desc, 1, value.rq0_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.sq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_59(), value.sq0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_55).r44 = function (encoder, value) {
    return this.zq1(encoder, value instanceof XapiActivityStatementObject ? value : THROW_CCE());
  };
  var $serializer_instance_55;
  function $serializer_getInstance_67() {
    if ($serializer_instance_55 == null)
      new $serializer_55();
    return $serializer_instance_55;
  }
  function XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_67().yq1_1);
    }
    if (0 === (seen1 & 1))
      $this.qq0_1 = null;
    else
      $this.qq0_1 = objectType;
    $this.rq0_1 = id;
    if (0 === (seen1 & 4))
      $this.sq0_1 = null;
    else
      $this.sq0_1 = definition;
    return $this;
  }
  function XapiActivityStatementObject_init_$Create$(seen1, objectType, id, definition, serializationConstructorMarker) {
    return XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, objectCreate(protoOf(XapiActivityStatementObject)));
  }
  function XapiActivityStatementObject(objectType, id, definition) {
    objectType = objectType === VOID ? null : objectType;
    definition = definition === VOID ? null : definition;
    this.qq0_1 = objectType;
    this.rq0_1 = id;
    this.sq0_1 = definition;
  }
  protoOf(XapiActivityStatementObject).qpz = function () {
    return this.qq0_1;
  };
  protoOf(XapiActivityStatementObject).toString = function () {
    return 'XapiActivityStatementObject(objectType=' + this.qq0_1 + ', id=' + this.rq0_1 + ', definition=' + this.sq0_1 + ')';
  };
  protoOf(XapiActivityStatementObject).hashCode = function () {
    var result = this.qq0_1 == null ? 0 : this.qq0_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.rq0_1) | 0;
    result = imul(result, 31) + (this.sq0_1 == null ? 0 : this.sq0_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiActivityStatementObject).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiActivityStatementObject))
      return false;
    var tmp0_other_with_cast = other instanceof XapiActivityStatementObject ? other : THROW_CCE();
    if (!equals(this.qq0_1, tmp0_other_with_cast.qq0_1))
      return false;
    if (!(this.rq0_1 === tmp0_other_with_cast.rq0_1))
      return false;
    if (!equals(this.sq0_1, tmp0_other_with_cast.sq0_1))
      return false;
    return true;
  };
  function objectForeignKeys(_this__u8e3s4, stringHasher, statementUuid) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = new Pair(stringHasher.hm7(_this__u8e3s4.rq0_1), new Long(0, 0));
    } else {
      if (_this__u8e3s4 instanceof XapiAgent) {
        tmp = new Pair(identifierHash(_this__u8e3s4, stringHasher), new Long(0, 0));
      } else {
        if (_this__u8e3s4 instanceof XapiGroup) {
          tmp = new Pair(identifierHash(_this__u8e3s4, stringHasher), new Long(0, 0));
        } else {
          if (_this__u8e3s4 instanceof XapiStatementRef) {
            var uuid = uuidFrom(_this__u8e3s4.bq2_1);
            tmp = new Pair(uuid.vmd(), uuid.wmd());
          } else {
            if (_this__u8e3s4 instanceof XapiStatement) {
              var tmp_0 = statementUuid.vmd();
              // Inline function 'kotlin.Long.plus' call
              var tmp$ret$0 = statementUuid.wmd().lc(toLong(1));
              tmp = new Pair(tmp_0, tmp$ret$0);
            } else {
              noWhenBranchMatchedException();
            }
          }
        }
      }
    }
    return tmp;
  }
  function objectToEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, parentStatementUuid, learningSpace) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = listOf_0(new StatementEntities(VOID, VOID, VOID, VOID, listOf_0(toEntities(_this__u8e3s4.sq0_1, _this__u8e3s4.rq0_1, stringHasher, json))));
    } else {
      if (isInterface(_this__u8e3s4, XapiActor)) {
        tmp = listOf_0(new StatementEntities(VOID, VOID, listOf_0(toEntities_0(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap))));
      } else {
        if (_this__u8e3s4 instanceof XapiStatementRef) {
          tmp = emptyList();
        } else {
          if (_this__u8e3s4 instanceof XapiStatement) {
            var tmp_0 = parentStatementUuid.vmd();
            // Inline function 'kotlin.Long.plus' call
            var tmp$ret$0 = parentStatementUuid.wmd().lc(toLong(1));
            tmp = toEntities_3(_this__u8e3s4.ypt(Uuid_init_$Create$(tmp_0, tmp$ret$0).toString()), stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, null, true, learningSpace);
          } else {
            throw IllegalStateException_init_$Create$('This cant really happen. The compiler does not recognize XapiActor as covering XapiGroup and XapiAgent, but it does.');
          }
        }
      }
    }
    return tmp;
  }
  function get_objectTypeFlag(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.qpz();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_typeFlag(tmp0_safe_receiver);
    var tmp;
    if (tmp1_elvis_lhs == null) {
      tmp = 5;
    } else {
      tmp = tmp1_elvis_lhs;
    }
    return tmp;
  }
  function Companion_75() {
  }
  protoOf(Companion_75).n4r = function () {
    return $serializer_getInstance_68();
  };
  var Companion_instance_124;
  function Companion_getInstance_92() {
    return Companion_instance_124;
  }
  function $serializer_56() {
    $serializer_instance_56 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatementRef', this, 2);
    tmp0_serialDesc.t4f('objectType', false);
    tmp0_serialDesc.t4f('id', false);
    this.cq2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_56).q44 = function () {
    return this.cq2_1;
  };
  protoOf($serializer_56).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [XapiObjectTypeSerializer_instance, StringSerializer_getInstance()];
  };
  protoOf($serializer_56).s44 = function (decoder) {
    var tmp0_desc = this.cq2_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return XapiStatementRef_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_56).dq2 = function (encoder, value) {
    var tmp0_desc = this.cq2_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.aq2_1);
    tmp1_output.w49(tmp0_desc, 1, value.bq2_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_56).r44 = function (encoder, value) {
    return this.dq2(encoder, value instanceof XapiStatementRef ? value : THROW_CCE());
  };
  var $serializer_instance_56;
  function $serializer_getInstance_68() {
    if ($serializer_instance_56 == null)
      new $serializer_56();
    return $serializer_instance_56;
  }
  function XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_68().cq2_1);
    }
    $this.aq2_1 = objectType;
    $this.bq2_1 = id;
    return $this;
  }
  function XapiStatementRef_init_$Create$(seen1, objectType, id, serializationConstructorMarker) {
    return XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, objectCreate(protoOf(XapiStatementRef)));
  }
  function XapiStatementRef() {
  }
  protoOf(XapiStatementRef).qpz = function () {
    return this.aq2_1;
  };
  protoOf(XapiStatementRef).toString = function () {
    return 'XapiStatementRef(objectType=' + this.aq2_1 + ', id=' + this.bq2_1 + ')';
  };
  protoOf(XapiStatementRef).hashCode = function () {
    var result = this.aq2_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.bq2_1) | 0;
    return result;
  };
  protoOf(XapiStatementRef).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatementRef))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatementRef ? other : THROW_CCE();
    if (!this.aq2_1.equals(tmp0_other_with_cast.aq2_1))
      return false;
    if (!(this.bq2_1 === tmp0_other_with_cast.bq2_1))
      return false;
    return true;
  };
  function Companion_76() {
    Companion_instance_125 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.eq2_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  var Companion_instance_125;
  function Companion_getInstance_93() {
    if (Companion_instance_125 == null)
      new Companion_76();
    return Companion_instance_125;
  }
  function $serializer_57() {
    $serializer_instance_57 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiVerb', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('display', true);
    this.fq2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_57).q44 = function () {
    return this.fq2_1;
  };
  protoOf($serializer_57).k4g = function () {
    var tmp0_cached = Companion_getInstance_93().eq2_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1])];
  };
  protoOf($serializer_57).s44 = function (decoder) {
    var tmp0_desc = this.fq2_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_93().eq2_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return XapiVerb_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_57).gq2 = function (encoder, value) {
    var tmp0_desc = this.fq2_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_93().eq2_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.uq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.uq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.vq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.vq1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_57).r44 = function (encoder, value) {
    return this.gq2(encoder, value instanceof XapiVerb ? value : THROW_CCE());
  };
  var $serializer_instance_57;
  function $serializer_getInstance_69() {
    if ($serializer_instance_57 == null)
      new $serializer_57();
    return $serializer_instance_57;
  }
  function XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_69().fq2_1);
    }
    if (0 === (seen1 & 1))
      $this.uq1_1 = null;
    else
      $this.uq1_1 = id;
    if (0 === (seen1 & 2))
      $this.vq1_1 = null;
    else
      $this.vq1_1 = display;
    return $this;
  }
  function XapiVerb_init_$Create$(seen1, id, display, serializationConstructorMarker) {
    return XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, objectCreate(protoOf(XapiVerb)));
  }
  function XapiVerb(id, display) {
    Companion_getInstance_93();
    id = id === VOID ? null : id;
    display = display === VOID ? null : display;
    this.uq1_1 = id;
    this.vq1_1 = display;
  }
  protoOf(XapiVerb).toString = function () {
    return 'XapiVerb(id=' + this.uq1_1 + ', display=' + this.vq1_1 + ')';
  };
  protoOf(XapiVerb).hashCode = function () {
    var result = this.uq1_1 == null ? 0 : getStringHashCode(this.uq1_1);
    result = imul(result, 31) + (this.vq1_1 == null ? 0 : hashCode(this.vq1_1)) | 0;
    return result;
  };
  protoOf(XapiVerb).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiVerb))
      return false;
    var tmp0_other_with_cast = other instanceof XapiVerb ? other : THROW_CCE();
    if (!(this.uq1_1 == tmp0_other_with_cast.uq1_1))
      return false;
    if (!equals(this.vq1_1, tmp0_other_with_cast.vq1_1))
      return false;
    return true;
  };
  function get_VERB_COMPLETED() {
    return VERB_COMPLETED;
  }
  var VERB_COMPLETED;
  function VerbEntities(verbEntity, verbLangMapEntries) {
    this.kpt_1 = verbEntity;
    this.lpt_1 = verbLangMapEntries;
  }
  protoOf(VerbEntities).toString = function () {
    return 'VerbEntities(verbEntity=' + this.kpt_1 + ', verbLangMapEntries=' + this.lpt_1 + ')';
  };
  protoOf(VerbEntities).hashCode = function () {
    var result = this.kpt_1.hashCode();
    result = imul(result, 31) + hashCode(this.lpt_1) | 0;
    return result;
  };
  protoOf(VerbEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VerbEntities))
      return false;
    var tmp0_other_with_cast = other instanceof VerbEntities ? other : THROW_CCE();
    if (!this.kpt_1.equals(tmp0_other_with_cast.kpt_1))
      return false;
    if (!equals(this.lpt_1, tmp0_other_with_cast.lpt_1))
      return false;
    return true;
  };
  function toVerbEntities(_this__u8e3s4, xxHasher) {
    var verbIri = xapiRequireValidIRI(_this__u8e3s4.uq1_1);
    var verbUid = xxHasher.hm7(verbIri);
    var tmp = new VerbEntity(verbUid, _this__u8e3s4.uq1_1);
    var tmp0_safe_receiver = _this__u8e3s4.vq1_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q2();
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
      var tmp0_iterator = tmp1_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toVerbEntities.<anonymous>' call
        var tmp0_vlmeLangHash = xxHasher.hm7(item.s2());
        var tmp1_vlmeEntryString = item.t2();
        var tmp2_vlmeLangCode = item.s2();
        var tmp$ret$0 = new VerbLangMapEntry(verbUid, tmp0_vlmeLangHash, tmp2_vlmeLangCode, tmp1_vlmeEntryString);
        destination.i1(tmp$ret$0);
      }
      tmp_0 = destination;
    }
    var tmp2_elvis_lhs = tmp_0;
    return new VerbEntities(tmp, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
  }
  function get_VERB_PROGRESSED() {
    return VERB_PROGRESSED;
  }
  var VERB_PROGRESSED;
  function createXapiStatement($this, totalDuration, progress, isComplete) {
    var tmp = agent($this.kq2_1, $this.nq2_1);
    var tmp_0;
    if (isComplete === true) {
      tmp_0 = get_VERB_COMPLETED();
    } else {
      tmp_0 = get_VERB_PROGRESSED();
    }
    var tmp_1 = new XapiVerb(tmp_0);
    var tmp_2 = $this.mq2_1();
    // Inline function 'kotlin.time.Companion.milliseconds' call
    Companion_getInstance_8();
    var tmp$ret$0 = toDuration(totalDuration, DurationUnit_MILLISECONDS_getInstance());
    return new XapiStatement(VOID, tmp, tmp_1, tmp_2, new XapiResult(isComplete, VOID, VOID, Duration__toIsoString_impl_9h6wsm(tmp$ret$0), VOID, mapOf_0(to(get_XAPI_RESULT_EXTENSION_PROGRESS(), JsonPrimitive(progress)))));
  }
  function createFinalStatement($this) {
    $this.sq2(false);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = $this.oq2_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.createFinalStatement.<anonymous>' call
        var upd = new Long(0, 0);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          tmp$ret$1 = cur;
          break $l$block;
        }
      }
    }
    var usageDurationVal = tmp$ret$1;
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_1 = $this.pq2_1;
      while (true) {
        var cur_0 = this_1.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.createFinalStatement.<anonymous>' call
        var upd_0 = 0;
        if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
          tmp$ret$3 = cur_0;
          break $l$block_0;
        }
      }
    }
    var maxProgressVal = tmp$ret$3;
    return createXapiStatement($this, usageDurationVal, maxProgressVal, false);
  }
  function NonInteractiveContentXapiStatementRecorder$onActiveChanged$lambda($active) {
    return function () {
      return 'ContentUsageStatementRecorder: active=' + $active;
    };
  }
  function NonInteractiveContentXapiStatementRecorder$onComplete$lambda() {
    return 'ContentUsageStatementRecorder: completed';
  }
  function NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this$0, $usageDurationVal, $timeSinceActive, resultContinuation) {
    this.bq3_1 = this$0;
    this.cq3_1 = $usageDurationVal;
    this.dq3_1 = $timeSinceActive;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.bq3_1.jq2_1.wok(listOf_0(createXapiStatement(this.bq3_1, this.cq3_1.lc(this.dq3_1), 100, true)), this.bq3_1.kq2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).v1m = function ($this$launch, completion) {
    var i = new NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this.bq3_1, this.cq3_1, this.dq3_1, completion);
    i.eq3_1 = $this$launch;
    return i;
  };
  function NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this$0, $usageDurationVal, $timeSinceActive, resultContinuation) {
    var i = new NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this$0, $usageDurationVal, $timeSinceActive, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function NonInteractiveContentXapiStatementRecorder(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, xapiSession, scope, xapiActivityProvider, learningSpace) {
    this.hq2_1 = saveStatementOnClearUseCase;
    this.iq2_1 = saveStatementOnUnloadUseCase;
    this.jq2_1 = xapiStatementResource;
    this.kq2_1 = xapiSession;
    this.lq2_1 = scope;
    this.mq2_1 = xapiActivityProvider;
    this.nq2_1 = learningSpace;
    this.oq2_1 = atomic$long$1(new Long(0, 0));
    this.pq2_1 = atomic$int$1(0);
    this.qq2_1 = atomic$long$1(new Long(0, 0));
    this.rq2_1 = atomic$boolean$1(false);
  }
  protoOf(NonInteractiveContentXapiStatementRecorder).sq2 = function (active) {
    var tmp = Napier_getInstance();
    tmp.e5e(VOID, VOID, NonInteractiveContentXapiStatementRecorder$onActiveChanged$lambda(active));
    if (active) {
      $l$block: {
        // Inline function 'kotlinx.atomicfu.update' call
        var this_0 = this.qq2_1;
        while (true) {
          var cur = this_0.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
          var upd = cur.equals(new Long(0, 0)) ? systemTimeInMillis() : cur;
          if (this_0.atomicfu$compareAndSet(cur, upd)) {
            break $l$block;
          }
        }
      }
    } else {
      var tmp$ret$3;
      $l$block_0: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_1 = this.qq2_1;
        while (true) {
          var cur_0 = this_1.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
          var upd_0 = new Long(0, 0);
          if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
            tmp$ret$3 = cur_0;
            break $l$block_0;
          }
        }
      }
      var activeStarted = tmp$ret$3;
      if (!activeStarted.equals(new Long(0, 0))) {
        $l$block_1: {
          // Inline function 'kotlinx.atomicfu.update' call
          var this_2 = this.oq2_1;
          while (true) {
            var cur_1 = this_2.kotlinx$atomicfu$value;
            // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
            var upd_1 = cur_1.lc(systemTimeInMillis().mc(activeStarted));
            if (this_2.atomicfu$compareAndSet(cur_1, upd_1)) {
              break $l$block_1;
            }
          }
        }
      }
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).fq3 = function (progress) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.pq2_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onProgressed.<anonymous>' call
        // Inline function 'kotlin.comparisons.maxOf' call
        var upd = Math.max(cur, progress);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).gq3 = function (oneCompletionStatementOnly) {
    var tmp = Napier_getInstance();
    tmp.e5e(VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$lambda);
    var tmp_0;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = this.rq2_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
        var upd = true;
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          tmp$ret$1 = cur;
          break $l$block;
        }
      }
    }
    if (!tmp$ret$1) {
      tmp_0 = true;
    } else {
      tmp_0 = !oneCompletionStatementOnly;
    }
    if (tmp_0) {
      var tmp$ret$3;
      $l$block_0: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_1 = this.oq2_1;
        while (true) {
          var cur_0 = this_1.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
          var upd_0 = new Long(0, 0);
          if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
            tmp$ret$3 = cur_0;
            break $l$block_0;
          }
        }
      }
      var usageDurationVal = tmp$ret$3;
      var tmp$ret$5;
      $l$block_1: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_2 = this.qq2_1;
        while (true) {
          var cur_1 = this_2.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
          var upd_1 = new Long(0, 0);
          if (this_2.atomicfu$compareAndSet(cur_1, upd_1)) {
            tmp$ret$5 = cur_1;
            break $l$block_1;
          }
        }
      }
      var activeStartTimeVal = tmp$ret$5;
      var tmp_1;
      if (!activeStartTimeVal.equals(new Long(0, 0))) {
        tmp_1 = systemTimeInMillis().mc(activeStartTimeVal);
      } else {
        tmp_1 = new Long(0, 0);
      }
      var timeSinceActive = tmp_1;
      $l$block_2: {
        // Inline function 'kotlinx.atomicfu.update' call
        var this_3 = this.pq2_1;
        while (true) {
          var cur_2 = this_3.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
          var upd_2 = 0;
          if (this_3.atomicfu$compareAndSet(cur_2, upd_2)) {
            break $l$block_2;
          }
        }
      }
      launch(this.lq2_1, VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this, usageDurationVal, timeSinceActive, null));
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).um7 = function () {
    this.hq2_1.hq3(listOf_0(createFinalStatement(this)), this.kq2_1);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).iq3 = function () {
    var tmp0_safe_receiver = this.iq2_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.hq3(listOf_0(createFinalStatement(this)), this.kq2_1);
    }
  };
  function NonInteractiveContentXapiStatementRecorderFactory(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, learningSpace) {
    this.jq3_1 = saveStatementOnClearUseCase;
    this.kq3_1 = saveStatementOnUnloadUseCase;
    this.lq3_1 = xapiStatementResource;
    this.mq3_1 = learningSpace;
  }
  protoOf(NonInteractiveContentXapiStatementRecorderFactory).nq3 = function (xapiSession, scope, xapiActivityProvider) {
    return new NonInteractiveContentXapiStatementRecorder(this.jq3_1, this.kq3_1, this.lq3_1, xapiSession, scope, xapiActivityProvider, this.mq3_1);
  };
  function SaveStatementOnClearUseCase() {
  }
  function SaveStatementOnUnloadUseCase() {
  }
  function Companion_77() {
    Companion_instance_126 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.oq3_1 = [new ArrayListSerializer($serializer_getInstance_66()), null];
  }
  protoOf(Companion_77).n4r = function () {
    return $serializer_getInstance_70();
  };
  var Companion_instance_126;
  function Companion_getInstance_94() {
    if (Companion_instance_126 == null)
      new Companion_77();
    return Companion_instance_126;
  }
  function $serializer_58() {
    $serializer_instance_58 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.savestatementonclear.XapiStatementsAndSession', this, 2);
    tmp0_serialDesc.t4f('statements', false);
    tmp0_serialDesc.t4f('session', false);
    this.pq3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_58).q44 = function () {
    return this.pq3_1;
  };
  protoOf($serializer_58).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_94().oq3_1[0], $serializer_getInstance_6()];
  };
  protoOf($serializer_58).s44 = function (decoder) {
    var tmp0_desc = this.pq3_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_94().oq3_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, $serializer_getInstance_6(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, $serializer_getInstance_6(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return XapiStatementsAndSession_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_58).qq3 = function (encoder, value) {
    var tmp0_desc = this.pq3_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_94().oq3_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.rq3_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_6(), value.sq3_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_58).r44 = function (encoder, value) {
    return this.qq3(encoder, value instanceof XapiStatementsAndSession ? value : THROW_CCE());
  };
  var $serializer_instance_58;
  function $serializer_getInstance_70() {
    if ($serializer_instance_58 == null)
      new $serializer_58();
    return $serializer_instance_58;
  }
  function XapiStatementsAndSession_init_$Init$(seen1, statements, session, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_70().pq3_1);
    }
    $this.rq3_1 = statements;
    $this.sq3_1 = session;
    return $this;
  }
  function XapiStatementsAndSession_init_$Create$(seen1, statements, session, serializationConstructorMarker) {
    return XapiStatementsAndSession_init_$Init$(seen1, statements, session, serializationConstructorMarker, objectCreate(protoOf(XapiStatementsAndSession)));
  }
  function XapiStatementsAndSession(statements, session) {
    Companion_getInstance_94();
    this.rq3_1 = statements;
    this.sq3_1 = session;
  }
  protoOf(XapiStatementsAndSession).toString = function () {
    return 'XapiStatementsAndSession(statements=' + this.rq3_1 + ', session=' + this.sq3_1 + ')';
  };
  protoOf(XapiStatementsAndSession).hashCode = function () {
    var result = hashCode(this.rq3_1);
    result = imul(result, 31) + this.sq3_1.hashCode() | 0;
    return result;
  };
  protoOf(XapiStatementsAndSession).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatementsAndSession))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatementsAndSession ? other : THROW_CCE();
    if (!equals(this.rq3_1, tmp0_other_with_cast.rq3_1))
      return false;
    if (!this.sq3_1.equals(tmp0_other_with_cast.sq3_1))
      return false;
    return true;
  };
  function ResumeOrStartXapiSessionUseCase() {
  }
  function UstadMobileConstants() {
    UstadMobileConstants_instance = this;
    this.tq3_1 = 'UTF-8';
    this.uq3_1 = 0;
    this.vq3_1 = 'UTC';
    this.wq3_1 = mapOf([to('en', 'English'), to('tg', '\u0422\u043E\u04B7\u0438\u043A\u04E3'), to('ps', '\u067E\u069A\u062A\u0648'), to('fa', '\u062F\u0631\u06CC'), to('ar', '\u0627\u0644\u0639\u0631\u0628\u064A\u0629'), to('bn', '\u09AC\u09BE\u0982\u09B2\u09BE'), to('ne', '\u0928\u0947\u092A\u093E\u0932\u0940'), to('my', '\u1019\u103C\u1014\u103A\u1019\u102C\u1005\u102C'), to('ru', '\u0420\u0443\u0441\u0441\u043A\u0438\u0439'), to('rw', 'Kinyarwanda')]);
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.xq3_1 = ['ar', 'arc', 'dv', 'fa', 'ha', 'he', 'khw', 'ks', 'ku', 'ps', 'ur', 'yi'];
    this.yq3_1 = 13;
    this.zq3_1 = 18;
    this.aq4_1 = 10000;
    this.bq4_1 = 512;
  }
  var UstadMobileConstants_instance;
  function UstadMobileConstants_getInstance() {
    if (UstadMobileConstants_instance == null)
      new UstadMobileConstants();
    return UstadMobileConstants_instance;
  }
  function Companion_78() {
    Companion_instance_127 = this;
    this.cq4_1 = new UstadGoOptions(null, false);
  }
  var Companion_instance_127;
  function Companion_getInstance_95() {
    if (Companion_instance_127 == null)
      new Companion_78();
    return Companion_instance_127;
  }
  function UstadGoOptions(popUpToViewName, popUpToInclusive, clearStack, serializer) {
    Companion_getInstance_95();
    popUpToViewName = popUpToViewName === VOID ? null : popUpToViewName;
    popUpToInclusive = popUpToInclusive === VOID ? false : popUpToInclusive;
    clearStack = clearStack === VOID ? false : clearStack;
    serializer = serializer === VOID ? null : serializer;
    this.dq4_1 = popUpToViewName;
    this.eq4_1 = popUpToInclusive;
    this.fq4_1 = clearStack;
    this.gq4_1 = serializer;
  }
  protoOf(UstadGoOptions).toString = function () {
    return 'UstadGoOptions(popUpToViewName=' + this.dq4_1 + ', popUpToInclusive=' + this.eq4_1 + ', clearStack=' + this.fq4_1 + ', serializer=' + this.gq4_1 + ')';
  };
  protoOf(UstadGoOptions).hashCode = function () {
    var result = this.dq4_1 == null ? 0 : getStringHashCode(this.dq4_1);
    result = imul(result, 31) + getBooleanHashCode(this.eq4_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fq4_1) | 0;
    result = imul(result, 31) + (this.gq4_1 == null ? 0 : hashCode(this.gq4_1)) | 0;
    return result;
  };
  protoOf(UstadGoOptions).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadGoOptions))
      return false;
    var tmp0_other_with_cast = other instanceof UstadGoOptions ? other : THROW_CCE();
    if (!(this.dq4_1 == tmp0_other_with_cast.dq4_1))
      return false;
    if (!(this.eq4_1 === tmp0_other_with_cast.eq4_1))
      return false;
    if (!(this.fq4_1 === tmp0_other_with_cast.fq4_1))
      return false;
    if (!equals(this.gq4_1, tmp0_other_with_cast.gq4_1))
      return false;
    return true;
  };
  function UiLanguage(langCode, langDisplay) {
    this.hq4_1 = langCode;
    this.iq4_1 = langDisplay;
  }
  protoOf(UiLanguage).toString = function () {
    return 'UiLanguage(langCode=' + this.hq4_1 + ', langDisplay=' + this.iq4_1 + ')';
  };
  protoOf(UiLanguage).hashCode = function () {
    var result = getStringHashCode(this.hq4_1);
    result = imul(result, 31) + getStringHashCode(this.iq4_1) | 0;
    return result;
  };
  protoOf(UiLanguage).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UiLanguage))
      return false;
    var tmp0_other_with_cast = other instanceof UiLanguage ? other : THROW_CCE();
    if (!(this.hq4_1 === tmp0_other_with_cast.hq4_1))
      return false;
    if (!(this.iq4_1 === tmp0_other_with_cast.iq4_1))
      return false;
    return true;
  };
  function Companion_79() {
    Companion_instance_128 = this;
    this.jq4_1 = mapOf([to('image/jpg', 'jpg'), to('image/jpg', 'jpg'), to('image/jpeg', 'jpg'), to('image/png', 'png'), to('image/gif', 'gif'), to('image/svg', 'svg'), to('application/epub+zip', 'epub')]);
    var tmp = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_0 = this.jq4_1.q2();
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination = LinkedHashMap_init_$Create$_0(capacity);
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.Companion.MIME_TYPES_REVERSE.<anonymous>' call
      var tmp_0 = element.t2();
      // Inline function 'com.ustadmobile.core.impl.Companion.MIME_TYPES_REVERSE.<anonymous>' call
      var tmp$ret$1 = element.s2();
      destination.s(tmp_0, tmp$ret$1);
    }
    tmp.kq4_1 = destination;
    this.lq4_1 = 'ustadmobileContent';
    this.mq4_1 = '';
    this.PREFKEY_LOCALE = 'locale';
    this.nq4_1 = 2;
    this.oq4_1 = 4;
    this.pq4_1 = 'ref';
    this.qq4_1 = 67108864;
    this.rq4_1 = 'dlenabled';
    this.sq4_1 = 16;
    this.tq4_1 = 32;
    this.uq4_1 = 64;
    this.vq4_1 = 'umclient';
    this.wq4_1 = '/umapp/#/';
    this.xq4_1 = 'sitedata';
    this.yq4_1 = 'container';
    this.zq4_1 = 'attachments';
    this.aq5_1 = 'rootViewName';
    this.bq5_1 = 'client_id';
  }
  protoOf(Companion_79).cq5 = function () {
    return this.PREFKEY_LOCALE;
  };
  var Companion_instance_128;
  function Companion_getInstance_96() {
    if (Companion_instance_128 == null)
      new Companion_79();
    return Companion_instance_128;
  }
  function UstadMobileSystemCommon(settings, langConfig) {
    Companion_getInstance_96();
    this.dq5_1 = settings;
    this.eq5_1 = langConfig;
    this.fq5_1 = null;
  }
  protoOf(UstadMobileSystemCommon).gq5 = function () {
    Companion_getInstance_140();
    return 'CourseListHome';
  };
  protoOf(UstadMobileSystemCommon).hq5 = function () {
    // Inline function 'kotlin.collections.associateWith' call
    var this_0 = values();
    var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_0.length), 16));
    // Inline function 'kotlin.collections.associateWithTo' call
    var inductionVariable = 0;
    var last = this_0.length;
    while (inductionVariable < last) {
      var element = this_0[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.impl.UstadMobileSystemCommon.getDayOfWeekStrings.<anonymous>' call
      var tmp$ret$0 = this.moj(get_dayStringResource(element));
      result.s(element, tmp$ret$0);
    }
    return result;
  };
  function ActionBarButtonUiState$_init_$lambda_4nqccj() {
    return Unit_instance;
  }
  function ActionBarButtonUiState(visible, text, enabled, onClick) {
    visible = visible === VOID ? false : visible;
    text = text === VOID ? null : text;
    enabled = enabled === VOID ? true : enabled;
    var tmp;
    if (onClick === VOID) {
      tmp = ActionBarButtonUiState$_init_$lambda_4nqccj;
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    this.iq5_1 = visible;
    this.jq5_1 = text;
    this.kq5_1 = enabled;
    this.lq5_1 = onClick;
  }
  protoOf(ActionBarButtonUiState).mq5 = function (visible, text, enabled, onClick) {
    return new ActionBarButtonUiState(visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).nq5 = function (visible, text, enabled, onClick, $super) {
    visible = visible === VOID ? this.iq5_1 : visible;
    text = text === VOID ? this.jq5_1 : text;
    enabled = enabled === VOID ? this.kq5_1 : enabled;
    onClick = onClick === VOID ? this.lq5_1 : onClick;
    return $super === VOID ? this.mq5(visible, text, enabled, onClick) : $super.mq5.call(this, visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).toString = function () {
    return 'ActionBarButtonUiState(visible=' + this.iq5_1 + ', text=' + this.jq5_1 + ', enabled=' + this.kq5_1 + ', onClick=' + this.lq5_1 + ')';
  };
  protoOf(ActionBarButtonUiState).hashCode = function () {
    var result = getBooleanHashCode(this.iq5_1);
    result = imul(result, 31) + (this.jq5_1 == null ? 0 : getStringHashCode(this.jq5_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kq5_1) | 0;
    result = imul(result, 31) + hashCode(this.lq5_1) | 0;
    return result;
  };
  protoOf(ActionBarButtonUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActionBarButtonUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ActionBarButtonUiState ? other : THROW_CCE();
    if (!(this.iq5_1 === tmp0_other_with_cast.iq5_1))
      return false;
    if (!(this.jq5_1 == tmp0_other_with_cast.jq5_1))
      return false;
    if (!(this.kq5_1 === tmp0_other_with_cast.kq5_1))
      return false;
    if (!equals(this.lq5_1, tmp0_other_with_cast.lq5_1))
      return false;
    return true;
  };
  function AppActionButton(icon, contentDescription, onClick, id) {
    this.oq5_1 = icon;
    this.pq5_1 = contentDescription;
    this.qq5_1 = onClick;
    this.rq5_1 = id;
  }
  protoOf(AppActionButton).toString = function () {
    return 'AppActionButton(icon=' + this.oq5_1 + ', contentDescription=' + this.pq5_1 + ', onClick=' + this.qq5_1 + ', id=' + this.rq5_1 + ')';
  };
  protoOf(AppActionButton).hashCode = function () {
    var result = this.oq5_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.pq5_1) | 0;
    result = imul(result, 31) + hashCode(this.qq5_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.rq5_1) | 0;
    return result;
  };
  protoOf(AppActionButton).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppActionButton))
      return false;
    var tmp0_other_with_cast = other instanceof AppActionButton ? other : THROW_CCE();
    if (!this.oq5_1.equals(tmp0_other_with_cast.oq5_1))
      return false;
    if (!(this.pq5_1 === tmp0_other_with_cast.pq5_1))
      return false;
    if (!equals(this.qq5_1, tmp0_other_with_cast.qq5_1))
      return false;
    if (!(this.rq5_1 === tmp0_other_with_cast.rq5_1))
      return false;
    return true;
  };
  var AppBarColors_STANDARD_instance;
  var AppBarColors_SELECTION_MODE_instance;
  var AppBarColors_entriesInitialized;
  function AppBarColors_initEntries() {
    if (AppBarColors_entriesInitialized)
      return Unit_instance;
    AppBarColors_entriesInitialized = true;
    AppBarColors_STANDARD_instance = new AppBarColors('STANDARD', 0);
    AppBarColors_SELECTION_MODE_instance = new AppBarColors('SELECTION_MODE', 1);
  }
  function AppBarColors(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function AppBarColors_STANDARD_getInstance() {
    AppBarColors_initEntries();
    return AppBarColors_STANDARD_instance;
  }
  function AppBarColors_SELECTION_MODE_getInstance() {
    AppBarColors_initEntries();
    return AppBarColors_SELECTION_MODE_instance;
  }
  function AppBarSearchUiState$_init_$lambda_rwjni0(it) {
    return Unit_instance;
  }
  function AppBarSearchUiState(visible, searchText, onSearchTextChanged) {
    visible = visible === VOID ? false : visible;
    searchText = searchText === VOID ? '' : searchText;
    var tmp;
    if (onSearchTextChanged === VOID) {
      tmp = AppBarSearchUiState$_init_$lambda_rwjni0;
    } else {
      tmp = onSearchTextChanged;
    }
    onSearchTextChanged = tmp;
    this.sq5_1 = visible;
    this.tq5_1 = searchText;
    this.uq5_1 = onSearchTextChanged;
  }
  protoOf(AppBarSearchUiState).vq5 = function (visible, searchText, onSearchTextChanged) {
    return new AppBarSearchUiState(visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).wq5 = function (visible, searchText, onSearchTextChanged, $super) {
    visible = visible === VOID ? this.sq5_1 : visible;
    searchText = searchText === VOID ? this.tq5_1 : searchText;
    onSearchTextChanged = onSearchTextChanged === VOID ? this.uq5_1 : onSearchTextChanged;
    return $super === VOID ? this.vq5(visible, searchText, onSearchTextChanged) : $super.vq5.call(this, visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).toString = function () {
    return 'AppBarSearchUiState(visible=' + this.sq5_1 + ', searchText=' + this.tq5_1 + ', onSearchTextChanged=' + this.uq5_1 + ')';
  };
  protoOf(AppBarSearchUiState).hashCode = function () {
    var result = getBooleanHashCode(this.sq5_1);
    result = imul(result, 31) + getStringHashCode(this.tq5_1) | 0;
    result = imul(result, 31) + hashCode(this.uq5_1) | 0;
    return result;
  };
  protoOf(AppBarSearchUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppBarSearchUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppBarSearchUiState ? other : THROW_CCE();
    if (!(this.sq5_1 === tmp0_other_with_cast.sq5_1))
      return false;
    if (!(this.tq5_1 === tmp0_other_with_cast.tq5_1))
      return false;
    if (!equals(this.uq5_1, tmp0_other_with_cast.uq5_1))
      return false;
    return true;
  };
  var AppStateIcon_MOVE_instance;
  var AppStateIcon_CLOSE_instance;
  var AppStateIcon_DELETE_instance;
  var AppStateIcon_entriesInitialized;
  function AppStateIcon_initEntries() {
    if (AppStateIcon_entriesInitialized)
      return Unit_instance;
    AppStateIcon_entriesInitialized = true;
    AppStateIcon_MOVE_instance = new AppStateIcon('MOVE', 0);
    AppStateIcon_CLOSE_instance = new AppStateIcon('CLOSE', 1);
    AppStateIcon_DELETE_instance = new AppStateIcon('DELETE', 2);
  }
  function AppStateIcon(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function AppStateIcon_MOVE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_MOVE_instance;
  }
  function AppStateIcon_CLOSE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_CLOSE_instance;
  }
  function AppStateIcon_DELETE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_DELETE_instance;
  }
  function AppUiState(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) {
    fabState = fabState === VOID ? new FabUiState() : fabState;
    loadingState = loadingState === VOID ? new LoadingUiState() : loadingState;
    title = title === VOID ? null : title;
    navigationVisible = navigationVisible === VOID ? true : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? false : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? false : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? true : userAccountIconVisible;
    searchState = searchState === VOID ? new AppBarSearchUiState() : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? new ActionBarButtonUiState() : actionBarButtonState;
    overflowItems = overflowItems === VOID ? emptyList() : overflowItems;
    hideAppBar = hideAppBar === VOID ? false : hideAppBar;
    actionButtons = actionButtons === VOID ? emptyList() : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? null : leadingActionButton;
    appBarColors = appBarColors === VOID ? AppBarColors_STANDARD_getInstance() : appBarColors;
    this.xq5_1 = fabState;
    this.yq5_1 = loadingState;
    this.zq5_1 = title;
    this.aq6_1 = navigationVisible;
    this.bq6_1 = hideBottomNavigation;
    this.cq6_1 = hideSettingsIcon;
    this.dq6_1 = userAccountIconVisible;
    this.eq6_1 = searchState;
    this.fq6_1 = actionBarButtonState;
    this.gq6_1 = overflowItems;
    this.hq6_1 = hideAppBar;
    this.iq6_1 = actionButtons;
    this.jq6_1 = leadingActionButton;
    this.kq6_1 = appBarColors;
  }
  protoOf(AppUiState).lq6 = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) {
    return new AppUiState(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).mq6 = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors, $super) {
    fabState = fabState === VOID ? this.xq5_1 : fabState;
    loadingState = loadingState === VOID ? this.yq5_1 : loadingState;
    title = title === VOID ? this.zq5_1 : title;
    navigationVisible = navigationVisible === VOID ? this.aq6_1 : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? this.bq6_1 : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? this.cq6_1 : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? this.dq6_1 : userAccountIconVisible;
    searchState = searchState === VOID ? this.eq6_1 : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? this.fq6_1 : actionBarButtonState;
    overflowItems = overflowItems === VOID ? this.gq6_1 : overflowItems;
    hideAppBar = hideAppBar === VOID ? this.hq6_1 : hideAppBar;
    actionButtons = actionButtons === VOID ? this.iq6_1 : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? this.jq6_1 : leadingActionButton;
    appBarColors = appBarColors === VOID ? this.kq6_1 : appBarColors;
    return $super === VOID ? this.lq6(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) : $super.lq6.call(this, fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).toString = function () {
    return 'AppUiState(fabState=' + this.xq5_1 + ', loadingState=' + this.yq5_1 + ', title=' + this.zq5_1 + ', navigationVisible=' + this.aq6_1 + ', hideBottomNavigation=' + this.bq6_1 + ', hideSettingsIcon=' + this.cq6_1 + ', userAccountIconVisible=' + this.dq6_1 + ', searchState=' + this.eq6_1 + ', actionBarButtonState=' + this.fq6_1 + ', overflowItems=' + this.gq6_1 + ', hideAppBar=' + this.hq6_1 + ', actionButtons=' + this.iq6_1 + ', leadingActionButton=' + this.jq6_1 + ', appBarColors=' + this.kq6_1 + ')';
  };
  protoOf(AppUiState).hashCode = function () {
    var result = this.xq5_1.hashCode();
    result = imul(result, 31) + this.yq5_1.hashCode() | 0;
    result = imul(result, 31) + (this.zq5_1 == null ? 0 : getStringHashCode(this.zq5_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.aq6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bq6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cq6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dq6_1) | 0;
    result = imul(result, 31) + this.eq6_1.hashCode() | 0;
    result = imul(result, 31) + this.fq6_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.gq6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hq6_1) | 0;
    result = imul(result, 31) + hashCode(this.iq6_1) | 0;
    result = imul(result, 31) + (this.jq6_1 == null ? 0 : this.jq6_1.hashCode()) | 0;
    result = imul(result, 31) + this.kq6_1.hashCode() | 0;
    return result;
  };
  protoOf(AppUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppUiState ? other : THROW_CCE();
    if (!this.xq5_1.equals(tmp0_other_with_cast.xq5_1))
      return false;
    if (!this.yq5_1.equals(tmp0_other_with_cast.yq5_1))
      return false;
    if (!(this.zq5_1 == tmp0_other_with_cast.zq5_1))
      return false;
    if (!(this.aq6_1 === tmp0_other_with_cast.aq6_1))
      return false;
    if (!(this.bq6_1 === tmp0_other_with_cast.bq6_1))
      return false;
    if (!(this.cq6_1 === tmp0_other_with_cast.cq6_1))
      return false;
    if (!(this.dq6_1 === tmp0_other_with_cast.dq6_1))
      return false;
    if (!this.eq6_1.equals(tmp0_other_with_cast.eq6_1))
      return false;
    if (!this.fq6_1.equals(tmp0_other_with_cast.fq6_1))
      return false;
    if (!equals(this.gq6_1, tmp0_other_with_cast.gq6_1))
      return false;
    if (!(this.hq6_1 === tmp0_other_with_cast.hq6_1))
      return false;
    if (!equals(this.iq6_1, tmp0_other_with_cast.iq6_1))
      return false;
    if (!equals(this.jq6_1, tmp0_other_with_cast.jq6_1))
      return false;
    if (!this.kq6_1.equals(tmp0_other_with_cast.kq6_1))
      return false;
    return true;
  };
  var FabIcon_NONE_instance;
  var FabIcon_ADD_instance;
  var FabIcon_EDIT_instance;
  var FabIcon_entriesInitialized;
  function FabIcon_initEntries() {
    if (FabIcon_entriesInitialized)
      return Unit_instance;
    FabIcon_entriesInitialized = true;
    FabIcon_NONE_instance = new FabIcon('NONE', 0);
    FabIcon_ADD_instance = new FabIcon('ADD', 1);
    FabIcon_EDIT_instance = new FabIcon('EDIT', 2);
  }
  function FabIcon(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function FabUiState$_init_$lambda_e3ylcb() {
    return Unit_instance;
  }
  function FabIcon_NONE_getInstance() {
    FabIcon_initEntries();
    return FabIcon_NONE_instance;
  }
  function FabIcon_ADD_getInstance() {
    FabIcon_initEntries();
    return FabIcon_ADD_instance;
  }
  function FabIcon_EDIT_getInstance() {
    FabIcon_initEntries();
    return FabIcon_EDIT_instance;
  }
  function FabUiState(visible, text, icon, onClick) {
    visible = visible === VOID ? false : visible;
    text = text === VOID ? null : text;
    icon = icon === VOID ? FabIcon_NONE_getInstance() : icon;
    var tmp;
    if (onClick === VOID) {
      tmp = FabUiState$_init_$lambda_e3ylcb;
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    this.nq6_1 = visible;
    this.oq6_1 = text;
    this.pq6_1 = icon;
    this.qq6_1 = onClick;
  }
  protoOf(FabUiState).rq6 = function (visible, text, icon, onClick) {
    return new FabUiState(visible, text, icon, onClick);
  };
  protoOf(FabUiState).sq6 = function (visible, text, icon, onClick, $super) {
    visible = visible === VOID ? this.nq6_1 : visible;
    text = text === VOID ? this.oq6_1 : text;
    icon = icon === VOID ? this.pq6_1 : icon;
    onClick = onClick === VOID ? this.qq6_1 : onClick;
    return $super === VOID ? this.rq6(visible, text, icon, onClick) : $super.rq6.call(this, visible, text, icon, onClick);
  };
  protoOf(FabUiState).toString = function () {
    return 'FabUiState(visible=' + this.nq6_1 + ', text=' + this.oq6_1 + ', icon=' + this.pq6_1 + ', onClick=' + this.qq6_1 + ')';
  };
  protoOf(FabUiState).hashCode = function () {
    var result = getBooleanHashCode(this.nq6_1);
    result = imul(result, 31) + (this.oq6_1 == null ? 0 : getStringHashCode(this.oq6_1)) | 0;
    result = imul(result, 31) + this.pq6_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.qq6_1) | 0;
    return result;
  };
  protoOf(FabUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof FabUiState))
      return false;
    var tmp0_other_with_cast = other instanceof FabUiState ? other : THROW_CCE();
    if (!(this.nq6_1 === tmp0_other_with_cast.nq6_1))
      return false;
    if (!(this.oq6_1 == tmp0_other_with_cast.oq6_1))
      return false;
    if (!this.pq6_1.equals(tmp0_other_with_cast.pq6_1))
      return false;
    if (!equals(this.qq6_1, tmp0_other_with_cast.qq6_1))
      return false;
    return true;
  };
  var State_NOT_LOADING_instance;
  var State_INDETERMINATE_instance;
  var State_entriesInitialized;
  function State_initEntries() {
    if (State_entriesInitialized)
      return Unit_instance;
    State_entriesInitialized = true;
    State_NOT_LOADING_instance = new State('NOT_LOADING', 0);
    State_INDETERMINATE_instance = new State('INDETERMINATE', 1);
  }
  function State(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function Companion_80() {
    Companion_instance_129 = this;
    this.tq6_1 = new LoadingUiState(State_INDETERMINATE_getInstance());
    this.uq6_1 = new LoadingUiState(State_NOT_LOADING_getInstance());
  }
  var Companion_instance_129;
  function Companion_getInstance_97() {
    if (Companion_instance_129 == null)
      new Companion_80();
    return Companion_instance_129;
  }
  function State_NOT_LOADING_getInstance() {
    State_initEntries();
    return State_NOT_LOADING_instance;
  }
  function State_INDETERMINATE_getInstance() {
    State_initEntries();
    return State_INDETERMINATE_instance;
  }
  function LoadingUiState(loadingState) {
    Companion_getInstance_97();
    loadingState = loadingState === VOID ? State_NOT_LOADING_getInstance() : loadingState;
    this.vq6_1 = loadingState;
  }
  protoOf(LoadingUiState).toString = function () {
    return 'LoadingUiState(loadingState=' + this.vq6_1 + ')';
  };
  protoOf(LoadingUiState).hashCode = function () {
    return this.vq6_1.hashCode();
  };
  protoOf(LoadingUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LoadingUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LoadingUiState ? other : THROW_CCE();
    if (!this.vq6_1.equals(tmp0_other_with_cast.vq6_1))
      return false;
    return true;
  };
  function OverflowItem(label, onClick) {
    this.wq6_1 = label;
    this.xq6_1 = onClick;
  }
  protoOf(OverflowItem).toString = function () {
    return 'OverflowItem(label=' + this.wq6_1 + ', onClick=' + this.xq6_1 + ')';
  };
  protoOf(OverflowItem).hashCode = function () {
    var result = getStringHashCode(this.wq6_1);
    result = imul(result, 31) + hashCode(this.xq6_1) | 0;
    return result;
  };
  protoOf(OverflowItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OverflowItem))
      return false;
    var tmp0_other_with_cast = other instanceof OverflowItem ? other : THROW_CCE();
    if (!(this.wq6_1 === tmp0_other_with_cast.wq6_1))
      return false;
    if (!equals(this.xq6_1, tmp0_other_with_cast.xq6_1))
      return false;
    return true;
  };
  function Snack(message, action, onAction) {
    action = action === VOID ? null : action;
    onAction = onAction === VOID ? null : onAction;
    this.yq6_1 = message;
    this.zq6_1 = action;
    this.aq7_1 = onAction;
  }
  protoOf(Snack).toString = function () {
    return 'Snack(message=' + this.yq6_1 + ', action=' + this.zq6_1 + ', onAction=' + this.aq7_1 + ')';
  };
  protoOf(Snack).hashCode = function () {
    var result = getStringHashCode(this.yq6_1);
    result = imul(result, 31) + (this.zq6_1 == null ? 0 : getStringHashCode(this.zq6_1)) | 0;
    result = imul(result, 31) + (this.aq7_1 == null ? 0 : hashCode(this.aq7_1)) | 0;
    return result;
  };
  protoOf(Snack).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Snack))
      return false;
    var tmp0_other_with_cast = other instanceof Snack ? other : THROW_CCE();
    if (!(this.yq6_1 === tmp0_other_with_cast.yq6_1))
      return false;
    if (!(this.zq6_1 == tmp0_other_with_cast.zq6_1))
      return false;
    if (!equals(this.aq7_1, tmp0_other_with_cast.aq7_1))
      return false;
    return true;
  };
  function SnackBarDispatcher() {
  }
  function TabItem(viewName, args, label) {
    this.cq7_1 = viewName;
    this.dq7_1 = args;
    this.eq7_1 = label;
  }
  protoOf(TabItem).toString = function () {
    return 'TabItem(viewName=' + this.cq7_1 + ', args=' + this.dq7_1 + ', label=' + this.eq7_1 + ')';
  };
  protoOf(TabItem).hashCode = function () {
    var result = getStringHashCode(this.cq7_1);
    result = imul(result, 31) + hashCode(this.dq7_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.eq7_1) | 0;
    return result;
  };
  protoOf(TabItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TabItem))
      return false;
    var tmp0_other_with_cast = other instanceof TabItem ? other : THROW_CCE();
    if (!(this.cq7_1 === tmp0_other_with_cast.cq7_1))
      return false;
    if (!equals(this.dq7_1, tmp0_other_with_cast.dq7_1))
      return false;
    if (!(this.eq7_1 === tmp0_other_with_cast.eq7_1))
      return false;
    return true;
  };
  function UstadContextMenuItem(label, onClick) {
    this.fq7_1 = label;
    this.gq7_1 = onClick;
  }
  protoOf(UstadContextMenuItem).toString = function () {
    return 'UstadContextMenuItem(label=' + this.fq7_1 + ', onClick=' + this.gq7_1 + ')';
  };
  protoOf(UstadContextMenuItem).hashCode = function () {
    var result = getStringHashCode(this.fq7_1);
    result = imul(result, 31) + hashCode(this.gq7_1) | 0;
    return result;
  };
  protoOf(UstadContextMenuItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadContextMenuItem))
      return false;
    var tmp0_other_with_cast = other instanceof UstadContextMenuItem ? other : THROW_CCE();
    if (!(this.fq7_1 === tmp0_other_with_cast.fq7_1))
      return false;
    if (!equals(this.gq7_1, tmp0_other_with_cast.gq7_1))
      return false;
    return true;
  };
  function BuildConfigMap(delegate) {
    this.hq7_1 = delegate;
  }
  protoOf(BuildConfigMap).ba = function (key) {
    return this.hq7_1.q(key);
  };
  function Companion_81() {
    this.iq7_1 = '1,2,4';
  }
  var Companion_instance_130;
  function Companion_getInstance_98() {
    return Companion_instance_130;
  }
  function GenderConfig(genderConfigStr) {
    genderConfigStr = genderConfigStr === VOID ? '1,2,4' : genderConfigStr;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = split(genderConfigStr, [',']);
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderOptions.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(element)) {
        destination.i1(element);
      }
    }
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
    var tmp0_iterator_0 = destination.w();
    while (tmp0_iterator_0.f()) {
      var item = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderOptions.<anonymous>' call
      var tmp$ret$4 = toInt(item);
      destination_0.i1(tmp$ret$4);
    }
    tmp.jq7_1 = destination_0;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_1 = PersonConstants_getInstance_0().mq7_1;
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_1 = this_1.w();
    while (tmp0_iterator_1.f()) {
      var element_0 = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderMessageIds.<anonymous>' call
      if (this.jq7_1.a1(element_0.pq7_1)) {
        destination_1.i1(element_0);
      }
    }
    tmp_0.kq7_1 = destination_1;
    var tmp_1 = this;
    var tmp_2 = strings_getInstance().hmi_1;
    tmp_1.lq7_1 = plus(this.kq7_1, listOf_0(new MessageIdOption2(tmp_2, 0)));
  }
  function SupportedLanguagesConfig_init_$Init$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode, $this) {
    availableLanguagesConfig = availableLanguagesConfig === VOID ? 'en,fa,ps,ar,tg,bn,ne,my,rw,ru' : availableLanguagesConfig;
    fallbackLocaleCode = fallbackLocaleCode === VOID ? 'en' : fallbackLocaleCode;
    SupportedLanguagesConfig.call($this, systemLocales, new SettingsLocaleSettingDelegate(settings), availableLanguagesConfig, fallbackLocaleCode);
    return $this;
  }
  function SupportedLanguagesConfig_init_$Create$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode) {
    return SupportedLanguagesConfig_init_$Init$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode, objectCreate(protoOf(SupportedLanguagesConfig)));
  }
  function SettingsLocaleSettingDelegate(settings) {
    this.qq7_1 = settings;
  }
  protoOf(SettingsLocaleSettingDelegate).rq7 = function (value) {
    if (!(value == null)) {
      this.qq7_1.xm7('locale', value);
    } else {
      this.qq7_1.a2o('locale');
    }
  };
  protoOf(SettingsLocaleSettingDelegate).sq7 = function () {
    return this.qq7_1.ym7('locale');
  };
  function displayLocaleForLangSetting($this, setting) {
    var tmp;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    // Inline function 'kotlin.contracts.contract' call
    if (setting == null ? true : charSequenceLength(setting) === 0) {
      tmp = $this.tq7().hq4_1;
    } else {
      tmp = setting;
    }
    return tmp;
  }
  function Companion_82() {
    this.uq7_1 = 'locale';
    this.vq7_1 = 'com.ustadmobile.presetlocale';
    this.wq7_1 = 'localePresetDone';
    this.xq7_1 = 'en,fa,ps,ar,tg,bn,ne,my,rw,ru';
    this.yq7_1 = '';
  }
  var Companion_instance_131;
  function Companion_getInstance_99() {
    return Companion_instance_131;
  }
  function SupportedLanguagesConfig(systemLocales, localeSettingDelegate, availableLanguagesConfig, fallbackLocaleCode) {
    availableLanguagesConfig = availableLanguagesConfig === VOID ? 'en,fa,ps,ar,tg,bn,ne,my,rw,ru' : availableLanguagesConfig;
    fallbackLocaleCode = fallbackLocaleCode === VOID ? 'en' : fallbackLocaleCode;
    this.kpm_1 = systemLocales;
    this.lpm_1 = localeSettingDelegate;
    this.mpm_1 = availableLanguagesConfig;
    this.npm_1 = fallbackLocaleCode;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = sorted(split(this.mpm_1, [',']));
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.supportedUiLanguages.<anonymous>' call
      var tmp0_elvis_lhs = UstadMobileConstants_getInstance().wq3_1.q(item);
      var tmp$ret$0 = new UiLanguage(item, tmp0_elvis_lhs == null ? item : tmp0_elvis_lhs);
      destination.i1(tmp$ret$0);
    }
    tmp.opm_1 = destination;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_1 = this.opm_1;
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination_0 = LinkedHashMap_init_$Create$_0(capacity);
    var tmp0_iterator_0 = this_1.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.supportedLangMap.<anonymous>' call
      var tmp$ret$3 = element.hq4_1;
      destination_0.s(tmp$ret$3, element);
    }
    tmp_0.ppm_1 = destination_0;
    this.qpm_1 = displayLocaleForLangSetting(this, this.sq7());
    if (!this.ppm_1.r(this.npm_1))
      throw IllegalStateException_init_$Create$('available languages ' + this.mpm_1 + ' does not ' + ("include fallback: '" + this.npm_1 + "'"));
  }
  protoOf(SupportedLanguagesConfig).rq7 = function (value) {
    this.lpm_1.rq7(value);
    this.qpm_1 = displayLocaleForLangSetting(this, value);
  };
  protoOf(SupportedLanguagesConfig).sq7 = function () {
    return this.lpm_1.sq7();
  };
  protoOf(SupportedLanguagesConfig).zq7 = function (systemImpl) {
    var tmp0_elvis_lhs = this.sq7();
    var currentLocaleSetting = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = this.aq8(systemImpl).w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.getCurrentLanguage.<anonymous>' call
        if (element.hq4_1 === currentLocaleSetting) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    return tmp$ret$1;
  };
  protoOf(SupportedLanguagesConfig).bq8 = function (useDeviceLangDisplay) {
    Companion_getInstance_96();
    return plus(listOf_0(new UiLanguage('', useDeviceLangDisplay)), this.opm_1);
  };
  protoOf(SupportedLanguagesConfig).aq8 = function (systemImpl) {
    return this.bq8(systemImpl.moj(strings_getInstance().kn4_1));
  };
  protoOf(SupportedLanguagesConfig).cq8 = function (preferredLocales) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.opm_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
      var tmp$ret$0 = item.hq4_1;
      destination.i1(tmp$ret$0);
    }
    var supportedLocaleCodes = destination;
    var tmp$ret$6;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator_0 = preferredLocales.w();
      while (tmp0_iterator_0.f()) {
        var element = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        var tmp$ret$4 = element.substring(0, 2);
        if (supportedLocaleCodes.a1(tmp$ret$4)) {
          tmp$ret$6 = element;
          break $l$block;
        }
      }
      tmp$ret$6 = null;
    }
    var tmp0_safe_receiver = tmp$ret$6;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$8 = tmp0_safe_receiver.substring(0, 2);
      tmp = ensureNotNull(this.ppm_1.q(tmp$ret$8));
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? ensureNotNull(this.ppm_1.q(this.npm_1)) : tmp1_elvis_lhs;
  };
  protoOf(SupportedLanguagesConfig).tq7 = function (preferredLocales, $super) {
    preferredLocales = preferredLocales === VOID ? this.kpm_1 : preferredLocales;
    return $super === VOID ? this.cq8(preferredLocales) : $super.cq8.call(this, preferredLocales);
  };
  function Companion_83() {
  }
  protoOf(Companion_83).dq8 = function (buildConfig) {
    var tmp = ensureNotNull(buildConfig.ba('com.ustadmobile.system.systemBaseUrl'));
    var tmp0_safe_receiver = buildConfig.ba('com.ustadmobile.system.presetLsUrl');
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_1;
      // Inline function 'com.ustadmobile.core.impl.config.Companion.fromUstadBuildConfig.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(tmp0_safe_receiver)) {
        tmp_1 = tmp0_safe_receiver;
      } else {
        tmp_1 = null;
      }
      tmp_0 = tmp_1;
    }
    var tmp_2 = tmp_0;
    var tmp1_safe_receiver = buildConfig.ba('com.ustadmobile.system.newPersonalAccountsLsUrl');
    var tmp_3;
    if (tmp1_safe_receiver == null) {
      tmp_3 = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_4;
      // Inline function 'com.ustadmobile.core.impl.config.Companion.fromUstadBuildConfig.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(tmp1_safe_receiver)) {
        tmp_4 = tmp1_safe_receiver;
      } else {
        tmp_4 = null;
      }
      tmp_3 = tmp_4;
    }
    return new SystemUrlConfig(tmp, tmp_2, tmp_3);
  };
  var Companion_instance_132;
  function Companion_getInstance_100() {
    return Companion_instance_132;
  }
  function SystemUrlConfig(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) {
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? null : presetLearningSpaceUrl;
    newPersonalAccountsLearningSpaceUrl = newPersonalAccountsLearningSpaceUrl === VOID ? null : newPersonalAccountsLearningSpaceUrl;
    this.xo5_1 = systemBaseUrl;
    this.yo5_1 = presetLearningSpaceUrl;
    this.zo5_1 = newPersonalAccountsLearningSpaceUrl;
    this.ao6_1 = this.yo5_1 == null;
  }
  protoOf(SystemUrlConfig).eq8 = function (systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) {
    return new SystemUrlConfig(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl);
  };
  protoOf(SystemUrlConfig).fq8 = function (systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl, $super) {
    systemBaseUrl = systemBaseUrl === VOID ? this.xo5_1 : systemBaseUrl;
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? this.yo5_1 : presetLearningSpaceUrl;
    newPersonalAccountsLearningSpaceUrl = newPersonalAccountsLearningSpaceUrl === VOID ? this.zo5_1 : newPersonalAccountsLearningSpaceUrl;
    return $super === VOID ? this.eq8(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) : $super.eq8.call(this, systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl);
  };
  protoOf(SystemUrlConfig).toString = function () {
    return 'SystemUrlConfig(systemBaseUrl=' + this.xo5_1 + ', presetLearningSpaceUrl=' + this.yo5_1 + ', newPersonalAccountsLearningSpaceUrl=' + this.zo5_1 + ')';
  };
  protoOf(SystemUrlConfig).hashCode = function () {
    var result = getStringHashCode(this.xo5_1);
    result = imul(result, 31) + (this.yo5_1 == null ? 0 : getStringHashCode(this.yo5_1)) | 0;
    result = imul(result, 31) + (this.zo5_1 == null ? 0 : getStringHashCode(this.zo5_1)) | 0;
    return result;
  };
  protoOf(SystemUrlConfig).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemUrlConfig))
      return false;
    var tmp0_other_with_cast = other instanceof SystemUrlConfig ? other : THROW_CCE();
    if (!(this.xo5_1 === tmp0_other_with_cast.xo5_1))
      return false;
    if (!(this.yo5_1 == tmp0_other_with_cast.yo5_1))
      return false;
    if (!(this.zo5_1 == tmp0_other_with_cast.zo5_1))
      return false;
    return true;
  };
  function Companion_84() {
    this.gq8_1 = 'com.ustadmobile.gopts';
    this.hq8_1 = 'com.ustadmobile.showpoweredbymsg';
    this.iq8_1 = 'com.ustadmobile.system.systemBaseUrl';
    this.jq8_1 = 'com.ustadmobile.system.presetLsUrl';
    this.kq8_1 = 'com.ustadmobile.system.newPersonalAccountsLsUrl';
  }
  var Companion_instance_133;
  function Companion_getInstance_101() {
    return Companion_instance_133;
  }
  function UstadBuildConfig() {
  }
  function commonClientDomainDiModule(learningSpaceScope) {
    return Module_init_$Create$('CommonDomainClient', VOID, VOID, commonClientDomainDiModule$lambda(learningSpaceScope));
  }
  function commonClientDomainDiModule$lambda$lambda($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.d58(tmp$ret$2, null);
    return new SendClazzInvitesUseCaseSendToServerImpl(tmp_1, tmp_2, tmp$ret$3);
  }
  function commonClientDomainDiModule$lambda$lambda_0($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new GetUsernameSuggestionUseCase(tmp$ret$1, $this$singleton.od());
  }
  function commonClientDomainDiModule$lambda($learningSpaceScope) {
    return function ($this$$receiver) {
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp = typeToken(createKType(getKClass(SendClazzInvitesUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
      var tmp_0 = $this$$receiver.o56(tmp$ret$0, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var this_0 = new ImplWithScope(tmp$ret$2, scope);
      var creator = commonClientDomainDiModule$lambda$lambda;
      var tmp_2 = this_0.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_3 = typeToken(createKType(getKClass(SendClazzInvitesUseCaseSendToServerImpl), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
      var tmp$ret$5 = new Provider(tmp_2, tmp$ret$4, creator);
      tmp_0.c5b(tmp$ret$5);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(GetUsernameSuggestionUseCase), arrayOf([]), false));
      var tmp$ret$6 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = $this$$receiver.o56(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_0 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
      var this_1 = new ImplWithScope(tmp$ret$8, scope_0);
      var creator_0 = commonClientDomainDiModule$lambda$lambda_0;
      var tmp_7 = this_1.c56();
      var tmp_8 = this_1.b56();
      var tmp_9 = this_1.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_10 = typeToken(createKType(getKClass(GetUsernameSuggestionUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
      var tmp$ret$11 = new Singleton(tmp_7, tmp_8, tmp_9, tmp$ret$10, null, true, creator_0);
      tmp_5.c5b(tmp$ret$11);
      return Unit_instance;
    };
  }
  function commonDomainDiModule(learningSpaceScope) {
    return Module_init_$Create$('CommonDomain', VOID, VOID, commonDomainDiModule$lambda(learningSpaceScope));
  }
  function commonDomainDiModule$lambda$lambda($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new EnrolIntoCourseUseCase(tmp_1, tmp$ret$3.tk2_1);
  }
  function commonDomainDiModule$lambda$lambda_0($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp0_repo = tmp.d58(tmp$ret$0, null).tk2_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp1_db = tmp_1.d58(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp2_enrolIntoCourseUseCase = tmp_3.d58(tmp$ret$4, null);
    return new ApproveOrDeclinePendingEnrolmentUseCase(tmp1_db, tmp0_repo, tmp2_enrolIntoCourseUseCase);
  }
  function commonDomainDiModule$lambda$lambda_1($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.d58(tmp$ret$2, null).tk2_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.d58(tmp$ret$4, null);
    return new SaveContentEntryUseCase(tmp_1, tmp_4, tmp$ret$5);
  }
  function commonDomainDiModule$lambda$lambda_2($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new GetAssignmentSubmitterNameUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_3($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new GetLocaleForSiteTermsUseCase(tmp_1, tmp$ret$3.wk2());
  }
  function commonDomainDiModule$lambda$lambda_4($this$provider) {
    return new DefaultLaunchContentEntryVersionUseCase();
  }
  function commonDomainDiModule$lambda$lambda_5($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new RequestEnrolmentUseCase(tmp$ret$1.wk2());
  }
  function commonDomainDiModule$lambda$lambda_6($this$singleton) {
    return new MakeLinkUseCase($this$singleton.od());
  }
  function commonDomainDiModule$lambda$lambda_7($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new CreateNewClazzUseCase(tmp$ret$1.wk2());
  }
  function commonDomainDiModule$lambda$lambda_8($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(FilterUsernameUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, 1);
    return new UsernameSuggestionUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_9($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(PhoneNumValidatorUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(ValidateEmailUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new ParseInviteUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_10($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new CopyCourseUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_11($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp_8 = tmp_6.d58(tmp$ret$4, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp_11 = tmp_9.d58(tmp$ret$6, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_12 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    var tmp$ret$9 = tmp_12.d58(tmp$ret$8, null);
    return new SubmitMarkUseCase(tmp_1, tmp_2, tmp_5, tmp_8, tmp_11, tmp$ret$9);
  }
  function commonDomainDiModule$lambda$lambda_12($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.d58(tmp$ret$2, null);
    return new CreateXapiGroupForCourseGroupUseCase(tmp_1, tmp_2, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_13($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instanceOrNull' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.e58(tmp$ret$2, 2);
    return new FormatStatementResponseUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_14($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new GetDefaultDestinationUseCase(tmp$ret$1, $this$singleton.od());
  }
  function commonDomainDiModule$lambda$lambda_15($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new CheckRegistrationAllowedUseCase(tmp$ret$1);
  }
  function commonDomainDiModule$lambda$lambda_16($this$singleton) {
    return new CreateCredentialUsernameUseCase($this$singleton.od());
  }
  function commonDomainDiModule$lambda$lambda_17($this$singleton) {
    return new ParseCredentialUsernameUseCase();
  }
  function commonDomainDiModule$lambda($learningSpaceScope) {
    return function ($this$$receiver) {
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
      var tmp_0 = $this$$receiver.o56(tmp$ret$0, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var this_0 = new ImplWithScope(tmp$ret$2, scope);
      var creator = commonDomainDiModule$lambda$lambda;
      var tmp_2 = this_0.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_3 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
      var tmp$ret$5 = new Provider(tmp_2, tmp$ret$4, creator);
      tmp_0.c5b(tmp$ret$5);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(IApproveOrDeclinePendingEnrolmentRequestUseCase), arrayOf([]), false));
      var tmp$ret$6 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = $this$$receiver.o56(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_0 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
      var this_1 = new ImplWithScope(tmp$ret$8, scope_0);
      var creator_0 = commonDomainDiModule$lambda$lambda_0;
      var tmp_7 = this_1.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_8 = typeToken(createKType(getKClass(ApproveOrDeclinePendingEnrolmentUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
      var tmp$ret$11 = new Provider(tmp_7, tmp$ret$10, creator_0);
      tmp_5.c5b(tmp$ret$11);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_9 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$12 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
      var tmp_10 = $this$$receiver.o56(tmp$ret$12, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_1 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_11 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$14 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
      var this_2 = new ImplWithScope(tmp$ret$14, scope_1);
      var creator_1 = commonDomainDiModule$lambda$lambda_1;
      var tmp_12 = this_2.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$16 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      var tmp$ret$17 = new Provider(tmp_12, tmp$ret$16, creator_1);
      tmp_10.c5b(tmp$ret$17);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_14 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
      var tmp$ret$18 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
      var tmp_15 = $this$$receiver.o56(tmp$ret$18, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_2 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_16 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$20 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
      var this_3 = new ImplWithScope(tmp$ret$20, scope_2);
      var creator_2 = commonDomainDiModule$lambda$lambda_2;
      var tmp_17 = this_3.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_18 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
      var tmp$ret$22 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
      var tmp$ret$23 = new Provider(tmp_17, tmp$ret$22, creator_2);
      tmp_15.c5b(tmp$ret$23);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_19 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
      var tmp$ret$24 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
      var tmp_20 = $this$$receiver.o56(tmp$ret$24, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_3 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_21 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$26 = isInterface(tmp_21, TypeToken) ? tmp_21 : THROW_CCE();
      var this_4 = new ImplWithScope(tmp$ret$26, scope_3);
      var creator_3 = commonDomainDiModule$lambda$lambda_3;
      var tmp_22 = this_4.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_23 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
      var tmp$ret$28 = isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE();
      var tmp$ret$29 = new Provider(tmp_22, tmp$ret$28, creator_3);
      tmp_20.c5b(tmp$ret$29);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_24 = typeToken(createKType(getKClass(LaunchContentEntryVersionUseCase), arrayOf([]), false));
      var tmp$ret$30 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
      var tmp_25 = $this$$receiver.o56(tmp$ret$30, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_4 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_26 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$32 = isInterface(tmp_26, TypeToken) ? tmp_26 : THROW_CCE();
      var this_5 = new ImplWithScope(tmp$ret$32, scope_4);
      var creator_4 = commonDomainDiModule$lambda$lambda_4;
      var tmp_27 = this_5.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_28 = typeToken(createKType(getKClass(DefaultLaunchContentEntryVersionUseCase), arrayOf([]), false));
      var tmp$ret$34 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
      var tmp$ret$35 = new Provider(tmp_27, tmp$ret$34, creator_4);
      tmp_25.c5b(tmp$ret$35);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_29 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
      var tmp$ret$36 = isInterface(tmp_29, TypeToken) ? tmp_29 : THROW_CCE();
      var tmp_30 = $this$$receiver.o56(tmp$ret$36, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_5 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_31 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$38 = isInterface(tmp_31, TypeToken) ? tmp_31 : THROW_CCE();
      var this_6 = new ImplWithScope(tmp$ret$38, scope_5);
      var creator_5 = commonDomainDiModule$lambda$lambda_5;
      var tmp_32 = this_6.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_33 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
      var tmp$ret$40 = isInterface(tmp_33, TypeToken) ? tmp_33 : THROW_CCE();
      var tmp$ret$41 = new Provider(tmp_32, tmp$ret$40, creator_5);
      tmp_30.c5b(tmp$ret$41);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_34 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
      var tmp$ret$42 = isInterface(tmp_34, TypeToken) ? tmp_34 : THROW_CCE();
      var tmp_35 = $this$$receiver.o56(tmp$ret$42, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_6 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_36 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$44 = isInterface(tmp_36, TypeToken) ? tmp_36 : THROW_CCE();
      var this_7 = new ImplWithScope(tmp$ret$44, scope_6);
      var creator_6 = commonDomainDiModule$lambda$lambda_6;
      var tmp_37 = this_7.c56();
      var tmp_38 = this_7.b56();
      var tmp_39 = this_7.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_40 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
      var tmp$ret$46 = isInterface(tmp_40, TypeToken) ? tmp_40 : THROW_CCE();
      var tmp$ret$47 = new Singleton(tmp_37, tmp_38, tmp_39, tmp$ret$46, null, true, creator_6);
      tmp_35.c5b(tmp$ret$47);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_41 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
      var tmp$ret$48 = isInterface(tmp_41, TypeToken) ? tmp_41 : THROW_CCE();
      var tmp_42 = $this$$receiver.o56(tmp$ret$48, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_7 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_43 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$50 = isInterface(tmp_43, TypeToken) ? tmp_43 : THROW_CCE();
      var this_8 = new ImplWithScope(tmp$ret$50, scope_7);
      var creator_7 = commonDomainDiModule$lambda$lambda_7;
      var tmp_44 = this_8.c56();
      var tmp_45 = this_8.b56();
      var tmp_46 = this_8.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_47 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
      var tmp$ret$52 = isInterface(tmp_47, TypeToken) ? tmp_47 : THROW_CCE();
      var tmp$ret$53 = new Singleton(tmp_44, tmp_45, tmp_46, tmp$ret$52, null, true, creator_7);
      tmp_42.c5b(tmp$ret$53);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_48 = typeToken(createKType(getKClass(UsernameSuggestionUseCase), arrayOf([]), false));
      var tmp$ret$54 = isInterface(tmp_48, TypeToken) ? tmp_48 : THROW_CCE();
      var tmp_49 = $this$$receiver.o56(tmp$ret$54, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_8 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_50 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$56 = isInterface(tmp_50, TypeToken) ? tmp_50 : THROW_CCE();
      var this_9 = new ImplWithScope(tmp$ret$56, scope_8);
      var creator_8 = commonDomainDiModule$lambda$lambda_8;
      var tmp_51 = this_9.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_52 = typeToken(createKType(getKClass(UsernameSuggestionUseCase), arrayOf([]), false));
      var tmp$ret$58 = isInterface(tmp_52, TypeToken) ? tmp_52 : THROW_CCE();
      var tmp$ret$59 = new Provider(tmp_51, tmp$ret$58, creator_8);
      tmp_49.c5b(tmp$ret$59);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_53 = typeToken(createKType(getKClass(ParseInviteUseCase), arrayOf([]), false));
      var tmp$ret$60 = isInterface(tmp_53, TypeToken) ? tmp_53 : THROW_CCE();
      var tmp_54 = $this$$receiver.o56(tmp$ret$60, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_9 = commonDomainDiModule$lambda$lambda_9;
      var tmp_55 = $this$$receiver.c56();
      var tmp_56 = $this$$receiver.b56();
      var tmp_57 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_58 = typeToken(createKType(getKClass(ParseInviteUseCase), arrayOf([]), false));
      var tmp$ret$62 = isInterface(tmp_58, TypeToken) ? tmp_58 : THROW_CCE();
      var tmp$ret$63 = new Singleton(tmp_55, tmp_56, tmp_57, tmp$ret$62, null, true, creator_9);
      tmp_54.c5b(tmp$ret$63);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_59 = typeToken(createKType(getKClass(CopyCourseUseCase), arrayOf([]), false));
      var tmp$ret$64 = isInterface(tmp_59, TypeToken) ? tmp_59 : THROW_CCE();
      var tmp_60 = $this$$receiver.o56(tmp$ret$64, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_9 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_61 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$66 = isInterface(tmp_61, TypeToken) ? tmp_61 : THROW_CCE();
      var this_10 = new ImplWithScope(tmp$ret$66, scope_9);
      var creator_10 = commonDomainDiModule$lambda$lambda_10;
      var tmp_62 = this_10.c56();
      var tmp_63 = this_10.b56();
      var tmp_64 = this_10.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_65 = typeToken(createKType(getKClass(CopyCourseUseCase), arrayOf([]), false));
      var tmp$ret$68 = isInterface(tmp_65, TypeToken) ? tmp_65 : THROW_CCE();
      var tmp$ret$69 = new Singleton(tmp_62, tmp_63, tmp_64, tmp$ret$68, null, true, creator_10);
      tmp_60.c5b(tmp$ret$69);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_66 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
      var tmp$ret$70 = isInterface(tmp_66, TypeToken) ? tmp_66 : THROW_CCE();
      var tmp_67 = $this$$receiver.o56(tmp$ret$70, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_10 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_68 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$72 = isInterface(tmp_68, TypeToken) ? tmp_68 : THROW_CCE();
      var this_11 = new ImplWithScope(tmp$ret$72, scope_10);
      var creator_11 = commonDomainDiModule$lambda$lambda_11;
      var tmp_69 = this_11.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_70 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
      var tmp$ret$74 = isInterface(tmp_70, TypeToken) ? tmp_70 : THROW_CCE();
      var tmp$ret$75 = new Provider(tmp_69, tmp$ret$74, creator_11);
      tmp_67.c5b(tmp$ret$75);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_71 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
      var tmp$ret$76 = isInterface(tmp_71, TypeToken) ? tmp_71 : THROW_CCE();
      var tmp_72 = $this$$receiver.o56(tmp$ret$76, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_11 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_73 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$78 = isInterface(tmp_73, TypeToken) ? tmp_73 : THROW_CCE();
      var this_12 = new ImplWithScope(tmp$ret$78, scope_11);
      var creator_12 = commonDomainDiModule$lambda$lambda_12;
      var tmp_74 = this_12.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_75 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
      var tmp$ret$80 = isInterface(tmp_75, TypeToken) ? tmp_75 : THROW_CCE();
      var tmp$ret$81 = new Provider(tmp_74, tmp$ret$80, creator_12);
      tmp_72.c5b(tmp$ret$81);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_76 = typeToken(createKType(getKClass(FormatStatementResponseUseCase), arrayOf([]), false));
      var tmp$ret$82 = isInterface(tmp_76, TypeToken) ? tmp_76 : THROW_CCE();
      var tmp_77 = $this$$receiver.o56(tmp$ret$82, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_12 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_78 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$84 = isInterface(tmp_78, TypeToken) ? tmp_78 : THROW_CCE();
      var this_13 = new ImplWithScope(tmp$ret$84, scope_12);
      var creator_13 = commonDomainDiModule$lambda$lambda_13;
      var tmp_79 = this_13.c56();
      var tmp_80 = this_13.b56();
      var tmp_81 = this_13.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_82 = typeToken(createKType(getKClass(FormatStatementResponseUseCase), arrayOf([]), false));
      var tmp$ret$86 = isInterface(tmp_82, TypeToken) ? tmp_82 : THROW_CCE();
      var tmp$ret$87 = new Singleton(tmp_79, tmp_80, tmp_81, tmp$ret$86, null, true, creator_13);
      tmp_77.c5b(tmp$ret$87);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_83 = typeToken(createKType(getKClass(GetDefaultDestinationUseCase), arrayOf([]), false));
      var tmp$ret$88 = isInterface(tmp_83, TypeToken) ? tmp_83 : THROW_CCE();
      var tmp_84 = $this$$receiver.o56(tmp$ret$88, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_13 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_85 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$90 = isInterface(tmp_85, TypeToken) ? tmp_85 : THROW_CCE();
      var this_14 = new ImplWithScope(tmp$ret$90, scope_13);
      var creator_14 = commonDomainDiModule$lambda$lambda_14;
      var tmp_86 = this_14.c56();
      var tmp_87 = this_14.b56();
      var tmp_88 = this_14.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_89 = typeToken(createKType(getKClass(GetDefaultDestinationUseCase), arrayOf([]), false));
      var tmp$ret$92 = isInterface(tmp_89, TypeToken) ? tmp_89 : THROW_CCE();
      var tmp$ret$93 = new Singleton(tmp_86, tmp_87, tmp_88, tmp$ret$92, null, true, creator_14);
      tmp_84.c5b(tmp$ret$93);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_90 = typeToken(createKType(getKClass(CheckRegistrationAllowedUseCase), arrayOf([]), false));
      var tmp$ret$94 = isInterface(tmp_90, TypeToken) ? tmp_90 : THROW_CCE();
      var tmp_91 = $this$$receiver.o56(tmp$ret$94, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_14 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_92 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$96 = isInterface(tmp_92, TypeToken) ? tmp_92 : THROW_CCE();
      var this_15 = new ImplWithScope(tmp$ret$96, scope_14);
      var creator_15 = commonDomainDiModule$lambda$lambda_15;
      var tmp_93 = this_15.c56();
      var tmp_94 = this_15.b56();
      var tmp_95 = this_15.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_96 = typeToken(createKType(getKClass(CheckRegistrationAllowedUseCase), arrayOf([]), false));
      var tmp$ret$98 = isInterface(tmp_96, TypeToken) ? tmp_96 : THROW_CCE();
      var tmp$ret$99 = new Singleton(tmp_93, tmp_94, tmp_95, tmp$ret$98, null, true, creator_15);
      tmp_91.c5b(tmp$ret$99);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_97 = typeToken(createKType(getKClass(CreateCredentialUsernameUseCase), arrayOf([]), false));
      var tmp$ret$100 = isInterface(tmp_97, TypeToken) ? tmp_97 : THROW_CCE();
      var tmp_98 = $this$$receiver.o56(tmp$ret$100, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_15 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_99 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$102 = isInterface(tmp_99, TypeToken) ? tmp_99 : THROW_CCE();
      var this_16 = new ImplWithScope(tmp$ret$102, scope_15);
      var creator_16 = commonDomainDiModule$lambda$lambda_16;
      var tmp_100 = this_16.c56();
      var tmp_101 = this_16.b56();
      var tmp_102 = this_16.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_103 = typeToken(createKType(getKClass(CreateCredentialUsernameUseCase), arrayOf([]), false));
      var tmp$ret$104 = isInterface(tmp_103, TypeToken) ? tmp_103 : THROW_CCE();
      var tmp$ret$105 = new Singleton(tmp_100, tmp_101, tmp_102, tmp$ret$104, null, true, creator_16);
      tmp_98.c5b(tmp$ret$105);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_104 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
      var tmp$ret$106 = isInterface(tmp_104, TypeToken) ? tmp_104 : THROW_CCE();
      var tmp_105 = $this$$receiver.o56(tmp$ret$106, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_17 = commonDomainDiModule$lambda$lambda_17;
      var tmp_106 = $this$$receiver.c56();
      var tmp_107 = $this$$receiver.b56();
      var tmp_108 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_109 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
      var tmp$ret$108 = isInterface(tmp_109, TypeToken) ? tmp_109 : THROW_CCE();
      var tmp$ret$109 = new Singleton(tmp_106, tmp_107, tmp_108, tmp$ret$108, null, true, creator_17);
      tmp_105.c5b(tmp$ret$109);
      return Unit_instance;
    };
  }
  function CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, $this) {
    CourseTerminologyStrings.call($this, toTerminologyEntries(courseTerminology, json, systemImpl), courseTerminology.p8g_1);
    return $this;
  }
  function CourseTerminologyStrings_init_$Create$(courseTerminology, systemImpl, json) {
    return CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, objectCreate(protoOf(CourseTerminologyStrings)));
  }
  function Companion_85() {
    Companion_instance_134 = this;
    this.lq8_1 = new CourseTerminologyStrings(emptyList());
  }
  var Companion_instance_134;
  function Companion_getInstance_102() {
    if (Companion_instance_134 == null)
      new Companion_85();
    return Companion_instance_134;
  }
  function CourseTerminologyStrings(terminologyEntries, terminologyKey) {
    Companion_getInstance_102();
    terminologyKey = terminologyKey === VOID ? null : terminologyKey;
    this.mq8_1 = terminologyEntries;
    this.nq8_1 = terminologyKey;
  }
  protoOf(CourseTerminologyStrings).oq8 = function (messageId) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.mq8_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.locale.CourseTerminologyStrings.get.<anonymous>' call
        if (element.qq8_1.equals(messageId)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rq8_1;
  };
  protoOf(CourseTerminologyStrings).equals = function (other) {
    var tmp0_safe_receiver = other instanceof CourseTerminologyStrings ? other : null;
    return equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.mq8_1, this.mq8_1);
  };
  protoOf(CourseTerminologyStrings).hashCode = function () {
    return hashCode(this.mq8_1);
  };
  function mapLookup(_this__u8e3s4, key, map, fallback) {
    var tmp;
    if (fallback === VOID) {
      tmp = mapLookup$lambda;
    } else {
      tmp = fallback;
    }
    fallback = tmp;
    var tmp0_safe_receiver = map.q(key);
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.impl.locale.mapLookup.<anonymous>' call
      tmp_0 = _this__u8e3s4.oq8(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp_0;
    return tmp1_elvis_lhs == null ? fallback(key) : tmp1_elvis_lhs;
  }
  function mapLookup$lambda(it) {
    return '';
  }
  function TerminologyEntry(id, stringResource, term, errorMessage) {
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.pq8_1 = id;
    this.qq8_1 = stringResource;
    this.rq8_1 = term;
    this.sq8_1 = errorMessage;
  }
  protoOf(TerminologyEntry).tq8 = function (id, stringResource, term, errorMessage) {
    return new TerminologyEntry(id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).uq8 = function (id, stringResource, term, errorMessage, $super) {
    id = id === VOID ? this.pq8_1 : id;
    stringResource = stringResource === VOID ? this.qq8_1 : stringResource;
    term = term === VOID ? this.rq8_1 : term;
    errorMessage = errorMessage === VOID ? this.sq8_1 : errorMessage;
    return $super === VOID ? this.tq8(id, stringResource, term, errorMessage) : $super.tq8.call(this, id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).toString = function () {
    return 'TerminologyEntry(id=' + this.pq8_1 + ', stringResource=' + this.qq8_1 + ', term=' + this.rq8_1 + ', errorMessage=' + this.sq8_1 + ')';
  };
  protoOf(TerminologyEntry).hashCode = function () {
    var result = getStringHashCode(this.pq8_1);
    result = imul(result, 31) + this.qq8_1.hashCode() | 0;
    result = imul(result, 31) + (this.rq8_1 == null ? 0 : getStringHashCode(this.rq8_1)) | 0;
    result = imul(result, 31) + (this.sq8_1 == null ? 0 : getStringHashCode(this.sq8_1)) | 0;
    return result;
  };
  protoOf(TerminologyEntry).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TerminologyEntry))
      return false;
    var tmp0_other_with_cast = other instanceof TerminologyEntry ? other : THROW_CCE();
    if (!(this.pq8_1 === tmp0_other_with_cast.pq8_1))
      return false;
    if (!this.qq8_1.equals(tmp0_other_with_cast.qq8_1))
      return false;
    if (!(this.rq8_1 == tmp0_other_with_cast.rq8_1))
      return false;
    if (!(this.sq8_1 == tmp0_other_with_cast.sq8_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListConstants() {
    ClazzEnrolmentListConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1000, strings_getInstance().en5_1);
    var tmp_1 = to(1001, strings_getInstance().rmy_1);
    var tmp_2 = to(1003, strings_getInstance().rnf_1);
    tmp.vq8_1 = mapOf([tmp_0, tmp_1, tmp_2, to(1002, strings_getInstance().on8_1)]);
    var tmp_3 = this;
    var tmp_4 = to(202, strings_getInstance().gmy_1);
    var tmp_5 = to(201, strings_getInstance().qmx_1);
    var tmp_6 = to(203, strings_getInstance().rmx_1);
    tmp_3.wq8_1 = mapOf([tmp_4, tmp_5, tmp_6, to(200, strings_getInstance().fmy_1)]);
  }
  var ClazzEnrolmentListConstants_instance;
  function ClazzEnrolmentListConstants_getInstance() {
    if (ClazzEnrolmentListConstants_instance == null)
      new ClazzEnrolmentListConstants();
    return ClazzEnrolmentListConstants_instance;
  }
  function ConditionConstants() {
    ConditionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().xms_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().yms_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().zms_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().amt_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 203);
    var tmp_8 = strings_getInstance().dmt_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 205);
    var tmp_10 = strings_getInstance().bmt_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 206);
    var tmp_12 = strings_getInstance().cmt_1;
    tmp.xq8_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, new MessageIdOption2(tmp_12, 207)]);
  }
  var ConditionConstants_instance;
  function ConditionConstants_getInstance() {
    if (ConditionConstants_instance == null)
      new ConditionConstants();
    return ConditionConstants_instance;
  }
  function ContentCompletionStatusConstants() {
    ContentCompletionStatusConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().kmm_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().gmm_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 102);
    var tmp_4 = strings_getInstance().fmm_1;
    tmp.yq8_1 = listOf([tmp_1, tmp_3, new MessageIdOption2(tmp_4, 103)]);
  }
  var ContentCompletionStatusConstants_instance;
  function ContentCompletionStatusConstants_getInstance() {
    if (ContentCompletionStatusConstants_instance == null)
      new ContentCompletionStatusConstants();
    return ContentCompletionStatusConstants_instance;
  }
  function EnrolmentPolicyConstants() {
    EnrolmentPolicyConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().wnh_1;
    Companion_getInstance_4();
    var tmp_1 = new MessageIdOption2(tmp_0, 102);
    var tmp_2 = strings_getInstance().wnj_1;
    Companion_getInstance_4();
    tmp.zq8_1 = listOf([tmp_1, new MessageIdOption2(tmp_2, 100)]);
  }
  var EnrolmentPolicyConstants_instance;
  function EnrolmentPolicyConstants_getInstance() {
    if (EnrolmentPolicyConstants_instance == null)
      new EnrolmentPolicyConstants();
    return EnrolmentPolicyConstants_instance;
  }
  function FieldConstants() {
    FieldConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().rms_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().sms_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 101);
    var tmp_4 = strings_getInstance().tms_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 102);
    var tmp_6 = strings_getInstance().ums_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 103);
    var tmp_8 = strings_getInstance().vms_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 104);
    var tmp_10 = strings_getInstance().wms_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 105);
    var tmp_12 = strings_getInstance().dmy_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 106);
    var tmp_14 = strings_getInstance().emy_1;
    tmp.aq9_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, new MessageIdOption2(tmp_14, 107)]);
  }
  var FieldConstants_instance;
  function FieldConstants_getInstance() {
    if (FieldConstants_instance == null)
      new FieldConstants();
    return FieldConstants_instance;
  }
  function LicenceConstants() {
    LicenceConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().imu_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().jmu_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().kmu_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 3);
    var tmp_6 = strings_getInstance().lmu_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 4);
    var tmp_8 = strings_getInstance().omu_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 5);
    var tmp_10 = strings_getInstance().mmu_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 6);
    var tmp_12 = strings_getInstance().nmu_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 7);
    var tmp_14 = strings_getInstance().tmk_1;
    var tmp_15 = new MessageIdOption2(tmp_14, 8);
    var tmp_16 = strings_getInstance().pmu_1;
    var tmp_17 = new MessageIdOption2(tmp_16, 9);
    var tmp_18 = strings_getInstance().umk_1;
    tmp.bq9_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, new MessageIdOption2(tmp_18, 0)]);
  }
  var LicenceConstants_instance;
  function LicenceConstants_getInstance() {
    if (LicenceConstants_instance == null)
      new LicenceConstants();
    return LicenceConstants_instance;
  }
  function OutcomeConstants() {
    OutcomeConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().fmy_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().qmx_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().fmm_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().rmx_1;
    tmp.cq9_1 = listOf([tmp_1, tmp_3, tmp_5, new MessageIdOption2(tmp_6, 203)]);
  }
  var OutcomeConstants_instance;
  function OutcomeConstants_getInstance() {
    if (OutcomeConstants_instance == null)
      new OutcomeConstants();
    return OutcomeConstants_instance;
  }
  function PersonConstants_0() {
    PersonConstants_instance_0 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().smk_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().rmk_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().tmk_1;
    tmp.mq7_1 = listOf([tmp_1, tmp_3, new MessageIdOption2(tmp_4, 4)]);
    var tmp_5 = this;
    var tmp_6 = strings_getInstance().umk_1;
    tmp_5.nq7_1 = plus(listOf_0(new MessageIdOption2(tmp_6, 0)), this.mq7_1);
  }
  var PersonConstants_instance_0;
  function PersonConstants_getInstance_0() {
    if (PersonConstants_instance_0 == null)
      new PersonConstants_0();
    return PersonConstants_instance_0;
  }
  function PersonParentJoinConstants() {
    PersonParentJoinConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().kmv_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().jmv_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().mnb_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 4);
    var tmp_6 = strings_getInstance().tmk_1;
    tmp.dq9_1 = listOf([tmp_1, tmp_3, tmp_5, new MessageIdOption2(tmp_6, 8)]);
  }
  var PersonParentJoinConstants_instance;
  function PersonParentJoinConstants_getInstance() {
    if (PersonParentJoinConstants_instance == null)
      new PersonParentJoinConstants();
    return PersonParentJoinConstants_instance;
  }
  function RoleConstants() {
    RoleConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().en5_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1000);
    var tmp_2 = strings_getInstance().rmy_1;
    tmp.eq9_1 = listOf([tmp_1, new MessageIdOption2(tmp_2, 1001)]);
  }
  var RoleConstants_instance;
  function RoleConstants_getInstance() {
    if (RoleConstants_instance == null)
      new RoleConstants();
    return RoleConstants_instance;
  }
  function ScheduleConstants() {
    ScheduleConstants_instance = this;
    this.fq9_1 = listOf([new MessageIdOption2(strings_getInstance().tmw_1, Companion_instance_29.hkw_1), new MessageIdOption2(strings_getInstance().umw_1, Companion_instance_29.bkw_1), new MessageIdOption2(strings_getInstance().vmw_1, Companion_instance_29.ckw_1), new MessageIdOption2(strings_getInstance().wmw_1, Companion_instance_29.dkw_1), new MessageIdOption2(strings_getInstance().xmw_1, Companion_instance_29.ekw_1), new MessageIdOption2(strings_getInstance().ymw_1, Companion_instance_29.fkw_1), new MessageIdOption2(strings_getInstance().zmw_1, Companion_instance_29.gkw_1)]);
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.fq9_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.locale.entityconstants.ScheduleConstants.DAY_MESSAGE_ID_MAP.<anonymous>' call
      var tmp$ret$0 = to(item.pq7_1, item.oq7_1);
      destination.i1(tmp$ret$0);
    }
    tmp.gq9_1 = toMap(destination);
    this.hq9_1 = mapOf([to(Companion_instance_29.wkv_1, strings_getInstance().qmw_1), to(Companion_instance_29.xkv_1, strings_getInstance().omw_1)]);
  }
  var ScheduleConstants_instance;
  function ScheduleConstants_getInstance() {
    if (ScheduleConstants_instance == null)
      new ScheduleConstants();
    return ScheduleConstants_instance;
  }
  function SubmissionPolicyConstants() {
    SubmissionPolicyConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().ynj_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().znj_1;
    tmp.iq9_1 = listOf([tmp_1, new MessageIdOption2(tmp_2, 2)]);
  }
  var SubmissionPolicyConstants_instance;
  function SubmissionPolicyConstants_getInstance() {
    if (SubmissionPolicyConstants_instance == null)
      new SubmissionPolicyConstants();
    return SubmissionPolicyConstants_instance;
  }
  function CommandFlowUstadNavController() {
    this.jq9_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.kq9_1 = asSharedFlow(this.jq9_1);
  }
  protoOf(CommandFlowUstadNavController).lq9 = function (viewName, args, goOptions) {
    this.jq9_1.i1h(new NavigateNavCommand(viewName, args, goOptions));
  };
  protoOf(CommandFlowUstadNavController).mq9 = function (viewName, inclusive) {
    this.jq9_1.i1h(new PopNavCommand(viewName, inclusive));
  };
  function NavCommand(timestamp) {
    this.nq9_1 = timestamp;
  }
  function NavigateNavCommand(viewName, args, goOptions) {
    NavCommand.call(this, systemTimeInMillis());
    this.pq9_1 = viewName;
    this.qq9_1 = args;
    this.rq9_1 = goOptions;
  }
  protoOf(NavigateNavCommand).toString = function () {
    return 'NavigateNavCommand(viewName=' + this.pq9_1 + ', args=' + this.qq9_1 + ', goOptions=' + this.rq9_1 + ')';
  };
  protoOf(NavigateNavCommand).hashCode = function () {
    var result = getStringHashCode(this.pq9_1);
    result = imul(result, 31) + hashCode(this.qq9_1) | 0;
    result = imul(result, 31) + this.rq9_1.hashCode() | 0;
    return result;
  };
  protoOf(NavigateNavCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NavigateNavCommand))
      return false;
    var tmp0_other_with_cast = other instanceof NavigateNavCommand ? other : THROW_CCE();
    if (!(this.pq9_1 === tmp0_other_with_cast.pq9_1))
      return false;
    if (!equals(this.qq9_1, tmp0_other_with_cast.qq9_1))
      return false;
    if (!this.rq9_1.equals(tmp0_other_with_cast.rq9_1))
      return false;
    return true;
  };
  function PopNavCommand(viewName, inclusive) {
    NavCommand.call(this, systemTimeInMillis());
    this.tq9_1 = viewName;
    this.uq9_1 = inclusive;
  }
  protoOf(PopNavCommand).toString = function () {
    return 'PopNavCommand(viewName=' + this.tq9_1 + ', inclusive=' + this.uq9_1 + ')';
  };
  protoOf(PopNavCommand).hashCode = function () {
    var result = getStringHashCode(this.tq9_1);
    result = imul(result, 31) + getBooleanHashCode(this.uq9_1) | 0;
    return result;
  };
  protoOf(PopNavCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PopNavCommand))
      return false;
    var tmp0_other_with_cast = other instanceof PopNavCommand ? other : THROW_CCE();
    if (!(this.tq9_1 === tmp0_other_with_cast.tq9_1))
      return false;
    if (!(this.uq9_1 === tmp0_other_with_cast.uq9_1))
      return false;
    return true;
  };
  function NavResult(key, timestamp, result) {
    this.vq9_1 = key;
    this.wq9_1 = timestamp;
    this.xq9_1 = result;
  }
  protoOf(NavResult).toString = function () {
    return 'NavResult(key=' + this.vq9_1 + ', timestamp=' + this.wq9_1.toString() + ', result=' + toString_0(this.xq9_1) + ')';
  };
  protoOf(NavResult).hashCode = function () {
    var result = getStringHashCode(this.vq9_1);
    result = imul(result, 31) + this.wq9_1.hashCode() | 0;
    result = imul(result, 31) + (this.xq9_1 == null ? 0 : hashCode(this.xq9_1)) | 0;
    return result;
  };
  protoOf(NavResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NavResult))
      return false;
    var tmp0_other_with_cast = other instanceof NavResult ? other : THROW_CCE();
    if (!(this.vq9_1 === tmp0_other_with_cast.vq9_1))
      return false;
    if (!this.wq9_1.equals(tmp0_other_with_cast.wq9_1))
      return false;
    if (!equals(this.xq9_1, tmp0_other_with_cast.xq9_1))
      return false;
    return true;
  };
  function NavResultDest(viewName, key) {
    this.yq9_1 = viewName;
    this.zq9_1 = key;
  }
  function NavResultReturner() {
  }
  function NavResultReturnerImpl$resultFlowForKey$o$collect$slambda($$this$unsafeFlow, $key, resultContinuation) {
    this.kqa_1 = $$this$unsafeFlow;
    this.lqa_1 = $key;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).qqa = function (value, $completion) {
    var tmp = this.rqa(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.oqa_1 = this.kqa_1;
            var tmp_1 = this;
            tmp_1.pqa_1 = this.mqa_1;
            if (this.pqa_1.vq9_1 === this.lqa_1) {
              this.hd_1 = 3;
              suspendResult = this.oqa_1.t1d(this.pqa_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.nqa_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).rqa = function (value, completion) {
    var i = new NavResultReturnerImpl$resultFlowForKey$o$collect$slambda(this.kqa_1, this.lqa_1, completion);
    i.mqa_1 = value;
    return i;
  };
  function NavResultReturnerImpl$resultFlowForKey$o$collect$slambda_0($$this$unsafeFlow, $key, resultContinuation) {
    var i = new NavResultReturnerImpl$resultFlowForKey$o$collect$slambda($$this$unsafeFlow, $key, resultContinuation);
    var l = function (value, $completion) {
      return i.qqa(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$50(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.aqb_1 = _this__u8e3s4;
    this.bqb_1 = collector;
  }
  protoOf($collectCOROUTINE$50).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.cqb_1 = this.bqb_1;
            this.hd_1 = 1;
            var tmp_1 = NavResultReturnerImpl$resultFlowForKey$o$collect$slambda_0(this.cqb_1, this.aqb_1.eqb_1, null);
            suspendResult = this.aqb_1.dqb_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_1(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function sam$kotlinx_coroutines_flow_FlowCollector$0_1(function_0) {
    this.fqb_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_1).t1d = function (value, $completion) {
    return this.fqb_1(value, $completion);
  };
  function _no_name_provided__qut3iv_0($this, $key) {
    this.dqb_1 = $this;
    this.eqb_1 = $key;
  }
  protoOf(_no_name_provided__qut3iv_0).gqb = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$50(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_0).a1c = function (collector, $completion) {
    return this.gqb(collector, $completion);
  };
  function NavResultReturnerImpl() {
    this.hqb_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
  }
  protoOf(NavResultReturnerImpl).aqa = function (key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = this.hqb_1;
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_0(this_0, key);
  };
  protoOf(NavResultReturnerImpl).bqa = function (result) {
    this.hqb_1.i1h(result);
  };
  function UstadNavController() {
  }
  function BitmaskFlag(flagVal, stringResource, enabled) {
    enabled = enabled === VOID ? false : enabled;
    this.iqb_1 = flagVal;
    this.jqb_1 = stringResource;
    this.kqb_1 = enabled;
  }
  protoOf(BitmaskFlag).lqb = function (flagVal, stringResource, enabled) {
    return new BitmaskFlag(flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).mqb = function (flagVal, stringResource, enabled, $super) {
    flagVal = flagVal === VOID ? this.iqb_1 : flagVal;
    stringResource = stringResource === VOID ? this.jqb_1 : stringResource;
    enabled = enabled === VOID ? this.kqb_1 : enabled;
    return $super === VOID ? this.lqb(flagVal, stringResource, enabled) : $super.lqb.call(this, flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).toString = function () {
    return 'BitmaskFlag(flagVal=' + this.iqb_1.toString() + ', stringResource=' + this.jqb_1 + ', enabled=' + this.kqb_1 + ')';
  };
  protoOf(BitmaskFlag).hashCode = function () {
    var result = this.iqb_1.hashCode();
    result = imul(result, 31) + this.jqb_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kqb_1) | 0;
    return result;
  };
  protoOf(BitmaskFlag).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BitmaskFlag))
      return false;
    var tmp0_other_with_cast = other instanceof BitmaskFlag ? other : THROW_CCE();
    if (!this.iqb_1.equals(tmp0_other_with_cast.iqb_1))
      return false;
    if (!this.jqb_1.equals(tmp0_other_with_cast.jqb_1))
      return false;
    if (!(this.kqb_1 === tmp0_other_with_cast.kqb_1))
      return false;
    return true;
  };
  function ListPagingSource(list) {
    PagingSource.call(this);
    this.oqb_1 = list;
  }
  protoOf(ListPagingSource).c5s = function (params, $completion) {
    var tmp0_elvis_lhs = params.s2();
    var startFrom = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
    var loadSize = params.h54_1;
    var tmp1_elvis_lhs = params.s2();
    var tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    // Inline function 'kotlin.math.min' call
    var a = this.oqb_1.u();
    var b = startFrom + loadSize | 0;
    var tmp$ret$0 = Math.min(a, b);
    var subList = this.oqb_1.z(tmp, tmp$ret$0);
    var tmp_0;
    if (startFrom > 0) {
      // Inline function 'kotlin.math.max' call
      var b_0 = startFrom - loadSize | 0;
      tmp_0 = Math.max(0, b_0);
    } else {
      tmp_0 = null;
    }
    var tmp_1 = tmp_0;
    var tmp_2;
    if ((startFrom + loadSize | 0) < this.oqb_1.u()) {
      tmp_2 = startFrom + loadSize | 0;
    } else {
      tmp_2 = null;
    }
    var tmp_3 = Page_init_$Create$(subList, tmp_1, tmp_2);
    return tmp_3 instanceof LoadResult ? tmp_3 : THROW_CCE();
  };
  protoOf(ListPagingSource).p54 = function (params, $completion) {
    return this.c5s(params, $completion);
  };
  function RefreshCommand(time) {
    time = time === VOID ? systemTimeInMillis() : time;
    this.pqb_1 = time;
  }
  function generateUid(_this__u8e3s4) {
    return toLong(_this__u8e3s4.ha4_1.hashCode()).rc(32).vc(toLong(_this__u8e3s4.ia4_1.hashCode()));
  }
  function get_totalAttendeeStatusRecorded(_this__u8e3s4) {
    return (_this__u8e3s4.na4_1 + _this__u8e3s4.pa4_1 | 0) + _this__u8e3s4.oa4_1 | 0;
  }
  function Activity(id, aType, lang) {
    lang = lang === VOID ? 'en' : lang;
    this.lp9_1 = aType;
    this.mp9_1 = lang;
    this.op9_1 = null;
    this.pp9_1 = null;
    this.qp9_1 = null;
    this.rp9_1 = null;
    this.sp9_1 = new JsonObject(mapOf_0(to('id', JsonPrimitive_0(id))));
    this.np9_1 = id;
  }
  protoOf(Activity).qqb = function (key, value) {
    // Inline function 'kotlin.collections.isNullOrEmpty' call
    var this_0 = this.rp9_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : this_0.c1()) {
      var tmp = this;
      // Inline function 'kotlin.collections.mutableMapOf' call
      tmp.rp9_1 = LinkedHashMap_init_$Create$();
    }
    // Inline function 'kotlin.collections.set' call
    ensureNotNull(this.rp9_1).s(key, value);
  };
  function Companion_86() {
    this.gp9_1 = 1;
  }
  protoOf(Companion_86).rqb = function (xpp, parseFlags) {
    var tcxml = new TinCanXML();
    var activity = null;
    var evtType = xpp.l7d();
    var storeActivities = (parseFlags & this.gp9_1) === this.gp9_1;
    var inExtensions = false;
    var tagName;
    var extKey;
    var extVal;
    $l$1: do {
      $l$0: do {
        var tmp;
        var tmp_0 = evtType;
        if (tmp_0 === 2) {
          tmp = !(xpp.k7d() == null);
        } else {
          tmp = false;
        }
        if (tmp) {
          tagName = ensureNotNull(xpp.k7d());
          if (!inExtensions) {
            if (tagName === 'activity') {
              activity = new Activity(ensureNotNull(xpp.m7d(null, 'id')), ensureNotNull(xpp.m7d(null, 'type')));
            } else {
              var tmp_1;
              if (tagName === 'launch') {
                var tmp_2 = xpp.e();
                tmp_1 = tmp_2 === 4;
              } else {
                tmp_1 = false;
              }
              if (tmp_1) {
                ensureNotNull(activity).qp9_1 = xpp.j7d();
              } else {
                var tmp_3;
                if (tagName === 'name') {
                  var tmp_4 = xpp.e();
                  tmp_3 = tmp_4 === 4;
                } else {
                  tmp_3 = false;
                }
                if (tmp_3) {
                  ensureNotNull(activity).pp9_1 = xpp.j7d();
                } else {
                  var tmp_5;
                  if (tagName === 'description') {
                    var tmp_6 = xpp.e();
                    tmp_5 = tmp_6 === 4;
                  } else {
                    tmp_5 = false;
                  }
                  if (tmp_5) {
                    ensureNotNull(activity).op9_1 = xpp.j7d();
                  } else {
                    if (xpp.k7d() === 'extensions') {
                      inExtensions = true;
                    }
                  }
                }
              }
            }
          } else {
            if (tagName === 'extension') {
              extKey = ensureNotNull(xpp.m7d(null, 'key'));
              var tmp_7;
              var tmp_8 = xpp.e();
              if (tmp_8 === 4) {
                var tmp0_elvis_lhs = xpp.j7d();
                tmp_7 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
              } else {
                tmp_7 = '';
              }
              extVal = tmp_7;
              ensureNotNull(activity).qqb(extKey, extVal);
            }
          }
        } else {
          var tmp_9 = evtType;
          if (tmp_9 === 3) {
            if (!(xpp.k7d() == null)) {
              if (xpp.k7d() === 'activity') {
                if (!(ensureNotNull(activity).qp9_1 == null)) {
                  tcxml.ip9_1 = activity;
                  if (!storeActivities) {
                    break $l$1;
                  }
                }
              } else if (xpp.k7d() === 'extensions') {
                inExtensions = false;
              }
            }
          }
        }
        evtType = xpp.e();
      }
       while (false);
      var tmp_10 = evtType;
    }
     while (!(tmp_10 === 1));
    return tcxml;
  };
  protoOf(Companion_86).hp9 = function (xpp, parseFlags, $super) {
    parseFlags = parseFlags === VOID ? 0 : parseFlags;
    return $super === VOID ? this.rqb(xpp, parseFlags) : $super.rqb.call(this, xpp, parseFlags);
  };
  var Companion_instance_135;
  function Companion_getInstance_103() {
    return Companion_instance_135;
  }
  function TinCanXML() {
    this.ip9_1 = null;
    this.jp9_1 = false;
    this.kp9_1 = null;
  }
  function Companion_87() {
    this.sqb_1 = 1000;
  }
  var Companion_instance_136;
  function Companion_getInstance_104() {
    return Companion_instance_136;
  }
  function UsernameSuggestionUseCase(filterUsernameUseCase, db) {
    this.tqb_1 = filterUsernameUseCase;
    this.uqb_1 = db;
  }
  function UsernameErrorException() {
  }
  function avatarColorForName(name) {
    var hash = 0;
    // Inline function 'kotlin.text.forEach' call
    var inductionVariable = 0;
    while (inductionVariable < charSequenceLength(name)) {
      var element = charSequenceGet(name, inductionVariable);
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.util.avatarColorForName.<anonymous>' call
      // Inline function 'kotlin.code' call
      hash = Char__toInt_impl_vasixd(element) + ((hash << 5) - hash | 0) | 0;
    }
    var colorInt = hash | 255;
    return colorInt;
  }
  function requireEntryByUri(_this__u8e3s4, uri) {
    var tmp0_elvis_lhs = entryByUri(_this__u8e3s4, uri);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('Manifest has no entry for ' + uri);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function entryByUri(_this__u8e3s4, uri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = _this__u8e3s4.yof_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.entryByUri.<anonymous>' call
        if (element.cog_1 === uri) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  }
  function bodyDataUrlForUri(_this__u8e3s4, uri) {
    var tmp0_safe_receiver = entryByUri(_this__u8e3s4, uri);
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kog_1;
  }
  function requireBodyUrlForUri(_this__u8e3s4, uri) {
    return requireEntryByUri(_this__u8e3s4, uri).kog_1;
  }
  function DiTag() {
    this.vqb_1 = 13;
    this.wqb_1 = 81;
    this.xqb_1 = 1;
    this.yqb_1 = 0;
    this.zqb_1 = 32;
    this.aqc_1 = 42;
  }
  var DiTag_instance;
  function DiTag_getInstance() {
    return DiTag_instance;
  }
  function tryReceiveAll(_this__u8e3s4, $this) {
    var resultList = mutableLinkedListOf([]);
    while (true) {
      var result = _this__u8e3s4.a1a();
      if (_ChannelResult___get_isSuccess__impl__odq1z9(result)) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = ChannelResult__getOrThrow_impl_od1axs(result);
        resultList.i1(element);
      } else
        return resultList;
    }
  }
  function EventCollator2$receiveEvent$slambda(this$0, resultContinuation) {
    this.jqc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EventCollator2$receiveEvent$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EventCollator2$receiveEvent$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EventCollator2$receiveEvent$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = delay(this.jqc_1.lqc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jqc_1.pqc_1 = null;
            this.hd_1 = 2;
            suspendResult = this.jqc_1.nqc_1(tryReceiveAll(this.jqc_1.oqc_1, this.jqc_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EventCollator2$receiveEvent$slambda).v1m = function ($this$launch, completion) {
    var i = new EventCollator2$receiveEvent$slambda(this.jqc_1, completion);
    i.kqc_1 = $this$launch;
    return i;
  };
  function EventCollator2$receiveEvent$slambda_0(this$0, resultContinuation) {
    var i = new EventCollator2$receiveEvent$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EventCollator2(maxWaitTime, coroutineScope, capacity, onBufferOverflow, onCollate) {
    this.lqc_1 = maxWaitTime;
    this.mqc_1 = coroutineScope;
    this.nqc_1 = onCollate;
    this.oqc_1 = Channel(capacity, onBufferOverflow);
    this.pqc_1 = null;
  }
  protoOf(EventCollator2).s6x = function (event) {
    this.oqc_1.w19(event);
    if (this.pqc_1 == null) {
      var tmp = this;
      tmp.pqc_1 = launch(this.mqc_1, VOID, VOID, EventCollator2$receiveEvent$slambda_0(this, null));
    }
  };
  function ExceptionWithStringResource() {
  }
  function Companion_88() {
    Companion_instance_137 = this;
    this.qqc_1 = -1;
    this.rqc_1 = new MessageIdOption2(strings_getInstance().umk_1, this.qqc_1);
  }
  var Companion_instance_137;
  function Companion_getInstance_105() {
    if (Companion_instance_137 == null)
      new Companion_88();
    return Companion_instance_137;
  }
  function MessageIdOption2(stringResource, value) {
    Companion_getInstance_105();
    this.oq7_1 = stringResource;
    this.pq7_1 = value;
  }
  protoOf(MessageIdOption2).toString = function () {
    return 'MessageIdOption2(stringResource=' + this.oq7_1 + ', value=' + this.pq7_1 + ')';
  };
  protoOf(MessageIdOption2).hashCode = function () {
    var result = this.oq7_1.hashCode();
    result = imul(result, 31) + this.pq7_1 | 0;
    return result;
  };
  protoOf(MessageIdOption2).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MessageIdOption2))
      return false;
    var tmp0_other_with_cast = other instanceof MessageIdOption2 ? other : THROW_CCE();
    if (!this.oq7_1.equals(tmp0_other_with_cast.oq7_1))
      return false;
    if (!(this.pq7_1 === tmp0_other_with_cast.pq7_1))
      return false;
    return true;
  };
  function get_MS_PER_HOUR() {
    return MS_PER_HOUR;
  }
  var MS_PER_HOUR;
  function get_MS_PER_MIN() {
    return MS_PER_MIN;
  }
  var MS_PER_MIN;
  function SortOrderOption(fieldMessageId, flag, order) {
    this.sqc_1 = fieldMessageId;
    this.tqc_1 = flag;
    this.uqc_1 = order;
  }
  protoOf(SortOrderOption).toString = function () {
    return 'SortOrderOption(fieldMessageId=' + this.sqc_1 + ', flag=' + this.tqc_1 + ', order=' + this.uqc_1 + ')';
  };
  protoOf(SortOrderOption).hashCode = function () {
    var result = this.sqc_1.hashCode();
    result = imul(result, 31) + this.tqc_1 | 0;
    result = imul(result, 31) + (this.uqc_1 == null ? 0 : getBooleanHashCode(this.uqc_1)) | 0;
    return result;
  };
  protoOf(SortOrderOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SortOrderOption))
      return false;
    var tmp0_other_with_cast = other instanceof SortOrderOption ? other : THROW_CCE();
    if (!this.sqc_1.equals(tmp0_other_with_cast.sqc_1))
      return false;
    if (!(this.tqc_1 === tmp0_other_with_cast.tqc_1))
      return false;
    if (!(this.uqc_1 == tmp0_other_with_cast.uqc_1))
      return false;
    return true;
  };
  function splitString($this, str, splitChar) {
    var numParts = countChar($this, str, splitChar);
    // Inline function 'kotlin.arrayOfNulls' call
    var size = numParts + 1 | 0;
    var splitStr = fillArrayVal(Array(size), null);
    var buffer = StringBuilder_init_$Create$();
    var partCounter = 0;
    var currentChar;
    var inductionVariable = 0;
    var last = str.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        currentChar = charSequenceGet(str, i);
        if (currentChar === splitChar) {
          splitStr[partCounter] = buffer.toString();
          partCounter = partCounter + 1 | 0;
          buffer = StringBuilder_init_$Create$();
        } else {
          buffer.z5(currentChar);
        }
      }
       while (inductionVariable < last);
    splitStr[partCounter] = buffer.toString();
    return splitStr;
  }
  function countChar($this, str, c) {
    var count = 0;
    var strLen = str.length;
    var inductionVariable = 0;
    if (inductionVariable < strLen)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (charSequenceGet(str, i) === c) {
          count = count + 1 | 0;
        }
      }
       while (inductionVariable < strLen);
    return count;
  }
  function isWhiteSpace($this, c) {
    return ((c === _Char___init__impl__6a9atx(32) ? true : c === _Char___init__impl__6a9atx(10)) ? true : c === _Char___init__impl__6a9atx(9)) ? true : c === _Char___init__impl__6a9atx(13);
  }
  function UMFileUtil() {
    UMFileUtil_instance = this;
    this.vp9_1 = _Char___init__impl__6a9atx(47);
    this.wp9_1 = 'file:///';
    this.xp9_1 = new Long(1073741824, 0);
    this.yp9_1 = new Long(1048576, 0);
    this.zp9_1 = new Long(1024, 0);
  }
  protoOf(UMFileUtil).vpi = function (paths) {
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.UMFileUtil.joinPaths.<anonymous>' call
    // Inline function 'kotlin.collections.forEachIndexed' call
    var index = 0;
    var inductionVariable = 0;
    var last = paths.length;
    while (inductionVariable < last) {
      var item = paths[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.util.UMFileUtil.joinPaths.<anonymous>.<anonymous>' call
      var tmp1 = index;
      index = tmp1 + 1 | 0;
      var tmp;
      if (tmp1 > 0) {
        tmp = removePrefix(item, '/');
      } else {
        tmp = item;
      }
      this_0.y5(tmp);
      if (tmp1 < (paths.length - 1 | 0) ? !endsWith(item, '/') : false) {
        this_0.z5(_Char___init__impl__6a9atx(47));
      }
    }
    return this_0.toString();
  };
  protoOf(UMFileUtil).apa = function (baseLink, link) {
    var base = baseLink;
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var linkLower = link.toLowerCase();
    var charFoundIndex;
    charFoundIndex = indexOf_0(linkLower, '://');
    if (!(charFoundIndex === -1)) {
      var isAllChars = true;
      var cc;
      var inductionVariable = 0;
      var last = charFoundIndex;
      if (inductionVariable < last)
        do {
          var i = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          cc = charSequenceGet(linkLower, i);
          isAllChars = !!(isAllChars & (((((Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(97)) > 0 ? Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(122)) < 0 : false) ? true : Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(48)) > 0 ? Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(57)) < 0 : false) ? true : cc === _Char___init__impl__6a9atx(43)) ? true : cc === _Char___init__impl__6a9atx(46)) ? true : cc === _Char___init__impl__6a9atx(45)));
        }
         while (inductionVariable < last);
      if (isAllChars) {
        return link;
      }
    }
    if (startsWith(link, 'data:')) {
      return link;
    }
    if ((link.length > 2 ? charSequenceGet(link, 0) === _Char___init__impl__6a9atx(47) : false) ? charSequenceGet(link, 1) === _Char___init__impl__6a9atx(47) : false) {
      // Inline function 'kotlin.text.substring' call
      var this_0 = base;
      var endIndex = indexOf(base, _Char___init__impl__6a9atx(58)) + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      return this_0.substring(0, endIndex) + link;
    }
    if (link.length > 1 ? charSequenceGet(link, 0) === _Char___init__impl__6a9atx(47) : false) {
      var serverStartPos = indexOf_0(base, '://') + 3 | 0;
      var serverFinishPos = indexOf(base, _Char___init__impl__6a9atx(47), serverStartPos + 1 | 0);
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      return base.substring(0, serverFinishPos) + link;
    }
    charFoundIndex = indexOf(base, _Char___init__impl__6a9atx(63));
    if (!(charFoundIndex === -1)) {
      // Inline function 'kotlin.text.substring' call
      var this_1 = base;
      var endIndex_0 = charFoundIndex;
      // Inline function 'kotlin.js.asDynamic' call
      base = this_1.substring(0, endIndex_0);
    }
    charFoundIndex = lastIndexOf(base, _Char___init__impl__6a9atx(47));
    if (charFoundIndex === -1) {
      return link;
    }
    // Inline function 'kotlin.text.substring' call
    var this_2 = base;
    var endIndex_1 = charFoundIndex;
    // Inline function 'kotlin.js.asDynamic' call
    base = this_2.substring(0, endIndex_1);
    var baseParts = splitString(this, base, _Char___init__impl__6a9atx(47));
    var linkParts = splitString(this, link, _Char___init__impl__6a9atx(47));
    // Inline function 'kotlin.collections.mutableListOf' call
    var resultVector = ArrayList_init_$Create$();
    var inductionVariable_0 = 0;
    var last_0 = baseParts.length - 1 | 0;
    if (inductionVariable_0 <= last_0)
      do {
        var i_0 = inductionVariable_0;
        inductionVariable_0 = inductionVariable_0 + 1 | 0;
        resultVector.i1(ensureNotNull(baseParts[i_0]));
      }
       while (inductionVariable_0 <= last_0);
    var inductionVariable_1 = 0;
    var last_1 = linkParts.length - 1 | 0;
    if (inductionVariable_1 <= last_1)
      $l$loop: do {
        var i_1 = inductionVariable_1;
        inductionVariable_1 = inductionVariable_1 + 1 | 0;
        if (linkParts[i_1] === '.') {
          continue $l$loop;
        }
        if (linkParts[i_1] === '..') {
          resultVector.s1(resultVector.u() - 1 | 0);
        } else {
          resultVector.i1(ensureNotNull(linkParts[i_1]));
        }
      }
       while (inductionVariable_1 <= last_1);
    var resultSB = StringBuilder_init_$Create$();
    var numElements = resultVector.u();
    var inductionVariable_2 = 0;
    if (inductionVariable_2 < numElements)
      do {
        var i_2 = inductionVariable_2;
        inductionVariable_2 = inductionVariable_2 + 1 | 0;
        // Inline function 'kotlin.collections.elementAt' call
        var tmp$ret$11 = resultVector.v(i_2);
        resultSB.y5(tmp$ret$11);
        if (i_2 < (numElements - 1 | 0)) {
          resultSB.z5(_Char___init__impl__6a9atx(47));
        }
      }
       while (inductionVariable_2 < numElements);
    return resultSB.toString();
  };
  protoOf(UMFileUtil).vqc = function (str, deliminator) {
    var paramName = null;
    var params = HashMap_init_$Create$();
    var inQuotes = false;
    var strLen = str.length;
    var sb = StringBuilder_init_$Create$();
    var c;
    var lastChar = _Char___init__impl__6a9atx(0);
    var inductionVariable = 0;
    if (inductionVariable < strLen)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        c = charSequenceGet(str, i);
        if (c === _Char___init__impl__6a9atx(34)) {
          if (!inQuotes) {
            inQuotes = true;
          } else if (inQuotes ? !(lastChar === _Char___init__impl__6a9atx(92)) : false) {
            inQuotes = false;
          }
        }
        if (!((isWhiteSpace(this, c) ? !inQuotes : false) ? true : c === _Char___init__impl__6a9atx(34) ? i < (strLen - 1 | 0) : false))
          if (c === deliminator ? true : i === (strLen - 1 | 0)) {
            if (i === (strLen - 1 | 0) ? !(c === _Char___init__impl__6a9atx(34)) : false) {
              sb.z5(c);
            }
            if (!(paramName == null)) {
              // Inline function 'kotlin.collections.set' call
              var key = paramName;
              var value = sb.toString();
              params.s(key, value);
            } else {
              // Inline function 'kotlin.collections.set' call
              var key_0 = sb.toString();
              params.s(key_0, '');
            }
            sb = StringBuilder_init_$Create$();
            paramName = null;
          } else if (c === _Char___init__impl__6a9atx(61)) {
            paramName = sb.toString();
            sb = StringBuilder_init_$Create$();
          } else {
            sb.z5(c);
          }
        lastChar = c;
      }
       while (inductionVariable < strLen);
    return params;
  };
  protoOf(UMFileUtil).parseURLQueryString = function (urlQuery) {
    var retVal = urlQuery;
    var queryPos = indexOf(retVal, _Char___init__impl__6a9atx(63));
    if (!(queryPos === -1)) {
      // Inline function 'kotlin.text.substring' call
      var this_0 = retVal;
      var startIndex = queryPos + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      retVal = this_0.substring(startIndex);
    }
    var parsedParams = this.vqc(retVal, _Char___init__impl__6a9atx(38));
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(parsedParams.u());
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = parsedParams.q2().w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.UMFileUtil.parseURLQueryString.<anonymous>' call
      var tmp$ret$3 = to(Companion_instance_259.wqc(item.s2()), Companion_instance_259.wqc(item.t2()));
      destination.i1(tmp$ret$3);
    }
    return toMap(destination);
  };
  protoOf(UMFileUtil).mapToQueryString = function (ht) {
    var sb = StringBuilder_init_$Create$();
    if (ht.c1()) {
      return '';
    }
    var keys = ht.o2().w();
    var key;
    var firstEl = true;
    while (keys.f()) {
      if (!firstEl) {
        sb.z5(_Char___init__impl__6a9atx(38));
      } else {
        firstEl = false;
      }
      key = keys.e();
      sb.y5(Companion_instance_259.xqc(key)).z5(_Char___init__impl__6a9atx(61));
      var tmp = Companion_instance_259;
      var tmp_0 = ht.q(key);
      sb.y5(tmp.xqc((!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE()));
    }
    return sb.toString();
  };
  protoOf(UMFileUtil).yqc = function (fileSize) {
    var unit;
    var factor;
    if (fileSize.c7(new Long(1073741824, 0)) > 0) {
      factor = new Long(1073741824, 0);
      unit = 'GB';
    } else if (fileSize.c7(new Long(1048576, 0)) > 0) {
      factor = new Long(1048576, 0);
      unit = 'MB';
    } else if (fileSize.c7(new Long(1024, 0)) > 0) {
      factor = new Long(1024, 0);
      unit = 'kB';
    } else {
      factor = new Long(1, 0);
      unit = 'bytes';
    }
    var unitSize = fileSize.a7() / factor.a7();
    unitSize = round(unitSize * 100) / 100.0;
    return '' + unitSize + ' ' + unit;
  };
  protoOf(UMFileUtil).zqc = function (fileSize) {
    var fileSizeMb = roundTo(fileSize.zc() / 1048576, 2);
    return '' + fileSizeMb + ' MB';
  };
  var UMFileUtil_instance;
  function UMFileUtil_getInstance() {
    if (UMFileUtil_instance == null)
      new UMFileUtil();
    return UMFileUtil_instance;
  }
  function Companion_89() {
    this.aqd_1 = '/#/';
  }
  protoOf(Companion_89).bqd = function (url, divider) {
    var dividerIndex = indexOf_0(url, divider);
    if (dividerIndex === -1)
      throw IllegalArgumentException_init_$Create$('Not a valid UstadUrl: ' + url);
    // Inline function 'kotlin.text.substring' call
    var endIndex = dividerIndex + 1 | 0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$1 = url.substring(0, endIndex);
    var endpoint = removeSuffix(tmp$ret$1, 'umapp/');
    var queryIndex = indexOf_0(url, '?', dividerIndex);
    var viewName;
    var queryString;
    if (queryIndex === -1 ? true : queryIndex === (url.length - 1 | 0)) {
      // Inline function 'kotlin.text.substring' call
      var startIndex = dividerIndex + divider.length | 0;
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$3 = url.substring(startIndex);
      viewName = removeSuffix(tmp$ret$3, '?');
      queryString = '';
    } else {
      // Inline function 'kotlin.text.substring' call
      var startIndex_0 = dividerIndex + divider.length | 0;
      // Inline function 'kotlin.js.asDynamic' call
      viewName = url.substring(startIndex_0, queryIndex);
      // Inline function 'kotlin.text.substring' call
      var startIndex_1 = queryIndex + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      queryString = url.substring(startIndex_1);
    }
    return new UstadUrlComponents(endpoint, viewName, queryString);
  };
  protoOf(Companion_89).cqd = function (url, divider, $super) {
    divider = divider === VOID ? '/#/' : divider;
    return $super === VOID ? this.bqd(url, divider) : $super.bqd.call(this, url, divider);
  };
  var Companion_instance_138;
  function Companion_getInstance_106() {
    return Companion_instance_138;
  }
  function UstadUrlComponents$arguments$delegate$lambda(this$0) {
    return function () {
      var parsedParams = UMFileUtil_getInstance().vqc(this$0.nom_1, _Char___init__impl__6a9atx(38));
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(parsedParams.u());
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator = parsedParams.q2().w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.UstadUrlComponents.arguments$delegate.<anonymous>.<anonymous>' call
        var tmp$ret$1 = to(Companion_instance_259.wqc(item.s2()), Companion_instance_259.wqc(item.t2()));
        destination.i1(tmp$ret$1);
      }
      return toMap(destination);
    };
  }
  function UstadUrlComponents$viewUri$delegate$lambda(this$0) {
    return function () {
      var tmp;
      // Inline function 'kotlin.text.isEmpty' call
      var this_0 = this$0.nom_1;
      if (charSequenceLength(this_0) === 0) {
        tmp = this$0.mom_1;
      } else {
        tmp = this$0.mom_1 + '?' + this$0.nom_1;
      }
      return tmp;
    };
  }
  function UstadUrlComponents(learningSpace, viewName, queryString) {
    this.lom_1 = learningSpace;
    this.mom_1 = viewName;
    this.nom_1 = queryString;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.oom_1 = lazy(tmp_0, UstadUrlComponents$arguments$delegate$lambda(this));
    var tmp_1 = this;
    tmp_1.pom_1 = lazy_0(UstadUrlComponents$viewUri$delegate$lambda(this));
  }
  protoOf(UstadUrlComponents).dqd = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.pom_1;
    viewUri$factory();
    return this_0.t2();
  };
  protoOf(UstadUrlComponents).eqd = function (divider) {
    return UMFileUtil_getInstance().vpi([this.lom_1, divider, this.dqd()]);
  };
  protoOf(UstadUrlComponents).qom = function (divider, $super) {
    var tmp;
    if (divider === VOID) {
      Companion_getInstance_96();
      tmp = '/umapp/#/';
    } else {
      tmp = divider;
    }
    divider = tmp;
    return $super === VOID ? this.eqd(divider) : $super.eqd.call(this, divider);
  };
  protoOf(UstadUrlComponents).toString = function () {
    return 'UstadUrlComponents(learningSpace=' + this.lom_1 + ', viewName=' + this.mom_1 + ', queryString=' + this.nom_1 + ')';
  };
  protoOf(UstadUrlComponents).hashCode = function () {
    var result = getStringHashCode(this.lom_1);
    result = imul(result, 31) + getStringHashCode(this.mom_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.nom_1) | 0;
    return result;
  };
  protoOf(UstadUrlComponents).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadUrlComponents))
      return false;
    var tmp0_other_with_cast = other instanceof UstadUrlComponents ? other : THROW_CCE();
    if (!(this.lom_1 === tmp0_other_with_cast.lom_1))
      return false;
    if (!(this.mom_1 === tmp0_other_with_cast.mom_1))
      return false;
    if (!(this.nom_1 === tmp0_other_with_cast.nom_1))
      return false;
    return true;
  };
  function viewUri$factory() {
    return getPropertyCallableRef('viewUri', 1, KProperty1, function (receiver) {
      return receiver.dqd();
    }, null);
  }
  function roundTo(_this__u8e3s4, decimalPlaces) {
    decimalPlaces = decimalPlaces === VOID ? 0 : decimalPlaces;
    // Inline function 'kotlin.math.pow' call
    var factor = Math.pow(10.0, decimalPlaces);
    return roundToInt(_this__u8e3s4 * factor) / factor;
  }
  function toDisplayString(_this__u8e3s4, decimalPlaces) {
    decimalPlaces = decimalPlaces === VOID ? 2 : decimalPlaces;
    var strVal = _this__u8e3s4.toString();
    var tmp;
    // Inline function 'kotlin.math.round' call
    if (round(_this__u8e3s4) === _this__u8e3s4) {
      tmp = substringBefore(strVal, _Char___init__impl__6a9atx(46));
    } else {
      tmp = removeSuffix(roundTo(_this__u8e3s4, decimalPlaces).toString(), '0');
    }
    return tmp;
  }
  function paramSubtitles(_this__u8e3s4, json) {
    var tmp0_safe_receiver = paramMap(_this__u8e3s4, json);
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = tmp0_safe_receiver.q('subtitles');
    }
    var tmp1_safe_receiver = tmp;
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.paramSubtitles.<anonymous>' call
      tmp_0 = json.s45(ListSerializer(Companion_instance_80.n4r()), tmp1_safe_receiver);
    }
    return tmp_0;
  }
  function paramMap(_this__u8e3s4, json) {
    var tmp0_safe_receiver = _this__u8e3s4.ebd_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.paramMap.<anonymous>' call
      tmp = json.s45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), tmp0_safe_receiver);
    }
    return tmp;
  }
  function penaltyPercentage(_this__u8e3s4) {
    // Inline function 'kotlin.math.roundToInt' call
    var this_0 = _this__u8e3s4.nbw_1 * 100 / (_this__u8e3s4.lbw_1 + _this__u8e3s4.nbw_1);
    return roundToInt(this_0);
  }
  function textLength(_this__u8e3s4, limitType) {
    var tmp;
    if (limitType === 1) {
      var tmp0_safe_receiver = _this__u8e3s4.oc2_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : countWords(tmp1_safe_receiver);
      tmp = tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs;
    } else {
      if (limitType === 2) {
        var tmp3_safe_receiver = _this__u8e3s4.oc2_1;
        var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : htmlToPlainText(tmp3_safe_receiver);
        var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.length;
        tmp = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function lastPossibleSubmissionTime(_this__u8e3s4) {
    if (isDateSet(_this__u8e3s4.d7y_1) ? _this__u8e3s4.d7y_1.c7(_this__u8e3s4.b7y_1) > 0 : false)
      return _this__u8e3s4.d7y_1;
    else
      return _this__u8e3s4.b7y_1;
  }
  function maxScoreSummedIfModule(_this__u8e3s4, allBlocks) {
    var tmp = _this__u8e3s4.u7x_1;
    if (!(tmp === 100))
      return _this__u8e3s4.e7y_1;
    var totalModPoints = 0.0;
    var numModBlocks = 0;
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = allBlocks.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.maxScoreSummedIfModule.<anonymous>' call
      if (element.w7x_1.equals(_this__u8e3s4.t7x_1)) {
        numModBlocks = numModBlocks + 1 | 0;
        var tmp_0 = totalModPoints;
        var tmp1_elvis_lhs = element.e7y_1;
        totalModPoints = tmp_0 + (tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs);
      }
    }
    return (numModBlocks > 0 ? totalModPoints > 0.0 : false) ? totalModPoints : null;
  }
  function toTerminologyEntries(_this__u8e3s4, json, systemImpl) {
    var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.o8g_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toTerminologyEntries.<anonymous>' call
      tmp = decodeStringMapFromString(json, tmp1_safe_receiver);
    }
    var tmp2_elvis_lhs = tmp;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      // Inline function 'kotlin.collections.mapOf' call
      tmp_0 = emptyMap();
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var termMap = tmp_0;
    // Inline function 'kotlin.collections.map' call
    var this_0 = TerminologyKeys_getInstance().toh_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(this_0.u());
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = this_0.q2().w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.toTerminologyEntries.<anonymous>' call
      var tmp_1 = item.s2();
      var tmp_2 = item.t2();
      var tmp1_elvis_lhs = termMap.q(item.s2());
      var tmp_3;
      if (tmp1_elvis_lhs == null) {
        tmp_3 = systemImpl == null ? null : systemImpl.moj(item.t2());
      } else {
        tmp_3 = tmp1_elvis_lhs;
      }
      var tmp$ret$4 = new TerminologyEntry(tmp_1, tmp_2, tmp_3);
      destination.i1(tmp$ret$4);
    }
    return destination;
  }
  function encodeToStringMap(_this__u8e3s4, json) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.encodeToStringMap.<anonymous>' call
      var tmp0_elvis_lhs = item.rq8_1;
      var tmp$ret$0 = to(item.pq8_1, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
      destination.i1(tmp$ret$0);
    }
    return encodeStringMapToString(json, toMap(destination));
  }
  function onActiveLearningSpace(_this__u8e3s4) {
    // Inline function 'org.kodein.di.on' call
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(_this__u8e3s4).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var context = tmp.d58(tmp$ret$0, null).loa();
    var trigger = _this__u8e3s4.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_1 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp$ret$3 = tmp_1.h57(tmp$ret$2, context);
    return On(_this__u8e3s4, tmp$ret$3, trigger);
  }
  function get_dayStringResource(_this__u8e3s4) {
    switch (_this__u8e3s4.za_1) {
      case 0:
        return strings_getInstance().umw_1;
      case 1:
        return strings_getInstance().vmw_1;
      case 2:
        return strings_getInstance().wmw_1;
      case 3:
        return strings_getInstance().xmw_1;
      case 4:
        return strings_getInstance().ymw_1;
      case 5:
        return strings_getInstance().zmw_1;
      case 6:
        return strings_getInstance().tmw_1;
      default:
        return strings_getInstance().hmi_1;
    }
  }
  function stringResourceOrMessage(_this__u8e3s4, systemImpl) {
    var tmp0_safe_receiver = isInterface(_this__u8e3s4, ExceptionWithStringResource) ? _this__u8e3s4 : null;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ipf();
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.stringResourceOrMessage.<anonymous>' call
      tmp = systemImpl.moj(tmp1_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp;
    var tmp_0;
    if (tmp3_elvis_lhs == null) {
      var tmp_1 = systemImpl.moj(strings_getInstance().qmi_1);
      var tmp2_elvis_lhs = _this__u8e3s4.message;
      tmp_0 = tmp_1 + ': ' + (tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
    } else {
      tmp_0 = tmp3_elvis_lhs;
    }
    return tmp_0;
  }
  function verifySite(_this__u8e3s4, endpointUrl, timeout, json, $completion) {
    timeout = timeout === VOID ? new Long(30000, 0) : timeout;
    var tmp = new $verifySiteCOROUTINE$51(_this__u8e3s4, endpointUrl, timeout, json, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function verifySite$lambda($timeout) {
    return function ($this$timeout) {
      $this$timeout.y3s($timeout);
      return Unit_instance;
    };
  }
  function $verifySiteCOROUTINE$51(_this__u8e3s4, endpointUrl, timeout, json, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.nqd_1 = _this__u8e3s4;
    this.oqd_1 = endpointUrl;
    this.pqd_1 = timeout;
    this.qqd_1 = json;
  }
  protoOf($verifySiteCOROUTINE$51).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.rqd_1 = UMFileUtil_getInstance().vpi([this.oqd_1, 'Site', 'verify']);
            var tmp_0 = this;
            tmp_0.sqd_1 = this.nqd_1;
            var tmp_1 = this;
            tmp_1.tqd_1 = this.rqd_1;
            var tmp_2 = this;
            tmp_2.uqd_1 = this.sqd_1;
            var tmp_3 = this;
            tmp_3.vqd_1 = this.uqd_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.tqd_1);
            header(this_0, 'cache-control', 'no-cache');
            timeout(this_0, verifySite$lambda(this.pqd_1));
            tmp_4.wqd_1 = this_0;
            this.wqd_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.xqd_1 = this.vqd_1;
            var tmp_6 = this;
            tmp_6.yqd_1 = this.wqd_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.yqd_1, this.xqd_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zqd_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.zqd_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var responseStr = suspendResult;
            return this.qqd_1.s45(Companion_instance_31.n4r(), responseStr);
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function toMap_1(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4 instanceof MapStringValues) {
      tmp = _this__u8e3s4.aqe_1;
    } else {
      // Inline function 'kotlin.collections.map' call
      var this_0 = _this__u8e3s4.o2n();
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.ext.toMap.<anonymous>' call
        var tmp$ret$0 = to(item, _this__u8e3s4.n2n(item));
        destination.i1(tmp$ret$0);
      }
      tmp = toMap(destination);
    }
    return tmp;
  }
  function toLocalMidnight(_this__u8e3s4, timeZoneId) {
    return toLocalMidnight_0(_this__u8e3s4, Companion_getInstance_9().vmg(timeZoneId));
  }
  function toLocalEndOfDay(_this__u8e3s4, timeZoneId) {
    return toLocalEndOfDay_0(_this__u8e3s4, Companion_getInstance_9().vmg(timeZoneId));
  }
  function isDateOfBirthAnAdult(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) >= UstadMobileConstants_getInstance().zq3_1;
  }
  function isDateOfBirthAMinor(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) < UstadMobileConstants_getInstance().yq3_1;
  }
  function toLocalMidnight_0(_this__u8e3s4, timeZone) {
    return toInstant(toLocalMidnight_1(toLocalDateTime(_this__u8e3s4, timeZone)), timeZone);
  }
  function toLocalEndOfDay_0(_this__u8e3s4, timeZone) {
    return toInstant(toLocalEndOfDay_1(toLocalDateTime(_this__u8e3s4, timeZone)), timeZone);
  }
  function ageInYears(_this__u8e3s4) {
    return periodUntil(_this__u8e3s4, System_instance.ymd(), Companion_getInstance_9().umg_1).gme();
  }
  function hasFlag(_this__u8e3s4, flag) {
    return (_this__u8e3s4 & flag) === flag;
  }
  function decodeStringMapFromString(_this__u8e3s4, string) {
    return _this__u8e3s4.s45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), string);
  }
  function encodeStringMapToString(_this__u8e3s4, stringMap) {
    return _this__u8e3s4.r45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), stringMap);
  }
  function decodeListOrSingleObjectAsList(_this__u8e3s4, serializer, element) {
    var tmp;
    if (element instanceof JsonArray) {
      tmp = _this__u8e3s4.o4p(ListSerializer(serializer), element);
    } else {
      if (element instanceof JsonObject) {
        tmp = listOf_0(_this__u8e3s4.o4p(serializer, element));
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function replaceOrAppend(_this__u8e3s4, element, replacePredicate) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        if (replacePredicate(item)) {
          tmp$ret$0 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$0 = -1;
    }
    var replaceIndex = tmp$ret$0;
    var tmp;
    if (replaceIndex >= 0) {
      // Inline function 'kotlin.also' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.replaceOrAppend.<anonymous>' call
      this_0.f1(replaceIndex, element);
      tmp = toList(this_0);
    } else {
      tmp = plus_1(_this__u8e3s4, element);
    }
    return tmp;
  }
  function findKeysNotInOtherList(_this__u8e3s4, otherList, key) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(otherList, 10));
    var tmp0_iterator = otherList.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      destination.i1(key(item));
    }
    var otherListKeys = destination;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator_0 = _this__u8e3s4.w();
    while (tmp0_iterator_0.f()) {
      var item_0 = tmp0_iterator_0.e();
      destination_0.i1(key(item_0));
    }
    var thisListKeys = destination_0;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_1 = thisListKeys.w();
    while (tmp0_iterator_1.f()) {
      var element = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.util.ext.findKeysNotInOtherList.<anonymous>' call
      if (!otherListKeys.a1(element)) {
        destination_1.i1(element);
      }
    }
    return destination_1;
  }
  function replace_0(_this__u8e3s4, element, replacePredicate) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        if (replacePredicate(item)) {
          tmp$ret$0 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$0 = -1;
    }
    var replaceIndex = tmp$ret$0;
    if (replaceIndex === -1)
      throw IllegalArgumentException_init_$Create$('element to replace not found');
    // Inline function 'kotlin.also' call
    var this_0 = toMutableList(_this__u8e3s4);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.replace.<anonymous>' call
    this_0.f1(replaceIndex, element);
    return toList(this_0);
  }
  function trimToSize(_this__u8e3s4, maxSize) {
    var tmp;
    if (_this__u8e3s4.u() > maxSize) {
      tmp = _this__u8e3s4.z(0, maxSize);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function toggle(_this__u8e3s4, item) {
    var indexOfItem = _this__u8e3s4.x(item);
    var tmp;
    if (indexOfItem < 0) {
      tmp = plus_1(_this__u8e3s4, item);
    } else {
      // Inline function 'kotlin.also' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
      this_0.s1(indexOfItem);
      tmp = toList(this_0);
    }
    return tmp;
  }
  function toEmptyIfNull(_this__u8e3s4) {
    return _this__u8e3s4 == null ? emptyList() : _this__u8e3s4;
  }
  function filterByFlags(_this__u8e3s4, value) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.filterByFlags.<anonymous>' call
      if (hasFlag_0(value, element.x6_1)) {
        destination.i1(element);
      }
    }
    return destination;
  }
  function toLocalMidnight_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.smh(), LocalTime_init_$Create$(0, 0, 0));
  }
  function toLocalEndOfDay_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.smh(), LocalTime_init_$Create$(23, 59, 59));
  }
  function chopOffSeconds(_this__u8e3s4) {
    if (_this__u8e3s4.qmh() > 0 ? true : _this__u8e3s4.rmh() > 0) {
      return LocalDateTime_init_$Create$(_this__u8e3s4.smh(), LocalTime_init_$Create$(_this__u8e3s4.omh(), _this__u8e3s4.pmh()));
    } else {
      return _this__u8e3s4;
    }
  }
  function chopOffSeconds_0(_this__u8e3s4) {
    if (_this__u8e3s4.qmh() > 0 ? true : _this__u8e3s4.rmh() > 0)
      return LocalTime_init_$Create$(_this__u8e3s4.omh(), _this__u8e3s4.pmh());
    else
      return _this__u8e3s4;
  }
  function hasFlag_0(_this__u8e3s4, flag) {
    return _this__u8e3s4.uc(flag).equals(flag);
  }
  function toggleFlag(_this__u8e3s4, flag) {
    var tmp;
    if (hasFlag_0(_this__u8e3s4, flag)) {
      tmp = _this__u8e3s4.uc(flag.qc());
    } else {
      tmp = _this__u8e3s4.vc(flag);
    }
    return tmp;
  }
  function isDateSet(_this__u8e3s4) {
    return (!(_this__u8e3s4 == null) ? _this__u8e3s4.c7(new Long(0, 0)) > 0 : false) ? _this__u8e3s4.c7(new Long(-376330240, 1689)) < 0 : false;
  }
  function get_UNSET_DISTANT_FUTURE() {
    return UNSET_DISTANT_FUTURE;
  }
  var UNSET_DISTANT_FUTURE;
  function toByteArray(_this__u8e3s4) {
    var buffer = new Int8Array(8);
    var temp = _this__u8e3s4;
    var inductionVariable = 0;
    if (inductionVariable < 8)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        buffer[7 - i | 0] = temp.uc(new Long(255, 0)).xc();
        temp = temp.sc(8);
      }
       while (inductionVariable < 8);
    return buffer;
  }
  function putFromSavedStateIfPresent(_this__u8e3s4, savedState, key) {
    var tmp0_safe_receiver = savedState.ba(key);
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.putFromSavedStateIfPresent.<anonymous>' call
      _this__u8e3s4.s(key, tmp0_safe_receiver);
    }
  }
  function toQueryString(_this__u8e3s4) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.q2();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.toQueryString.<anonymous>' call
      var tmp$ret$0 = Companion_instance_259.xqc(item.s2()) + '=' + Companion_instance_259.xqc(item.t2());
      destination.i1(tmp$ret$0);
    }
    return joinToString(destination, '&');
  }
  function whenSubscribed(_this__u8e3s4, block, $completion) {
    // Inline function 'kotlinx.coroutines.flow.map' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.n1h();
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    var tmp$ret$2 = new _no_name_provided__qut3iv_1(this_0);
    var tmp = distinctUntilChanged(tmp$ret$2);
    return collectLatest(tmp, whenSubscribed$slambda_0(block, null), $completion);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_2(function_0) {
    this.bqe_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_2).t1d = function (value, $completion) {
    return this.bqe_1(value, $completion);
  };
  function whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.kqe_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$o$collect$slambda).i1i = function (value, $completion) {
    var tmp = this.j1i(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(whenSubscribed$o$collect$slambda).he = function (p1, $completion) {
    return this.i1i((!(p1 == null) ? typeof p1 === 'number' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(whenSubscribed$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.mqe_1 = this.kqe_1;
            var tmp_1 = this;
            tmp_1.nqe_1 = this.lqe_1;
            this.hd_1 = 1;
            var it = this.nqe_1;
            suspendResult = this.mqe_1.t1d(it > 0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(whenSubscribed$o$collect$slambda).j1i = function (value, completion) {
    var i = new whenSubscribed$o$collect$slambda(this.kqe_1, completion);
    i.lqe_1 = value;
    return i;
  };
  function whenSubscribed$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.i1i(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$52(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wqe_1 = _this__u8e3s4;
    this.xqe_1 = collector;
  }
  protoOf($collectCOROUTINE$52).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.yqe_1 = this.xqe_1;
            this.hd_1 = 1;
            var tmp_1 = whenSubscribed$o$collect$slambda_0(this.yqe_1, null);
            suspendResult = this.wqe_1.zqe_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_2(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_1($this) {
    this.zqe_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_1).aqf = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$52(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_1).a1c = function (collector, $completion) {
    return this.aqf(collector, $completion);
  };
  function whenSubscribed$slambda($block, resultContinuation) {
    this.jqf_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$slambda).lqf = function (active, $completion) {
    var tmp = this.mqf(active, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(whenSubscribed$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(whenSubscribed$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.kqf_1) {
              this.hd_1 = 1;
              suspendResult = this.jqf_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(whenSubscribed$slambda).mqf = function (active, completion) {
    var i = new whenSubscribed$slambda(this.jqf_1, completion);
    i.kqf_1 = active;
    return i;
  };
  function whenSubscribed$slambda_0($block, resultContinuation) {
    var i = new whenSubscribed$slambda($block, resultContinuation);
    var l = function (active, $completion) {
      return i.lqf(active, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function navigateToLink(_this__u8e3s4, link, accountManager, openExternalLinkUseCase, goOptions, forceAccountSelection, userCanSelectServer, accountName, scope, linkTarget, dontSetCurrentSession, presetLearningSpaceUrl, checkRegistrationAllowedUseCase) {
    goOptions = goOptions === VOID ? Companion_getInstance_95().cq4_1 : goOptions;
    forceAccountSelection = forceAccountSelection === VOID ? false : forceAccountSelection;
    userCanSelectServer = userCanSelectServer === VOID ? true : userCanSelectServer;
    accountName = accountName === VOID ? null : accountName;
    scope = scope === VOID ? GlobalScope_instance : scope;
    linkTarget = linkTarget === VOID ? LinkTarget_DEFAULT_getInstance() : linkTarget;
    dontSetCurrentSession = dontSetCurrentSession === VOID ? false : dontSetCurrentSession;
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? null : presetLearningSpaceUrl;
    checkRegistrationAllowedUseCase = checkRegistrationAllowedUseCase === VOID ? null : checkRegistrationAllowedUseCase;
    var learningSpaceUrl = {_v: null};
    var viewUri = {_v: null};
    var tmp;
    if (startsWithHttpProtocol(link)) {
      tmp = contains(link, '/#/');
    } else {
      tmp = false;
    }
    if (tmp) {
      var urlComponents = Companion_instance_138.cqd(link);
      learningSpaceUrl._v = urlComponents.lom_1;
      viewUri._v = urlComponents.dqd();
    } else {
      if (!startsWithHttpProtocol(link)) {
        viewUri._v = link;
      }
    }
    if (presetLearningSpaceUrl == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.navigateToLink.<anonymous>' call
      learningSpaceUrl._v = presetLearningSpaceUrl;
    }
    var tmp_0;
    var tmp1_safe_receiver = viewUri._v;
    var tmp_1;
    if (tmp1_safe_receiver == null) {
      tmp_1 = null;
    } else {
      tmp_1 = startsWith(tmp1_safe_receiver, 'ParentalConsentManagement');
    }
    if (tmp_1 === true) {
      tmp_0 = minus(System_instance.ymd(), UstadMobileConstants_getInstance().zq3_1, Companion_getInstance_10().jmf_1, Companion_getInstance_9().umg_1).emh();
    } else {
      tmp_0 = new Long(0, 0);
    }
    var maxDateOfBirth = tmp_0;
    var tmp_2;
    if (viewUri._v == null ? true : (!userCanSelectServer ? !(learningSpaceUrl._v == null) : false) ? !(learningSpaceUrl._v === accountManager.loa().wnt_1) : false) {
      openExternalLinkUseCase.cpj(link, linkTarget);
      tmp_2 = null;
    } else {
      tmp_2 = launch(scope, VOID, VOID, navigateToLink$slambda_0(accountName, learningSpaceUrl, accountManager, dontSetCurrentSession, _this__u8e3s4, viewUri, goOptions, forceAccountSelection, maxDateOfBirth, checkRegistrationAllowedUseCase, null));
    }
    return tmp_2;
  }
  function navigateToViewUri(_this__u8e3s4, viewUri, goOptions) {
    var questionIndex = indexOf(viewUri, _Char___init__impl__6a9atx(63));
    var tmp;
    if (!(questionIndex === -1)) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = viewUri.substring(0, questionIndex);
    } else {
      tmp = viewUri;
    }
    var viewName = tmp;
    var tmp_0;
    if (questionIndex > 0) {
      var tmp_1 = UMFileUtil_getInstance();
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$3 = viewUri.substring(questionIndex);
      tmp_0 = tmp_1.parseURLQueryString(tmp$ret$3);
    } else {
      tmp_0 = emptyMap();
    }
    var args = tmp_0;
    _this__u8e3s4.lq9(viewName, args, goOptions);
  }
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(function_0) {
    this.nqf_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1).uo0 = function (endpointUrl) {
    return this.nqf_1(endpointUrl);
  };
  function navigateToLink$slambda$lambda($learningSpaceUrl) {
    return function (filterUrl) {
      return filterUrl === $learningSpaceUrl._v;
    };
  }
  function navigateToLink$slambda$lambda_0($learningSpaceUrl) {
    return function (it) {
      return it === $learningSpaceUrl._v;
    };
  }
  function navigateToLink$slambda($accountName, $learningSpaceUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $checkRegistrationAllowedUseCase, resultContinuation) {
    this.wqf_1 = $accountName;
    this.xqf_1 = $learningSpaceUrl;
    this.yqf_1 = $accountManager;
    this.zqf_1 = $dontSetCurrentSession;
    this.aqg_1 = $this_navigateToLink;
    this.bqg_1 = $viewUri;
    this.cqg_1 = $goOptions;
    this.dqg_1 = $forceAccountSelection;
    this.eqg_1 = $maxDateOfBirth;
    this.fqg_1 = $checkRegistrationAllowedUseCase;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(navigateToLink$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(navigateToLink$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(navigateToLink$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 16;
            if (!(this.wqf_1 == null) ? !(this.xqf_1._v == null) : false) {
              this.hd_1 = 9;
              continue $sm;
            } else {
              if ((!this.dqg_1 ? !isTemporary(this.yqf_1.uo9().nnu_1) : false) ? this.xqf_1._v == null ? true : this.yqf_1.loa().wnt_1 === this.xqf_1._v : false) {
                navigateToViewUri(this.aqg_1, this.bqg_1._v, this.cqg_1);
                this.hd_1 = 15;
                continue $sm;
              } else {
                if (!(this.xqf_1._v == null)) {
                  this.hd_1 = 1;
                  var tmp_0 = navigateToLink$slambda$lambda_0(this.xqf_1);
                  suspendResult = this.yqf_1.moa(this.eqg_1, new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(tmp_0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.jqg_1 = false;
                  this.hd_1 = 2;
                  continue $sm;
                }
              }
            }

          case 1:
            this.kqg_1 = suspendResult;
            this.jqg_1 = this.kqg_1 === 0;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.jqg_1) {
              this.iqg_1 = true;
              this.hd_1 = 5;
              continue $sm;
            } else {
              if (this.xqf_1._v == null) {
                this.hd_1 = 3;
                suspendResult = this.yqf_1.noa(this.eqg_1, VOID, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.lqg_1 = false;
                this.hd_1 = 4;
                continue $sm;
              }
            }

          case 3:
            this.mqg_1 = suspendResult;
            this.lqg_1 = this.mqg_1 === 0;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.iqg_1 = this.lqg_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (this.iqg_1) {
              var tmp_1 = this;
              var this_0 = LinkedHashMap_init_$Create$();
              Companion_getInstance_116();
              this_0.s('next', this.bqg_1._v);
              Companion_getInstance_125();
              this_0.s('noSessionChange', this.zqf_1.toString());
              var tmp0_safe_receiver = this.xqf_1._v;
              if (tmp0_safe_receiver == null)
                null;
              else {
                Companion_getInstance_116();
                this_0.s('learningSpaceUrl', tmp0_safe_receiver);
              }
              tmp_1.nqg_1 = this_0.f3();
              this.oqg_1 = this.xqf_1._v;
              if (this.oqg_1 == null) {
                this.pqg_1 = null;
                this.hd_1 = 8;
                continue $sm;
              } else {
                var tmp_2 = this;
                tmp_2.qqg_1 = this.oqg_1;
                var tmp_3 = this;
                tmp_3.rqg_1 = this.qqg_1;
                var tmp_4 = this;
                var tmp0_safe_receiver_0 = this.fqg_1;
                tmp_4.sqg_1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0(new LearningSpace(this.rqg_1));
                if (this.sqg_1 == null) {
                  this.tqg_1 = null;
                  this.hd_1 = 7;
                  continue $sm;
                } else {
                  this.hd_1 = 6;
                  suspendResult = this.sqg_1.joi(this.bqg_1._v, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            } else {
              var this_1 = LinkedHashMap_init_$Create$();
              Companion_getInstance_116();
              this_1.s('next', this.bqg_1._v);
              Companion_getInstance_125();
              this_1.s('noSessionChange', this.zqf_1.toString());
              var tmp0_safe_receiver_1 = this.xqf_1._v;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                this_1.s('filterByLearningSpace', tmp0_safe_receiver_1);
              }
              this_1.s('activeAccountMode', 'inlist');
              Companion_getInstance_116();
              this_1.s('listMode', ListViewMode_PICKER_getInstance().toString());
              Companion_getInstance_116();
              this_1.s('maxDob', this.eqg_1.toString());
              var args = this_1.f3();
              this.aqg_1.lq9('AccountList', toMap_0(args), this.cqg_1);
              this.hd_1 = 15;
              continue $sm;
            }

          case 6:
            this.tqg_1 = suspendResult;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.pqg_1 = this.tqg_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.uqg_1 = this.pqg_1;
            var tmp_5;
            if (this.uqg_1 === false) {
              tmp_5 = 'Login';
            } else {
              tmp_5 = 'AddAccountSelectNewOrExisting';
            }

            this.aqg_1.rp6(tmp_5, this.nqg_1);
            this.hd_1 = 15;
            continue $sm;
          case 9:
            this.hd_1 = 10;
            var tmp_6 = navigateToLink$slambda$lambda(this.xqf_1);
            suspendResult = this.yqf_1.vo9(new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp0_iterator = suspendResult.w();
            this.hd_1 = 11;
            continue $sm;
          case 11:
            if (!tmp0_iterator.f()) {
              this.hd_1 = 13;
              continue $sm;
            }

            var element = tmp0_iterator.e();
            if (element.onu_1.g96_1 === substringBefore_0(this.wqf_1, '@')) {
              this.hqg_1 = element;
              this.hd_1 = 14;
              continue $sm;
            } else {
              this.hd_1 = 12;
              continue $sm;
            }

          case 12:
            this.hd_1 = 11;
            continue $sm;
          case 13:
            this.hqg_1 = null;
            if (false) {
              this.hd_1 = 9;
              continue $sm;
            }

            this.hd_1 = 14;
            continue $sm;
          case 14:
            var session = this.hqg_1;
            if (!(session == null)) {
              var this_2 = this.yqf_1;
              var tmp_7;
              if (!this.zqf_1) {
                tmp_7 = this_2;
              } else {
                tmp_7 = null;
              }
              var tmp0_safe_receiver_2 = tmp_7;
              if (tmp0_safe_receiver_2 != null) {
                tmp0_safe_receiver_2.onx(session);
              }
              navigateToViewUri(this.aqg_1, this.bqg_1._v, this.cqg_1);
            }

            this.hd_1 = 15;
            continue $sm;
          case 15:
            return Unit_instance;
          case 16:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 16) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(navigateToLink$slambda).v1m = function ($this$launch, completion) {
    var i = new navigateToLink$slambda(this.wqf_1, this.xqf_1, this.yqf_1, this.zqf_1, this.aqg_1, this.bqg_1, this.cqg_1, this.dqg_1, this.eqg_1, this.fqg_1, completion);
    i.gqg_1 = $this$launch;
    return i;
  };
  function navigateToLink$slambda_0($accountName, $learningSpaceUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $checkRegistrationAllowedUseCase, resultContinuation) {
    var i = new navigateToLink$slambda($accountName, $learningSpaceUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $checkRegistrationAllowedUseCase, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function isGuestUser(_this__u8e3s4) {
    return _this__u8e3s4.g96_1 == null;
  }
  function toUmAccount(_this__u8e3s4, endpointUrl) {
    return new UmAccount(_this__u8e3s4.f96_1, _this__u8e3s4.g96_1, '', endpointUrl, _this__u8e3s4.h96_1, _this__u8e3s4.i96_1);
  }
  function personFullName(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.h96_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.i96_1;
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  }
  function toXapiAgent(_this__u8e3s4, learningSpace) {
    var tmp = personFullName(_this__u8e3s4);
    var tmp0_elvis_lhs = _this__u8e3s4.g96_1;
    var tmp1_name = tmp0_elvis_lhs == null ? _this__u8e3s4.f96_1.toString() : tmp0_elvis_lhs;
    var tmp2_homePage = learningSpace.wnt_1;
    return new XapiAgent(tmp, VOID, VOID, VOID, VOID, new XapiAccount(tmp2_homePage, tmp1_name));
  }
  function toggle_0(_this__u8e3s4, item) {
    var tmp;
    if (_this__u8e3s4.a1(item)) {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
        if (!equals(element, item)) {
          destination.i1(element);
        }
      }
      tmp = toSet(destination);
    } else {
      // Inline function 'kotlin.apply' call
      var this_0 = toMutableSet(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
      this_0.i1(item);
      tmp = toSet(this_0);
    }
    return tmp;
  }
  function toQueryLikeParam(_this__u8e3s4) {
    var tmp;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    // Inline function 'kotlin.contracts.contract' call
    if (_this__u8e3s4 == null ? true : charSequenceLength(_this__u8e3s4) === 0) {
      tmp = '%';
    } else {
      tmp = '%' + _this__u8e3s4 + '%';
    }
    return tmp;
  }
  function capitalizeFirstLetter(_this__u8e3s4) {
    // Inline function 'kotlin.text.replaceFirstChar' call
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(_this__u8e3s4) > 0) {
      // Inline function 'com.ustadmobile.core.util.ext.capitalizeFirstLetter.<anonymous>' call
      var it = charSequenceGet(_this__u8e3s4, 0);
      var tmp$ret$1 = isLowerCase(it) ? titlecase(it) : toString_1(it);
      var tmp_0 = toString(tmp$ret$1);
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp_0 + _this__u8e3s4.substring(1);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function appendQueryArgs(_this__u8e3s4, args) {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!args.c1()) {
      tmp = appendQueryArgs_0(_this__u8e3s4, toQueryString(args));
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function appendQueryArgs_0(_this__u8e3s4, queryArgs) {
    var retVal = _this__u8e3s4;
    if (contains(_this__u8e3s4, '?'))
      retVal = retVal + '&';
    else
      retVal = retVal + '?';
    retVal = retVal + queryArgs;
    return retVal;
  }
  function countWords(_this__u8e3s4) {
    var lastCharWasWhitespace = true;
    var wordCount = 0;
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var thisCharWhitespace = isWhitespace(charSequenceGet(_this__u8e3s4, i));
        if (!thisCharWhitespace ? lastCharWasWhitespace : false) {
          wordCount = wordCount + 1 | 0;
        }
        lastCharWasWhitespace = thisCharWhitespace;
      }
       while (inductionVariable < last);
    return wordCount;
  }
  function startsWithHttpProtocol(_this__u8e3s4) {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.startsWithHttpProtocol.<anonymous>' call
    var it = _this__u8e3s4.toLowerCase();
    return startsWith(it, 'http://') ? true : startsWith(it, 'https://');
  }
  function requirePostfix(_this__u8e3s4, postFix, ignoreCase) {
    ignoreCase = ignoreCase === VOID ? false : ignoreCase;
    return endsWith(_this__u8e3s4, postFix, ignoreCase) ? _this__u8e3s4 : _this__u8e3s4 + postFix;
  }
  function appendSelectedAccount(_this__u8e3s4, personUid, learningSpace) {
    Companion_getInstance_125();
    var tmp = to('selectedAccountPersonUid', personUid.toString());
    Companion_getInstance_125();
    return appendQueryArgs(_this__u8e3s4, mapOf([tmp, to('selectedAccountEndpointUrl', learningSpace.wnt_1)]));
  }
  function toNullIfBlank(_this__u8e3s4) {
    // Inline function 'kotlin.text.ifBlank' call
    var tmp;
    if (isBlank(_this__u8e3s4)) {
      // Inline function 'com.ustadmobile.core.util.ext.toNullIfBlank.<anonymous>' call
      tmp = null;
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function requireHttpPrefix(_this__u8e3s4, defaultProtocol) {
    defaultProtocol = defaultProtocol === VOID ? 'https' : defaultProtocol;
    return startsWithHttpProtocol(_this__u8e3s4) ? _this__u8e3s4 : defaultProtocol + '://' + _this__u8e3s4;
  }
  function trimExcessWhiteSpace(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.text.indexOfFirst' call
      var inductionVariable = 0;
      var last = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (inductionVariable <= last)
        do {
          var index = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.util.ext.trimExcessWhiteSpace.<anonymous>' call
          var it = charSequenceGet(_this__u8e3s4, index);
          if (!isWhitespace(it)) {
            tmp$ret$1 = index;
            break $l$block;
          }
        }
         while (inductionVariable <= last);
      tmp$ret$1 = -1;
    }
    var firstNonWhiteSpace = tmp$ret$1;
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlin.text.indexOfLast' call
      var inductionVariable_0 = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (0 <= inductionVariable_0)
        do {
          var index_0 = inductionVariable_0;
          inductionVariable_0 = inductionVariable_0 + -1 | 0;
          // Inline function 'com.ustadmobile.core.util.ext.trimExcessWhiteSpace.<anonymous>' call
          var it_0 = charSequenceGet(_this__u8e3s4, index_0);
          if (!isWhitespace(it_0)) {
            tmp$ret$3 = index_0;
            break $l$block_0;
          }
        }
         while (0 <= inductionVariable_0);
      tmp$ret$3 = -1;
    }
    var lastNonWhiteSpace = tmp$ret$3;
    // Inline function 'kotlin.math.max' call
    var b = firstNonWhiteSpace - 1 | 0;
    var startPos = Math.max(0, b);
    // Inline function 'kotlin.math.min' call
    var a = _this__u8e3s4.length;
    var b_0 = lastNonWhiteSpace + 2 | 0;
    var endPos = Math.min(a, b_0);
    var tmp;
    if (!(startPos === 0) ? true : !(endPos === _this__u8e3s4.length)) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = _this__u8e3s4.substring(startPos, endPos);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function initial(_this__u8e3s4) {
    var tmp0_safe_receiver = firstNonWhiteSpaceChar(_this__u8e3s4);
    var tmp;
    var tmp_0 = tmp0_safe_receiver;
    if ((tmp_0 == null ? null : new Char(tmp_0)) == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.uppercase' call
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = toString_1(tmp0_safe_receiver).toUpperCase();
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
  }
  function firstNonWhiteSpaceChar(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.text.indexOfFirst' call
      var inductionVariable = 0;
      var last = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (inductionVariable <= last)
        do {
          var index = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.util.ext.firstNonWhiteSpaceChar.<anonymous>' call
          var it = charSequenceGet(_this__u8e3s4, index);
          if (!isWhitespace(it)) {
            tmp$ret$1 = index;
            break $l$block;
          }
        }
         while (inductionVariable <= last);
      tmp$ret$1 = -1;
    }
    var index_0 = tmp$ret$1;
    return !(index_0 === -1) ? charSequenceGet(_this__u8e3s4, index_0) : null;
  }
  function formattedString(_this__u8e3s4, instant) {
    instant = instant === VOID ? System_instance.ymd() : instant;
    return gmtOffsetString(offsetAt(_this__u8e3s4, instant)) + ' ' + _this__u8e3s4.ymg();
  }
  function get_progressAsFloat(_this__u8e3s4) {
    var tmp = _this__u8e3s4.bcc_1.zc();
    // Inline function 'kotlin.takeIf' call
    var this_0 = _this__u8e3s4.acc_1.zc();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.util.ext.<get-progressAsFloat>.<anonymous>' call
    if (!(this_0 === 0.0)) {
      tmp_0 = this_0;
    } else {
      tmp_0 = null;
    }
    var tmp0_elvis_lhs = tmp_0;
    return tmp / (tmp0_elvis_lhs == null ? 1.0 : tmp0_elvis_lhs);
  }
  function insertPersonAndGroup(_this__u8e3s4, entity, groupFlag, $completion) {
    var tmp;
    if (groupFlag === VOID) {
      tmp = 1;
    } else {
      tmp = groupFlag;
    }
    groupFlag = tmp;
    var tmp_0 = new $insertPersonAndGroupCOROUTINE$53(_this__u8e3s4, entity, groupFlag, $completion);
    tmp_0.jd_1 = Unit_instance;
    tmp_0.kd_1 = null;
    return tmp_0.ud();
  }
  function localFirstThenRepoIfFalse(_this__u8e3s4, block, $completion) {
    var tmp = new $localFirstThenRepoIfFalseCOROUTINE$54(_this__u8e3s4, block, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function ScopedGrantResult(sgUid) {
    this.zqh_1 = sgUid;
  }
  protoOf(ScopedGrantResult).toString = function () {
    return 'ScopedGrantResult(sgUid=' + this.zqh_1.toString() + ')';
  };
  protoOf(ScopedGrantResult).hashCode = function () {
    return this.zqh_1.hashCode();
  };
  protoOf(ScopedGrantResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantResult))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantResult ? other : THROW_CCE();
    if (!this.zqh_1.equals(tmp0_other_with_cast.zqh_1))
      return false;
    return true;
  };
  function grantScopedPermission(_this__u8e3s4, toPerson, permissions, scopeTableId, scopeEntityUid, $completion) {
    return grantScopedPermission_0(_this__u8e3s4, toPerson.r96_1, permissions, scopeTableId, scopeEntityUid, $completion);
  }
  function grantScopedPermission_0(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, $completion) {
    var tmp = new $grantScopedPermissionCOROUTINE$55(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function localFirstThenRepoIfNull(_this__u8e3s4, block, $completion) {
    var tmp = new $localFirstThenRepoIfNullCOROUTINE$56(_this__u8e3s4, block, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertPersonAndGroupCOROUTINE$53(_this__u8e3s4, entity, groupFlag, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.dqh_1 = _this__u8e3s4;
    this.eqh_1 = entity;
    this.fqh_1 = groupFlag;
  }
  protoOf($insertPersonAndGroupCOROUTINE$53).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var this_0 = new PersonGroup();
            this_0.hga_1 = 'Person individual group';
            this_0.jga_1 = this.fqh_1;
            tmp_0.gqh_1 = this_0;
            this.hd_1 = 1;
            suspendResult = this.dqh_1.d7e().insertAsync(this.gqh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hqh_1 = suspendResult;
            this.gqh_1.cga_1 = this.hqh_1;
            this.eqh_1.r96_1 = this.gqh_1.cga_1;
            this.hd_1 = 2;
            suspendResult = this.dqh_1.n7d().insertAsync(this.eqh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.iqh_1 = suspendResult;
            this.eqh_1.f96_1 = this.iqh_1;
            this.hd_1 = 3;
            suspendResult = this.dqh_1.e7e().insertAsync(PersonGroupMember_init_$Create$(this.eqh_1.f96_1, this.eqh_1.r96_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            Companion_getInstance_2();
            var tmp_1 = new Long(-1, 2147483647);
            suspendResult = grantScopedPermission(this.dqh_1, this.eqh_1, tmp_1, 9, this.eqh_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return this.eqh_1;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $localFirstThenRepoIfFalseCOROUTINE$54(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.rqh_1 = _this__u8e3s4;
    this.sqh_1 = block;
  }
  protoOf($localFirstThenRepoIfFalseCOROUTINE$54).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.rqh_1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x5i();
            tmp_0.tqh_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.uqh_1 = this.tqh_1;
            if (this.uqh_1 == null) {
              this.vqh_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.wqh_1 = this.uqh_1;
              var tmp_4 = this;
              tmp_4.xqh_1 = this.wqh_1;
              this.hd_1 = 1;
              suspendResult = this.sqh_1(this.xqh_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.vqh_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.yqh_1 = this.vqh_1;
            if (this.yqh_1 === true)
              return this.yqh_1;
            this.hd_1 = 3;
            suspendResult = this.sqh_1(this.rqh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $grantScopedPermissionCOROUTINE$55(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.iqi_1 = _this__u8e3s4;
    this.jqi_1 = toGroupUid;
    this.kqi_1 = permissions;
    this.lqi_1 = scopeTableId;
    this.mqi_1 = scopeEntityUid;
  }
  protoOf($grantScopedPermissionCOROUTINE$55).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.iqi_1.y7e();
            var this_0 = new ScopedGrant();
            this_0.thl_1 = this.jqi_1;
            this_0.shl_1 = this.kqi_1;
            this_0.qhl_1 = this.lqi_1;
            this_0.rhl_1 = this.mqi_1;
            suspendResult = tmp_0.whk(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var sgUid = suspendResult;
            return new ScopedGrantResult(sgUid);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $localFirstThenRepoIfNullCOROUTINE$56(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vqi_1 = _this__u8e3s4;
    this.wqi_1 = block;
  }
  protoOf($localFirstThenRepoIfNullCOROUTINE$56).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.vqi_1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x5i();
            tmp_0.xqi_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.yqi_1 = this.xqi_1;
            if (this.yqi_1 == null) {
              this.zqi_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.aqj_1 = this.yqi_1;
              var tmp_4 = this;
              tmp_4.bqj_1 = this.aqj_1;
              this.hd_1 = 1;
              suspendResult = this.wqi_1(this.bqj_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.zqi_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.cqj_1 = this.zqi_1;
            if (!(this.cqj_1 == null))
              return this.cqj_1;
            this.hd_1 = 3;
            suspendResult = this.wqi_1(this.vqi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function withLearningSpace(_this__u8e3s4, learningSpace) {
    var tmp0_elvis_lhs = _this__u8e3s4.gik_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('session withendpoint : usersession must not be null');
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var tmp_0 = tmp;
    var tmp1_elvis_lhs = _this__u8e3s4.eik_1;
    var tmp_1;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('session withendpoint: person msut not be null');
    } else {
      tmp_1 = tmp1_elvis_lhs;
    }
    return new UserSessionWithPersonAndLearningSpace(tmp_0, tmp_1, learningSpace);
  }
  function isTemporary(_this__u8e3s4) {
    var tmp = _this__u8e3s4.dik_1;
    var tmp_0 = tmp & 8;
    return tmp_0 === 8;
  }
  function setIfNoValueSetYet(_this__u8e3s4, key, value) {
    if (_this__u8e3s4.ba(key) == null) {
      _this__u8e3s4.dqj(key, value);
    }
  }
  function require_0(_this__u8e3s4, key) {
    var tmp0_elvis_lhs = _this__u8e3s4.ba(key);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('SavedStateHandle: required key not found: ' + key);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function gmtOffsetString(_this__u8e3s4) {
    var hours = _this__u8e3s4.cmi() / 3600 | 0;
    // Inline function 'kotlin.mod' call
    var r = _this__u8e3s4.cmi() % 3600 | 0;
    var minutes = r + (3600 & ((r ^ 3600) & (r | (-r | 0))) >> 31) | 0;
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.gmtOffsetString.<anonymous>' call
    this_0.y5('GMT');
    if (hours >= 0) {
      this_0.y5('+');
    } else {
      this_0.y5('-');
    }
    // Inline function 'kotlin.math.absoluteValue' call
    var tmp$ret$1 = abs(hours);
    this_0.y5(padStart(tmp$ret$1.toString(), 2, _Char___init__impl__6a9atx(48)));
    this_0.y5(':');
    // Inline function 'kotlin.math.absoluteValue' call
    var tmp$ret$2 = abs(minutes);
    this_0.y5(padStart(tmp$ret$2.toString(), 2, _Char___init__impl__6a9atx(48)));
    return this_0.toString();
  }
  function displayName(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.ojl_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ajk_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.njl_1.ujj_1;
      tmp = tmp1_safe_receiver == null ? null : substringAfterLast(tmp1_safe_receiver, '/');
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var tmp3_elvis_lhs = tmp;
    return tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
  }
  function xhtmlContentToText(_this__u8e3s4) {
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.xhtmlContentToText.<anonymous>' call
    var initTagName = _this__u8e3s4.dc();
    var initDepth = _this__u8e3s4.pl5();
    while (!((_this__u8e3s4.e().equals(EventType_END_ELEMENT_getInstance()) ? _this__u8e3s4.pl5() === (initDepth - 1 | 0) : false) ? _this__u8e3s4.dc().equals(initTagName) : false)) {
      switch (_this__u8e3s4.ul5().za_1) {
        case 1:
          if (_this__u8e3s4.dc().ll9() === 'img') {
            var tmp1_elvis_lhs = _this__u8e3s4.m7d(null, 'alt');
            var textVal = tmp1_elvis_lhs == null ? _this__u8e3s4.m7d(null, 'title') : tmp1_elvis_lhs;
            if (textVal == null)
              null;
            else {
              // Inline function 'kotlin.also' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.util.ext.xhtmlContentToText.<anonymous>.<anonymous>' call
              this_0.y5(textVal);
            }
          }

          break;
        case 4:
          this_0.y5(trimExcessWhiteSpace(_this__u8e3s4.sl5()));
          break;
        default:
          break;
      }
    }
    return this_0.toString();
  }
  function emptyStringValues() {
    return new MapStringValues(emptyMap());
  }
  function Companion_90() {
  }
  protoOf(Companion_90).b4e = function () {
    return new MapStringValues(emptyMap());
  };
  protoOf(Companion_90).n4r = function () {
    return new StringValuesSerializer();
  };
  protoOf(Companion_90).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_139;
  function Companion_getInstance_107() {
    return Companion_instance_139;
  }
  function IStringValues() {
  }
  function MapStringValues(map) {
    this.aqe_1 = map;
  }
  protoOf(MapStringValues).n2n = function (key) {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.aqe_1.q2();
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.stringvalues.MapStringValues.getAll.<anonymous>' call
      if (equals_0(element.s2(), key, true)) {
        destination.i1(element);
      }
    }
    // Inline function 'kotlin.collections.flatMapTo' call
    var destination_0 = ArrayList_init_$Create$();
    var tmp0_iterator_0 = destination.w();
    while (tmp0_iterator_0.f()) {
      var element_0 = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.util.stringvalues.MapStringValues.getAll.<anonymous>' call
      var list = element_0.t2();
      addAll(destination_0, list);
    }
    return destination_0;
  };
  protoOf(MapStringValues).o2n = function () {
    return this.aqe_1.o2();
  };
  function asIStringValues(_this__u8e3s4) {
    return new MapStringValues(_this__u8e3s4);
  }
  function StringValuesSerializer() {
    this.eqj_1 = MapSerializer(serializer_0(StringCompanionObject_instance), ListSerializer(serializer_0(StringCompanionObject_instance)));
    this.fqj_1 = SerialDescriptor('StringValuesSerializer', this.eqj_1.q44());
  }
  protoOf(StringValuesSerializer).q44 = function () {
    return this.fqj_1;
  };
  protoOf(StringValuesSerializer).s44 = function (decoder) {
    var stringMap = decoder.h48(this.eqj_1);
    return new MapStringValues(stringMap);
  };
  protoOf(StringValuesSerializer).gqj = function (encoder, value) {
    encoder.z49(this.eqj_1, toMap_1(value));
  };
  protoOf(StringValuesSerializer).r44 = function (encoder, value) {
    return this.gqj(encoder, (!(value == null) ? isInterface(value, IStringValues) : false) ? value : THROW_CCE());
  };
  function Companion_91() {
    this.hqj_1 = 'errCode';
    this.iqj_1 = 'msg';
    this.jqj_1 = 'stacktraceKey';
    this.kqj_1 = 'fromUri';
    this.lqj_1 = 'ErrorReport';
  }
  var Companion_instance_140;
  function Companion_getInstance_108() {
    return Companion_instance_140;
  }
  function Companion_92() {
    this.mqj_1 = 'HolidayCalendarDetail';
  }
  var Companion_instance_141;
  function Companion_getInstance_109() {
    return Companion_instance_141;
  }
  function Companion_93() {
    this.nqj_1 = 'InviteViaLink';
  }
  var Companion_instance_142;
  function Companion_getInstance_110() {
    return Companion_instance_142;
  }
  function Companion_94() {
    this.oqj_1 = 'LanguageDetailView';
  }
  var Companion_instance_143;
  function Companion_getInstance_111() {
    return Companion_instance_143;
  }
  function Companion_95() {
    this.pqj_1 = 'LanguageEditEditView';
  }
  var Companion_instance_144;
  function Companion_getInstance_112() {
    return Companion_instance_144;
  }
  function Companion_96() {
    this.qqj_1 = 'ScopedGrantDetail';
  }
  var Companion_instance_145;
  function Companion_getInstance_113() {
    return Companion_instance_145;
  }
  function Companion_97() {
    this.rqj_1 = 'SiteTermsDetailView';
    this.sqj_1 = 'SiteTermsDetailAcceptTerms';
    this.tqj_1 = 'useDisplayLocale';
    this.uqj_1 = 'showAccept';
  }
  var Companion_instance_146;
  function Companion_getInstance_114() {
    return Companion_instance_146;
  }
  function Companion_98() {
    Companion_instance_147 = this;
    this.vqj_1 = 'entity';
    this.wqj_1 = new Long(200, 0);
  }
  var Companion_instance_147;
  function Companion_getInstance_115() {
    if (Companion_instance_147 == null)
      new Companion_98();
    return Companion_instance_147;
  }
  var ListViewMode_BROWSER_instance;
  var ListViewMode_PICKER_instance;
  var ListViewMode_entriesInitialized;
  function ListViewMode_initEntries() {
    if (ListViewMode_entriesInitialized)
      return Unit_instance;
    ListViewMode_entriesInitialized = true;
    ListViewMode_BROWSER_instance = new ListViewMode('BROWSER', 0, 'BROWSER');
    ListViewMode_PICKER_instance = new ListViewMode('PICKER', 1, 'PICKER');
  }
  function ListViewMode(name, ordinal, mode) {
    Enum.call(this, name, ordinal);
    this.zqj_1 = mode;
  }
  function ListViewMode_BROWSER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_BROWSER_instance;
  }
  function ListViewMode_PICKER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_PICKER_instance;
  }
  function Companion_99() {
    Companion_instance_148 = this;
    this.aqk_1 = 'clazzAction';
    this.bqk_1 = 'entityUid';
    this.cqk_1 = 'containerUid';
    this.dqk_1 = 'parentUid';
    this.eqk_1 = 'parentTitle';
    this.fqk_1 = 'entryid';
    this.gqk_1 = 'statementVerUid';
    this.hqk_1 = 'contextRegistrationIdHi';
    this.iqk_1 = 'contextRegistrationIdLo';
    this.jqk_1 = 'learnerGroupUid';
    this.kqk_1 = 'noiframe';
    this.lqk_1 = 'schoolUid';
    this.mqk_1 = 'content_type';
    this.nqk_1 = 'filterBySchoolUid';
    this.oqk_1 = 'filterByRole';
    this.pqk_1 = 'listMode';
    this.qqk_1 = 'getResultMode';
    this.rqk_1 = 'listAddMode';
    this.sqk_1 = 'filterByPermission';
    this.tqk_1 = 'clazzUid';
    this.uqk_1 = 'filterByPersonGroupUid';
    this.vqk_1 = 'filterByEnrolmentRole';
    this.wqk_1 = 'clazzAssignmentUid';
    this.xqk_1 = 'clazzAssignmentSubmitterUid';
    this.yqk_1 = 'personUid';
    this.zqk_1 = 'next';
    this.aql_1 = 'site';
    this.bql_1 = 'learningSpaceUrl';
    this.cql_1 = 'openLink';
    this.dql_1 = 'account';
    this.eql_1 = 'accountEndpoint';
    this.fql_1 = 'snack_message';
    this.gql_1 = 'argCode';
    this.hql_1 = 'argCodeTable';
    this.iql_1 = 'argEntityName';
    this.jql_1 = '';
    this.kql_1 = 'root';
    this.lql_1 = 'current';
    this.mql_1 = 'goToComplete';
    this.nql_1 = 'saveDb';
    this.oql_1 = 'popUpToOnFinish';
    this.pql_1 = 'result_dest';
    this.qql_1 = 'result_viewname';
    this.rql_1 = 'registration_allowed';
    this.sql_1 = 'result_key';
    this.tql_1 = 'intMsg';
    this.uql_1 = 'title';
    this.vql_1 = 'navChild';
    this.wql_1 = 'activeTabIndex';
    this.xql_1 = 'maxDob';
    this.yql_1 = new Long(1, -955361223);
  }
  var Companion_instance_148;
  function Companion_getInstance_116() {
    if (Companion_instance_148 == null)
      new Companion_99();
    return Companion_instance_148;
  }
  function DetailViewModel(di, savedStateHandle, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.uqm_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function ErrorReportUiState(errorReport, fieldsEnabled) {
    errorReport = errorReport === VOID ? null : errorReport;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.tqo_1 = errorReport;
    this.uqo_1 = fieldsEnabled;
  }
  protoOf(ErrorReportUiState).toString = function () {
    return 'ErrorReportUiState(errorReport=' + this.tqo_1 + ', fieldsEnabled=' + this.uqo_1 + ')';
  };
  protoOf(ErrorReportUiState).hashCode = function () {
    var result = this.tqo_1 == null ? 0 : hashCode(this.tqo_1);
    result = imul(result, 31) + getBooleanHashCode(this.uqo_1) | 0;
    return result;
  };
  protoOf(ErrorReportUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ErrorReportUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ErrorReportUiState ? other : THROW_CCE();
    if (!equals(this.tqo_1, tmp0_other_with_cast.tqo_1))
      return false;
    if (!(this.uqo_1 === tmp0_other_with_cast.uqo_1))
      return false;
    return true;
  };
  function HolidayCalendarDetailUIState(holidayCalendar, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.vqo_1 = holidayCalendar;
    this.wqo_1 = holidayList;
  }
  protoOf(HolidayCalendarDetailUIState).toString = function () {
    return 'HolidayCalendarDetailUIState(holidayCalendar=' + this.vqo_1 + ', holidayList=' + this.wqo_1 + ')';
  };
  protoOf(HolidayCalendarDetailUIState).hashCode = function () {
    var result = this.vqo_1 == null ? 0 : hashCode(this.vqo_1);
    result = imul(result, 31) + hashCode(this.wqo_1) | 0;
    return result;
  };
  protoOf(HolidayCalendarDetailUIState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HolidayCalendarDetailUIState))
      return false;
    var tmp0_other_with_cast = other instanceof HolidayCalendarDetailUIState ? other : THROW_CCE();
    if (!equals(this.vqo_1, tmp0_other_with_cast.vqo_1))
      return false;
    if (!equals(this.wqo_1, tmp0_other_with_cast.wqo_1))
      return false;
    return true;
  };
  function Companion_100() {
    this.xqo_1 = 'HolidayCalendarEdit';
  }
  var Companion_instance_149;
  function Companion_getInstance_117() {
    return Companion_instance_149;
  }
  function HolidayCalendarEditUiState(holidayCalendar, fieldsEnabled, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.yqo_1 = holidayCalendar;
    this.zqo_1 = fieldsEnabled;
    this.aqp_1 = holidayList;
  }
  protoOf(HolidayCalendarEditUiState).toString = function () {
    return 'HolidayCalendarEditUiState(holidayCalendar=' + this.yqo_1 + ', fieldsEnabled=' + this.zqo_1 + ', holidayList=' + this.aqp_1 + ')';
  };
  protoOf(HolidayCalendarEditUiState).hashCode = function () {
    var result = this.yqo_1 == null ? 0 : hashCode(this.yqo_1);
    result = imul(result, 31) + getBooleanHashCode(this.zqo_1) | 0;
    result = imul(result, 31) + (this.aqp_1 == null ? 0 : hashCode(this.aqp_1)) | 0;
    return result;
  };
  protoOf(HolidayCalendarEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HolidayCalendarEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof HolidayCalendarEditUiState ? other : THROW_CCE();
    if (!equals(this.yqo_1, tmp0_other_with_cast.yqo_1))
      return false;
    if (!(this.zqo_1 === tmp0_other_with_cast.zqo_1))
      return false;
    if (!equals(this.aqp_1, tmp0_other_with_cast.aqp_1))
      return false;
    return true;
  };
  function Companion_101() {
    this.bqp_1 = 'HolidayCalendarList';
  }
  var Companion_instance_150;
  function Companion_getInstance_118() {
    return Companion_instance_150;
  }
  function HolidayCalendarListUiState(holidayCalendarList) {
    var tmp;
    if (holidayCalendarList === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp = emptyList();
    } else {
      tmp = holidayCalendarList;
    }
    holidayCalendarList = tmp;
    this.cqp_1 = holidayCalendarList;
  }
  protoOf(HolidayCalendarListUiState).toString = function () {
    return 'HolidayCalendarListUiState(holidayCalendarList=' + this.cqp_1 + ')';
  };
  protoOf(HolidayCalendarListUiState).hashCode = function () {
    return hashCode(this.cqp_1);
  };
  protoOf(HolidayCalendarListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HolidayCalendarListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof HolidayCalendarListUiState ? other : THROW_CCE();
    if (!equals(this.cqp_1, tmp0_other_with_cast.cqp_1))
      return false;
    return true;
  };
  function LanguageDetailUiState(language) {
    language = language === VOID ? null : language;
    this.dqp_1 = language;
  }
  protoOf(LanguageDetailUiState).toString = function () {
    return 'LanguageDetailUiState(language=' + this.dqp_1 + ')';
  };
  protoOf(LanguageDetailUiState).hashCode = function () {
    return this.dqp_1 == null ? 0 : this.dqp_1.hashCode();
  };
  protoOf(LanguageDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LanguageDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LanguageDetailUiState ? other : THROW_CCE();
    if (!equals(this.dqp_1, tmp0_other_with_cast.dqp_1))
      return false;
    return true;
  };
  function LanguageEditUiState(language, fieldsEnabled, languageNameError, twoLettersCodeError, threeLettersCodeError) {
    language = language === VOID ? null : language;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    languageNameError = languageNameError === VOID ? null : languageNameError;
    twoLettersCodeError = twoLettersCodeError === VOID ? null : twoLettersCodeError;
    threeLettersCodeError = threeLettersCodeError === VOID ? null : threeLettersCodeError;
    this.eqp_1 = language;
    this.fqp_1 = fieldsEnabled;
    this.gqp_1 = languageNameError;
    this.hqp_1 = twoLettersCodeError;
    this.iqp_1 = threeLettersCodeError;
  }
  protoOf(LanguageEditUiState).toString = function () {
    return 'LanguageEditUiState(language=' + this.eqp_1 + ', fieldsEnabled=' + this.fqp_1 + ', languageNameError=' + this.gqp_1 + ', twoLettersCodeError=' + this.hqp_1 + ', threeLettersCodeError=' + this.iqp_1 + ')';
  };
  protoOf(LanguageEditUiState).hashCode = function () {
    var result = this.eqp_1 == null ? 0 : this.eqp_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.fqp_1) | 0;
    result = imul(result, 31) + (this.gqp_1 == null ? 0 : getStringHashCode(this.gqp_1)) | 0;
    result = imul(result, 31) + (this.hqp_1 == null ? 0 : getStringHashCode(this.hqp_1)) | 0;
    result = imul(result, 31) + (this.iqp_1 == null ? 0 : getStringHashCode(this.iqp_1)) | 0;
    return result;
  };
  protoOf(LanguageEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LanguageEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LanguageEditUiState ? other : THROW_CCE();
    if (!equals(this.eqp_1, tmp0_other_with_cast.eqp_1))
      return false;
    if (!(this.fqp_1 === tmp0_other_with_cast.fqp_1))
      return false;
    if (!(this.gqp_1 == tmp0_other_with_cast.gqp_1))
      return false;
    if (!(this.hqp_1 == tmp0_other_with_cast.hqp_1))
      return false;
    if (!(this.iqp_1 == tmp0_other_with_cast.iqp_1))
      return false;
    return true;
  };
  function Companion_102() {
    this.jqp_1 = 'LanguageList';
  }
  var Companion_instance_151;
  function Companion_getInstance_119() {
    return Companion_instance_151;
  }
  function LanguageListUiState(languageList, sortOptions, sortOrder) {
    languageList = languageList === VOID ? emptyList() : languageList;
    var tmp;
    if (sortOptions === VOID) {
      var tmp_0 = strings_getInstance().pmk_1;
      var tmp_1 = new SortOrderOption(tmp_0, 1, true);
      var tmp_2 = strings_getInstance().pmk_1;
      var tmp_3 = new SortOrderOption(tmp_2, 2, false);
      var tmp_4 = strings_getInstance().cml_1;
      var tmp_5 = new SortOrderOption(tmp_4, 3, true);
      var tmp_6 = strings_getInstance().cml_1;
      var tmp_7 = new SortOrderOption(tmp_6, 4, false);
      var tmp_8 = strings_getInstance().dml_1;
      var tmp_9 = new SortOrderOption(tmp_8, 5, true);
      var tmp_10 = strings_getInstance().dml_1;
      tmp = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, new SortOrderOption(tmp_10, 6, false)]);
    } else {
      tmp = sortOptions;
    }
    sortOptions = tmp;
    sortOrder = sortOrder === VOID ? first_0(sortOptions) : sortOrder;
    this.kqp_1 = languageList;
    this.lqp_1 = sortOptions;
    this.mqp_1 = sortOrder;
  }
  protoOf(LanguageListUiState).toString = function () {
    return 'LanguageListUiState(languageList=' + this.kqp_1 + ', sortOptions=' + this.lqp_1 + ', sortOrder=' + this.mqp_1 + ')';
  };
  protoOf(LanguageListUiState).hashCode = function () {
    var result = hashCode(this.kqp_1);
    result = imul(result, 31) + hashCode(this.lqp_1) | 0;
    result = imul(result, 31) + this.mqp_1.hashCode() | 0;
    return result;
  };
  protoOf(LanguageListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LanguageListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LanguageListUiState ? other : THROW_CCE();
    if (!equals(this.kqp_1, tmp0_other_with_cast.kqp_1))
      return false;
    if (!equals(this.lqp_1, tmp0_other_with_cast.lqp_1))
      return false;
    if (!this.mqp_1.equals(tmp0_other_with_cast.mqp_1))
      return false;
    return true;
  };
  function LeavingReasonEditViewModel$slambda$slambda($savedStateHandle, resultContinuation) {
    this.vqp_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda).xqp = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.xqp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.wqp_1.u7d();
            Companion_getInstance_116();
            var tmp0_safe_receiver = this.vqp_1.ba('entityUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.xfh(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).yny = function (it, completion) {
    var i = new LeavingReasonEditViewModel$slambda$slambda(this.vqp_1, completion);
    i.wqp_1 = it;
    return i;
  };
  function LeavingReasonEditViewModel$slambda$slambda_0($savedStateHandle, resultContinuation) {
    var i = new LeavingReasonEditViewModel$slambda$slambda($savedStateHandle, resultContinuation);
    var l = function (it, $completion) {
      return i.xqp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).gqq = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.gqq($completion);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new LeavingReason();
          this_0.u94_1 = '';
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new LeavingReasonEditViewModel$slambda$slambda_1(completion);
  };
  function LeavingReasonEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new LeavingReasonEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.gqq($completion);
    };
    l.$arity = 0;
    return l;
  }
  function LeavingReasonEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqr_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jqr(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_103() {
    this.kqr_1 = 'LeavingReasonEdit';
  }
  var Companion_instance_152;
  function Companion_getInstance_120() {
    return Companion_instance_152;
  }
  function LeavingReasonEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.tqr_1 = this$0;
    this.uqr_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LeavingReasonEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.wqr_1 = Companion_getInstance_11().n4r();
            this.hd_1 = 1;
            var tmp_0 = LeavingReasonEditViewModel$slambda$slambda_0(this.uqr_1, null);
            var tmp_1 = LeavingReasonEditViewModel$slambda$slambda_2(null);
            suspendResult = this.tqr_1.kqo(this.wqr_1, VOID, VOID, tmp_0, tmp_1, LeavingReasonEditViewModel$slambda$lambda(this.tqr_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.tqr_1.eqr_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jqr(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new LeavingReasonEditViewModel$slambda(this.tqr_1, this.uqr_1, completion);
    i.vqr_1 = $this$launch;
    return i;
  };
  function LeavingReasonEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new LeavingReasonEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.fqs_1 = $commitDelay;
    this.gqs_1 = $entity;
    this.hqs_1 = $this;
    this.iqs_1 = $key;
    this.jqs_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.fqs_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.gqs_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.hqs_1.gqo(this.hqs_1.aqn_1, this.iqs_1, this.jqs_1, this.gqs_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new LeavingReasonEditViewModel$onEntityChanged$slambda(this.fqs_1, this.gqs_1, this.hqs_1, this.iqs_1, this.jqs_1, completion);
    i.kqs_1 = $this$launch;
    return i;
  };
  function LeavingReasonEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new LeavingReasonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'LeavingReasonEdit');
    this.eqr_1 = MutableStateFlow(new LeavingReasonEditUiState(VOID, VOID, false));
    this.fqr_1 = asStateFlow(this.eqr_1);
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, LeavingReasonEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(LeavingReasonEditViewModel).lqs = function (leavingReason) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqr_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.jqr(leavingReason);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_11().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.hqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.rqn();
    tmp.hqt_1 = launch(tmp_0, VOID, VOID, LeavingReasonEditViewModel$onEntityChanged$slambda_0(commitDelay, leavingReason, this, key, serializer, null));
  };
  function LeavingReasonEditUiState(leavingReason, reasonTitleError, fieldsEnabled) {
    leavingReason = leavingReason === VOID ? null : leavingReason;
    reasonTitleError = reasonTitleError === VOID ? null : reasonTitleError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.gqr_1 = leavingReason;
    this.hqr_1 = reasonTitleError;
    this.iqr_1 = fieldsEnabled;
  }
  protoOf(LeavingReasonEditUiState).mqt = function (leavingReason, reasonTitleError, fieldsEnabled) {
    return new LeavingReasonEditUiState(leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).jqr = function (leavingReason, reasonTitleError, fieldsEnabled, $super) {
    leavingReason = leavingReason === VOID ? this.gqr_1 : leavingReason;
    reasonTitleError = reasonTitleError === VOID ? this.hqr_1 : reasonTitleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.iqr_1 : fieldsEnabled;
    return $super === VOID ? this.mqt(leavingReason, reasonTitleError, fieldsEnabled) : $super.mqt.call(this, leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).toString = function () {
    return 'LeavingReasonEditUiState(leavingReason=' + this.gqr_1 + ', reasonTitleError=' + this.hqr_1 + ', fieldsEnabled=' + this.iqr_1 + ')';
  };
  protoOf(LeavingReasonEditUiState).hashCode = function () {
    var result = this.gqr_1 == null ? 0 : hashCode(this.gqr_1);
    result = imul(result, 31) + (this.hqr_1 == null ? 0 : getStringHashCode(this.hqr_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.iqr_1) | 0;
    return result;
  };
  protoOf(LeavingReasonEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LeavingReasonEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LeavingReasonEditUiState ? other : THROW_CCE();
    if (!equals(this.gqr_1, tmp0_other_with_cast.gqr_1))
      return false;
    if (!(this.hqr_1 == tmp0_other_with_cast.hqr_1))
      return false;
    if (!(this.iqr_1 === tmp0_other_with_cast.iqr_1))
      return false;
    return true;
  };
  function Companion_104() {
    this.nqt_1 = 'ReportFilterEdit';
  }
  var Companion_instance_153;
  function Companion_getInstance_121() {
    return Companion_instance_153;
  }
  function ReportFilterEditUiState(fieldError, conditionsError, valuesError, fieldsEnabled, reportFilter, uidAndLabelList, createNewFilter, reportFilterValueVisible, reportFilterBetweenValueVisible, reportFilterUidAndLabelListVisible) {
    fieldError = fieldError === VOID ? null : fieldError;
    conditionsError = conditionsError === VOID ? null : conditionsError;
    valuesError = valuesError === VOID ? null : valuesError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    reportFilter = reportFilter === VOID ? null : reportFilter;
    uidAndLabelList = uidAndLabelList === VOID ? emptyList() : uidAndLabelList;
    createNewFilter = createNewFilter === VOID ? '' : createNewFilter;
    reportFilterValueVisible = reportFilterValueVisible === VOID ? true : reportFilterValueVisible;
    reportFilterBetweenValueVisible = reportFilterBetweenValueVisible === VOID ? true : reportFilterBetweenValueVisible;
    reportFilterUidAndLabelListVisible = reportFilterUidAndLabelListVisible === VOID ? true : reportFilterUidAndLabelListVisible;
    this.oqt_1 = fieldError;
    this.pqt_1 = conditionsError;
    this.qqt_1 = valuesError;
    this.rqt_1 = fieldsEnabled;
    this.sqt_1 = reportFilter;
    this.tqt_1 = uidAndLabelList;
    this.uqt_1 = createNewFilter;
    this.vqt_1 = reportFilterValueVisible;
    this.wqt_1 = reportFilterBetweenValueVisible;
    this.xqt_1 = reportFilterUidAndLabelListVisible;
  }
  protoOf(ReportFilterEditUiState).toString = function () {
    return 'ReportFilterEditUiState(fieldError=' + this.oqt_1 + ', conditionsError=' + this.pqt_1 + ', valuesError=' + this.qqt_1 + ', fieldsEnabled=' + this.rqt_1 + ', reportFilter=' + this.sqt_1 + ', uidAndLabelList=' + this.tqt_1 + ', createNewFilter=' + this.uqt_1 + ', reportFilterValueVisible=' + this.vqt_1 + ', reportFilterBetweenValueVisible=' + this.wqt_1 + ', reportFilterUidAndLabelListVisible=' + this.xqt_1 + ')';
  };
  protoOf(ReportFilterEditUiState).hashCode = function () {
    var result = this.oqt_1 == null ? 0 : getStringHashCode(this.oqt_1);
    result = imul(result, 31) + (this.pqt_1 == null ? 0 : getStringHashCode(this.pqt_1)) | 0;
    result = imul(result, 31) + (this.qqt_1 == null ? 0 : getStringHashCode(this.qqt_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rqt_1) | 0;
    result = imul(result, 31) + (this.sqt_1 == null ? 0 : this.sqt_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.tqt_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.uqt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vqt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wqt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xqt_1) | 0;
    return result;
  };
  protoOf(ReportFilterEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ReportFilterEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ReportFilterEditUiState ? other : THROW_CCE();
    if (!(this.oqt_1 == tmp0_other_with_cast.oqt_1))
      return false;
    if (!(this.pqt_1 == tmp0_other_with_cast.pqt_1))
      return false;
    if (!(this.qqt_1 == tmp0_other_with_cast.qqt_1))
      return false;
    if (!(this.rqt_1 === tmp0_other_with_cast.rqt_1))
      return false;
    if (!equals(this.sqt_1, tmp0_other_with_cast.sqt_1))
      return false;
    if (!equals(this.tqt_1, tmp0_other_with_cast.tqt_1))
      return false;
    if (!(this.uqt_1 === tmp0_other_with_cast.uqt_1))
      return false;
    if (!(this.vqt_1 === tmp0_other_with_cast.vqt_1))
      return false;
    if (!(this.wqt_1 === tmp0_other_with_cast.wqt_1))
      return false;
    if (!(this.xqt_1 === tmp0_other_with_cast.xqt_1))
      return false;
    return true;
  };
  function ScopedGrantDetailUiState(entity, bitmaskList) {
    entity = entity === VOID ? null : entity;
    bitmaskList = bitmaskList === VOID ? emptyList() : bitmaskList;
    this.yqt_1 = entity;
    this.zqt_1 = bitmaskList;
  }
  protoOf(ScopedGrantDetailUiState).toString = function () {
    return 'ScopedGrantDetailUiState(entity=' + this.yqt_1 + ', bitmaskList=' + this.zqt_1 + ')';
  };
  protoOf(ScopedGrantDetailUiState).hashCode = function () {
    var result = this.yqt_1 == null ? 0 : hashCode(this.yqt_1);
    result = imul(result, 31) + hashCode(this.zqt_1) | 0;
    return result;
  };
  protoOf(ScopedGrantDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantDetailUiState ? other : THROW_CCE();
    if (!equals(this.yqt_1, tmp0_other_with_cast.yqt_1))
      return false;
    if (!equals(this.zqt_1, tmp0_other_with_cast.zqt_1))
      return false;
    return true;
  };
  function Companion_105() {
    this.aqu_1 = 'ScopedGrantEdit';
    this.bqu_1 = 'grantToGroup';
    this.cqu_1 = 'grantToName';
    this.dqu_1 = 'grantTableId';
    this.equ_1 = 'grantEntityUid';
    this.fqu_1 = 'permissionList';
  }
  var Companion_instance_154;
  function Companion_getInstance_122() {
    return Companion_instance_154;
  }
  function ScopedGrantEditUiState(entity, bitmaskList) {
    entity = entity === VOID ? null : entity;
    var tmp;
    if (bitmaskList === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp = emptyList();
    } else {
      tmp = bitmaskList;
    }
    bitmaskList = tmp;
    this.gqu_1 = entity;
    this.hqu_1 = bitmaskList;
  }
  protoOf(ScopedGrantEditUiState).toString = function () {
    return 'ScopedGrantEditUiState(entity=' + this.gqu_1 + ', bitmaskList=' + this.hqu_1 + ')';
  };
  protoOf(ScopedGrantEditUiState).hashCode = function () {
    var result = this.gqu_1 == null ? 0 : hashCode(this.gqu_1);
    result = imul(result, 31) + hashCode(this.hqu_1) | 0;
    return result;
  };
  protoOf(ScopedGrantEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantEditUiState ? other : THROW_CCE();
    if (!equals(this.gqu_1, tmp0_other_with_cast.gqu_1))
      return false;
    if (!equals(this.hqu_1, tmp0_other_with_cast.hqu_1))
      return false;
    return true;
  };
  function Companion_106() {
    Companion_instance_155 = this;
    this.iqu_1 = new Long(200, 0);
    this.jqu_1 = 'initPicUri';
  }
  var Companion_instance_155;
  function Companion_getInstance_123() {
    if (Companion_instance_155 == null)
      new Companion_106();
    return Companion_instance_155;
  }
  function UstadEditViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_123();
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.hqt_1 = null;
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.iqt_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  protoOf(UstadEditViewModel).jqt = function (detailViewName, entityUid, result, detailViewExtraArgs) {
    Companion_getInstance_116();
    var popUpToViewName = this.aqn_1.ba('result_viewname');
    Companion_getInstance_116();
    var saveToKey = this.aqn_1.ba('result_key');
    Companion_getInstance_125();
    var createdNewEntity = this.aqn_1.ba('entityUid') == null;
    var returnResultExpected = !(popUpToViewName == null) ? !(saveToKey == null) : false;
    if (createdNewEntity ? !returnResultExpected : false) {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.finishWithResult.<anonymous>' call
      this_0.r2(detailViewExtraArgs);
      Companion_getInstance_125();
      this_0.s('entityUid', entityUid.toString());
      var tmp = this_0.f3();
      Companion_getInstance_116();
      this.cqn_1.lq9(detailViewName, tmp, new UstadGoOptions('', true));
    } else {
      this.lqt(result);
    }
  };
  protoOf(UstadEditViewModel).kqt = function (detailViewName, entityUid, result, detailViewExtraArgs, $super) {
    detailViewExtraArgs = detailViewExtraArgs === VOID ? emptyMap() : detailViewExtraArgs;
    var tmp;
    if ($super === VOID) {
      this.jqt(detailViewName, entityUid, result, detailViewExtraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.jqt.call(this, detailViewName, entityUid, result, detailViewExtraArgs);
    }
    return tmp;
  };
  protoOf(UstadEditViewModel).kqu = function (newEntityStringResource, editEntityStringResource) {
    var tmp;
    if (!this.iqt_1.equals(new Long(0, 0))) {
      tmp = true;
    } else {
      Companion_getInstance_115();
      tmp = !(this.aqn_1.ba('entity') == null);
    }
    var isEditing = tmp;
    var tmp_0 = this.aqo();
    var tmp_1;
    if (isEditing) {
      tmp_1 = editEntityStringResource;
    } else {
      tmp_1 = newEntityStringResource;
    }
    return tmp_0.moj(tmp_1);
  };
  protoOf(UstadEditViewModel).lqu = function (prevFieldValue, currentFieldValue, currentErrorMessage) {
    return currentErrorMessage == null ? null : !equals(prevFieldValue, currentFieldValue) ? null : currentErrorMessage;
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.wqu_1 = this$0;
    this.xqu_1 = $fabStringResource;
    this.yqu_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).lqf = function (hasAddPermission, $completion) {
    var tmp = this.mqf(hasAddPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          setAddNewItemUiState(this.wqu_1, this.zqu_1, this.xqu_1, this.yqu_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).mqf = function (hasAddPermission, completion) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this.wqu_1, this.xqu_1, this.yqu_1, completion);
    i.zqu_1 = hasAddPermission;
    return i;
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation);
    var l = function (hasAddPermission, $completion) {
      return i.lqf(hasAddPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function setAddNewItemUiState($this, hasAddPermission, fabStringResource, onSetAddItemVisibility) {
    var tmp;
    if (hasAddPermission ? $this.aqw().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var tmp_0 = $this.aqo().moj(fabStringResource);
      var tmp_1 = FabIcon_ADD_getInstance();
      tmp = new FabUiState(true, tmp_0, tmp_1, UstadListViewModel$onClickAdd$ref($this));
    } else {
      tmp = new FabUiState(false);
    }
    var fabState = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.setAddNewItemUiState.<anonymous>' call
        var nextValue = prevValue.mq6(fabState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    onSetAddItemVisibility(hasAddPermission ? $this.aqw().equals(ListViewMode_PICKER_getInstance()) : false);
  }
  function Companion_107() {
    this.bqw_1 = 'listMode';
  }
  var Companion_instance_156;
  function Companion_getInstance_124() {
    return Companion_instance_156;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_3(function_0) {
    this.cqw_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_3).t1d = function (value, $completion) {
    return this.cqw_1(value, $completion);
  };
  function UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation) {
    this.lqw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$searchEvtCollator$slambda).nqw = function (it, $completion) {
    var tmp = this.oqw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).he = function (p1, $completion) {
    return this.nqw((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_elvis_lhs = lastOrNull(this.mqw_1);
          this.lqw_1.pqw(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).oqw = function (it, completion) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this.lqw_1, completion);
    i.mqw_1 = it;
    return i;
  };
  function UstadListViewModel$searchEvtCollator$slambda_0(this$0, resultContinuation) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.nqw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadListViewModel$createSearchEnabledState$lambda(this$0) {
    return function (searchText) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.createSearchEnabledState.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.eq6_1.wq5(VOID, searchText));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this$0.zqv_1.s6x(searchText);
      return Unit_instance;
    };
  }
  function UstadListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.qqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.zqw_1 = $hasPermissionFlow;
    this.aqx_1 = this$0;
    this.bqx_1 = $fabStringResource;
    this.cqx_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.zqw_1());
            var tmp_1 = UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this.aqx_1, this.bqx_1, this.cqx_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_3(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).l78 = function (completion) {
    return new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda(this.zqw_1, this.aqx_1, this.bqx_1, this.cqx_1, completion);
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadListViewModel$onClickAdd$ref_0($boundThis) {
    var l = function () {
      $boundThis.qqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel(di, savedStateHandle, initialState, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.vqv_1 = MutableStateFlow(initialState);
    this.wqv_1 = asStateFlow(this.vqv_1);
    this.xqv_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.yqv_1 = asSharedFlow(this.xqv_1);
    var tmp = this;
    var tmp_0 = new Long(200, 0);
    var tmp_1 = this.rqn();
    var tmp_2 = BufferOverflow_DROP_OLDEST_getInstance();
    tmp.zqv_1 = new EventCollator2(tmp_0, tmp_1, 1, tmp_2, UstadListViewModel$searchEvtCollator$slambda_0(this, null));
  }
  protoOf(UstadListViewModel).aqw = function () {
    var tmp;
    var tmp_0;
    Companion_getInstance_116();
    if (this.aqn_1.ba('listMode') === ListViewMode_PICKER_getInstance().zqj_1) {
      tmp_0 = true;
    } else {
      var tmp_1;
      Companion_getInstance_116();
      if (!(this.aqn_1.ba('result_viewname') == null)) {
        Companion_getInstance_116();
        tmp_1 = !(this.aqn_1.ba('result_key') == null);
      } else {
        tmp_1 = false;
      }
      tmp_0 = tmp_1;
    }
    if (tmp_0) {
      tmp = ListViewMode_PICKER_getInstance();
    } else {
      tmp = ListViewMode_BROWSER_getInstance();
    }
    return tmp;
  };
  protoOf(UstadListViewModel).dqx = function (visible) {
    return new AppBarSearchUiState(visible, VOID, UstadListViewModel$createSearchEnabledState$lambda(this));
  };
  protoOf(UstadListViewModel).eqx = function (visible, $super) {
    visible = visible === VOID ? true : visible;
    return $super === VOID ? this.dqx(visible) : $super.dqx.call(this, visible);
  };
  protoOf(UstadListViewModel).fqx = function (hasPermissionFlow, fabStringResource, onSetAddListItemVisibility, $completion) {
    return whenSubscribed(this.vqv_1, UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0(hasPermissionFlow, this, fabStringResource, onSetAddListItemVisibility, null), $completion);
  };
  protoOf(UstadListViewModel).gqx = function (hasAddPermission, stringResource, onClick) {
    var tmp;
    if (hasAddPermission ? this.aqw().equals(ListViewMode_BROWSER_getInstance()) : false) {
      tmp = new FabUiState(true, this.aqo().moj(stringResource), FabIcon_ADD_getInstance(), onClick);
    } else {
      tmp = new FabUiState(false);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).hqx = function (hasAddPermission, stringResource, onClick, $super) {
    var tmp;
    if (onClick === VOID) {
      tmp = UstadListViewModel$onClickAdd$ref_0(this);
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    return $super === VOID ? this.gqx(hasAddPermission, stringResource, onClick) : $super.gqx.call(this, hasAddPermission, stringResource, onClick);
  };
  protoOf(UstadListViewModel).iqx = function (editViewName, extraArgs) {
    var resultDest = this.bqo();
    var tmp;
    if (!(resultDest == null)) {
      Companion_getInstance_116();
      var tmp_0 = to('result_viewname', resultDest.yq9_1);
      Companion_getInstance_116();
      tmp = plus_0(mapOf([tmp_0, to('result_key', resultDest.zq9_1)]), extraArgs);
    } else {
      tmp = extraArgs;
    }
    var args = tmp;
    this.cqn_1.rp6(editViewName, args);
  };
  protoOf(UstadListViewModel).jqx = function (editViewName, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.iqx(editViewName, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.iqx.call(this, editViewName, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).kqx = function (detailViewName, entityUid, result, extraArgs) {
    var resultDest = this.bqo();
    if (!(resultDest == null)) {
      this.lqt(result);
    } else {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.navigateOnItemClicked.<anonymous>' call
      this_0.r2(extraArgs);
      Companion_getInstance_125();
      this_0.s('entityUid', entityUid.toString());
      var tmp$ret$2 = this_0.f3();
      this.cqn_1.rp6(detailViewName, tmp$ret$2);
    }
  };
  protoOf(UstadListViewModel).lqx = function (detailViewName, entityUid, result, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.kqx(detailViewName, entityUid, result, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.kqx.call(this, detailViewName, entityUid, result, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).mqx = function (browseStringResource, selectStringResource) {
    var tmp = this.aqo();
    var tmp_0;
    if (this.aqw().equals(ListViewMode_BROWSER_getInstance())) {
      tmp_0 = browseStringResource;
    } else {
      tmp_0 = selectStringResource;
    }
    return tmp.moj(tmp_0);
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation) {
    this.vqx_1 = $$this$unsafeFlow;
    this.wqx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).qqa = function (value, $completion) {
    var tmp = this.rqa(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.zqx_1 = this.vqx_1;
            var tmp_1 = this;
            tmp_1.aqy_1 = this.xqx_1;
            var it = this.aqy_1;
            var isNew = it.wq9_1.c7(this.wqx_1.pqn_1) > 0;
            if (isNew) {
              _set_lastNavResultTimestampCollected__txfbew(this.wqx_1, it.wq9_1);
            }

            if (isNew) {
              this.hd_1 = 3;
              suspendResult = this.zqx_1.t1d(this.aqy_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.yqx_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).rqa = function (value, completion) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda(this.vqx_1, this.wqx_1, completion);
    i.xqx_1 = value;
    return i;
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0($$this$unsafeFlow, this$0, resultContinuation) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation);
    var l = function (value, $completion) {
      return i.qqa(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$60(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jqy_1 = _this__u8e3s4;
    this.kqy_1 = collector;
  }
  protoOf($collectCOROUTINE$60).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.lqy_1 = this.kqy_1;
            this.hd_1 = 1;
            var tmp_1 = UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0(this.lqy_1, this.jqy_1.nqy_1, null);
            suspendResult = this.jqy_1.mqy_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_4(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _set_lastNavResultTimestampCollected__txfbew($this, value) {
    $this.pqn_1 = value;
    $this.aqn_1.dqj('collectedTs', value.toString());
  }
  function Companion_108() {
    Companion_instance_157 = this;
    this.oqy_1 = 'entityState';
    this.pqy_1 = 'collectedTs';
    this.qqy_1 = 'initState';
    this.rqy_1 = 'timeZone';
    this.sqy_1 = 'parentUid';
    this.tqy_1 = 'courseBlockUid';
    this.uqy_1 = 'entityUid';
    this.vqy_1 = 'serverUrl';
    this.wqy_1 = 'next';
    this.xqy_1 = 'maxDob';
    var tmp = this;
    Companion_getInstance_140();
    Companion_getInstance_169();
    Companion_getInstance_190();
    Companion_getInstance_204();
    tmp.yqy_1 = listOf(['CourseListHome', 'ContentEntryListHome', 'ConversationListHome', 'PersonListHome']);
    this.zqy_1 = 'openLink';
    this.aqz_1 = 'account';
    this.bqz_1 = 'popUpToOnFinish';
    this.cqz_1 = 'inviteCode';
    this.dqz_1 = 'clazzUid';
    this.eqz_1 = 'entryid';
    this.fqz_1 = 'personUid';
    this.gqz_1 = 't';
    this.hqz_1 = 'noSessionChange';
    this.iqz_1 = 'selectedAccountPersonUid';
    this.jqz_1 = 'selectedAccountEndpointUrl';
    this.kqz_1 = 'result_viewname';
    this.lqz_1 = 'result_key';
  }
  var Companion_instance_157;
  function Companion_getInstance_125() {
    if (Companion_instance_157 == null)
      new Companion_108();
    return Companion_instance_157;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_4(function_0) {
    this.mqz_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_4).t1d = function (value, $completion) {
    return this.mqz_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(function_0) {
    this.nqz_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0).cpj = function (url, target) {
    return this.nqz_1(url, target);
  };
  function ifLoggedInElseNavigateToLoginWithNextDestSet$lambda($apiUrlConfig$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('apiUrlConfig', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $apiUrlConfig$delegate.t2();
  }
  function UstadViewModel$onClickLinkUseCase$delegate$lambda(this$0) {
    return function () {
      var tmp = this$0.qqn();
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(this$0.a57()).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.d58(tmp$ret$0, null);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(this$0.a57()).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp$ret$3 = tmp_3.d58(tmp$ret$2, null);
      return OnClickLinkUseCase_init_$Create$(this$0.cqn_1, tmp, tmp_2, tmp$ret$3);
    };
  }
  function _no_name_provided__qut3iv_2($this, this$0) {
    this.mqy_1 = $this;
    this.nqy_1 = this$0;
  }
  protoOf(_no_name_provided__qut3iv_2).gqb = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$60(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_2).a1c = function (collector, $completion) {
    return this.gqb(collector, $completion);
  };
  function UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation) {
    this.wqz_1 = this$0;
    this.xqz_1 = $deserializer;
    this.yqz_1 = $jsonStr;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$getJson$slambda).ar0 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$getJson$slambda).he = function (p1, $completion) {
    return this.ar0((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$getJson$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.wqz_1.m4r().s45(this.xqz_1, this.yqz_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadViewModel$getJson$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadViewModel$getJson$slambda(this.wqz_1, this.xqz_1, this.yqz_1, completion);
    i.zqz_1 = $this$withContext;
    return i;
  };
  function UstadViewModel$getJson$slambda_0(this$0, $deserializer, $jsonStr, resultContinuation) {
    var i = new UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.ar0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation) {
    this.jr0_1 = this$0;
    this.kr0_1 = $serializer;
    this.lr0_1 = $value;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$setJson$slambda).nr0 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$setJson$slambda).he = function (p1, $completion) {
    return this.nr0((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$setJson$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.jr0_1.m4r().r45(this.kr0_1, this.lr0_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadViewModel$setJson$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadViewModel$setJson$slambda(this.jr0_1, this.kr0_1, this.lr0_1, completion);
    i.mr0_1 = $this$withContext;
    return i;
  };
  function UstadViewModel$setJson$slambda_0(this$0, $serializer, $value, resultContinuation) {
    var i = new UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.nr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    this.wr0_1 = this$0;
    this.xr0_1 = $permissionCheck;
    this.yr0_1 = $block;
    this.zr0_1 = $onSetFieldsEnabled;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$launchIfHasPermission$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 7;
            this.cr1_1 = this.wr0_1.vqn();
            if (this.cr1_1 == null) {
              this.dr1_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = localFirstThenRepoIfFalse(this.cr1_1, this.xr0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.dr1_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.er1_1 = this.dr1_1;
            if (this.er1_1 === false) {
              this.wr0_1.cqn_1.lq9('Error', emptyMap(), new UstadGoOptions(this.wr0_1.bqn_1, true));
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.yr0_1(this.ar1_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.br1_1 = Unit_instance;
            this.id_1 = 8;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.id_1 = 8;
            l$ret$5: do {
              var this_0 = this.wr0_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mq6(VOID, Companion_getInstance_97().uq6_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            var tmp1_safe_receiver = this.zr0_1;
            if (tmp1_safe_receiver == null)
              null;
            else
              tmp1_safe_receiver(true);
            return Unit_instance;
          case 7:
            this.id_1 = 8;
            var t = this.kd_1;
            l$ret$3: do {
              var this_1 = this.wr0_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mq6(VOID, Companion_getInstance_97().uq6_1);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp1_safe_receiver_0 = this.zr0_1;
            if (tmp1_safe_receiver_0 == null)
              null;
            else
              tmp1_safe_receiver_0(true);
            throw t;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadViewModel$launchIfHasPermission$slambda(this.wr0_1, this.xr0_1, this.yr0_1, this.zr0_1, completion);
    i.ar1_1 = $this$launch;
    return i;
  };
  function UstadViewModel$launchIfHasPermission$slambda_0(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    var i = new UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchWithLoadingIndicator$slambda($onSetFieldsEnabled, this$0, $block, resultContinuation) {
    this.nr1_1 = $onSetFieldsEnabled;
    this.or1_1 = this$0;
    this.pr1_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.nr1_1(false);
            l$ret$1: do {
              var this_0 = this.or1_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mq6(VOID, Companion_getInstance_97().tq6_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.fq6_1.nq5(VOID, VOID, false));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.pr1_1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.rr1_1 = suspendResult;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.nr1_1(true);
            l$ret$7: do {
              var this_1 = this.or1_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mq6(VOID, Companion_getInstance_97().uq6_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.fq6_1.nq5(VOID, VOID, true));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.nr1_1(true);
            l$ret$5: do {
              var this_2 = this.or1_1.eqn_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.mq6(VOID, Companion_getInstance_97().uq6_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.fq6_1.nq5(VOID, VOID, true));
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadViewModel$launchWithLoadingIndicator$slambda(this.nr1_1, this.or1_1, this.pr1_1, completion);
    i.qr1_1 = $this$launch;
    return i;
  };
  function UstadViewModel$launchWithLoadingIndicator$slambda_0($onSetFieldsEnabled, this$0, $block, resultContinuation) {
    var i = new UstadViewModel$launchWithLoadingIndicator$slambda($onSetFieldsEnabled, this$0, $block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function $getJsonCOROUTINE$57(_this__u8e3s4, _this__u8e3s4_0, key, deserializer, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ar2_1 = _this__u8e3s4;
    this.br2_1 = _this__u8e3s4_0;
    this.cr2_1 = key;
    this.dr2_1 = deserializer;
  }
  protoOf($getJsonCOROUTINE$57).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.er2_1 = this.br2_1.ba(this.cr2_1);
            if (!(this.er2_1 == null)) {
              this.hd_1 = 1;
              var tmp_0 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_0, UstadViewModel$getJson$slambda_0(this.ar2_1, this.dr2_1, this.er2_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.fr2_1 = null;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.fr2_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.fr2_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $setJsonCOROUTINE$58(_this__u8e3s4, _this__u8e3s4_0, key, serializer, value, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.or2_1 = _this__u8e3s4;
    this.pr2_1 = _this__u8e3s4_0;
    this.qr2_1 = key;
    this.rr2_1 = serializer;
    this.sr2_1 = value;
  }
  protoOf($setJsonCOROUTINE$58).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, UstadViewModel$setJson$slambda_0(this.or2_1, this.rr2_1, this.sr2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var jsonStr = suspendResult;
            this.pr2_1.dqj(this.qr2_1, jsonStr);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $loadEntityCOROUTINE$59(_this__u8e3s4, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.br3_1 = _this__u8e3s4;
    this.cr3_1 = serializer;
    this.dr3_1 = loadFromStateKeys;
    this.er3_1 = savedStateKey;
    this.fr3_1 = onLoadFromDb;
    this.gr3_1 = makeDefault;
    this.hr3_1 = uiUpdate;
  }
  protoOf($loadEntityCOROUTINE$59).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 19;
            var tmp_0 = this;
            tmp_0.ir3_1 = this.dr3_1;
            this.jr3_1 = this.ir3_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.jr3_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.kr3_1 = this.jr3_1.e();
            var tmp_1 = this;
            tmp_1.lr3_1 = this.kr3_1;
            this.hd_1 = 2;
            suspendResult = this.br3_1.fqo(this.br3_1.aqn_1, this.lr3_1, this.cr3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.mr3_1 = suspendResult;
            if (!(this.mr3_1 == null)) {
              this.hr3_1(this.mr3_1);
              return this.mr3_1;
            }

            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.nr3_1 = this.fr3_1;
            if (this.nr3_1 == null) {
              this.or3_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.nr3_1(this.br3_1.uqn(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.or3_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.pr3_1 = this.or3_1;
            if (!(this.pr3_1 == null)) {
              this.hr3_1(this.pr3_1);
            }

            this.id_1 = 13;
            this.rr3_1 = this.br3_1.vqn();
            if (this.rr3_1 == null) {
              this.sr3_1 = null;
              this.hd_1 = 8;
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.tr3_1 = this.rr3_1;
              var tmp_3 = this;
              tmp_3.ur3_1 = this.tr3_1;
              this.vr3_1 = this.fr3_1;
              if (this.vr3_1 == null) {
                this.wr3_1 = null;
                this.hd_1 = 7;
                continue $sm;
              } else {
                this.hd_1 = 6;
                suspendResult = this.vr3_1(this.ur3_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 6:
            this.wr3_1 = suspendResult;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.sr3_1 = this.wr3_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.xr3_1 = this.sr3_1;
            if (this.xr3_1 == null) {
              this.hd_1 = 9;
              suspendResult = this.gr3_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.yr3_1 = this.xr3_1;
              this.hd_1 = 10;
              continue $sm;
            }

          case 9:
            this.yr3_1 = suspendResult;
            this.hd_1 = 10;
            continue $sm;
          case 10:
            this.zr3_1 = this.yr3_1;
            if (!(this.zr3_1 == null)) {
              this.hd_1 = 11;
              suspendResult = this.br3_1.gqo(this.br3_1.aqn_1, this.er3_1, this.cr3_1, this.zr3_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 12;
              continue $sm;
            }

          case 11:
            this.hd_1 = 12;
            continue $sm;
          case 12:
            this.hr3_1(this.zr3_1);
            this.qr3_1 = this.zr3_1;
            this.id_1 = 19;
            this.hd_1 = 18;
            continue $sm;
          case 13:
            this.id_1 = 19;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof Exception) {
              this.ar4_1 = this.kd_1;
              if (!(this.pr3_1 == null)) {
                this.hd_1 = 14;
                suspendResult = this.br3_1.gqo(this.br3_1.aqn_1, this.er3_1, this.cr3_1, this.pr3_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 15;
                continue $sm;
              }
            } else {
              throw this.kd_1;
            }

          case 14:
            this.hd_1 = 15;
            continue $sm;
          case 15:
            this.br4_1 = this.pr3_1;
            if (this.br4_1 == null) {
              this.hd_1 = 16;
              suspendResult = this.gr3_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.cr4_1 = this.br4_1;
              this.hd_1 = 17;
              continue $sm;
            }

          case 16:
            var this_0 = suspendResult;
            this.hr3_1(this_0);
            this.cr4_1 = this_0;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            this.qr3_1 = this.cr4_1;
            this.hd_1 = 18;
            continue $sm;
          case 18:
            this.id_1 = 19;
            return this.qr3_1;
          case 19:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 19) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UstadViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_125();
    ViewModel_init_$Init$(this);
    this.zqm_1 = di;
    this.aqn_1 = savedStateHandle;
    this.bqn_1 = destinationName;
    this.cqn_1 = new CommandFlowUstadNavController();
    this.dqn_1 = this.cqn_1.kq9_1;
    this.eqn_1 = MutableStateFlow(new AppUiState());
    this.fqn_1 = asStateFlow(this.eqn_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.gqn_1 = Instance(this, tmp$ret$0, null).a5d(this, accountManager$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.qqn().loa();
    var trigger = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_2 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.h57(tmp$ret$2, context);
    var this_0 = On(this, tmp$ret$3, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_1.hqn_1 = Instance(this_0, tmp$ret$5, null).a5d(this, activeDataLayer$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.qqn().loa();
    var trigger_0 = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_6 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$8 = tmp_6.h57(tmp$ret$7, context_0);
    var this_1 = On(this, tmp$ret$8, trigger_0);
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_5.iqn_1 = Instance(this_1, tmp$ret$10, 1).a5d(this, activeDb$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(NavResultReturner), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.jqn_1 = Instance(this, tmp$ret$12, null).a5d(this, navResultReturner$factory());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.kqn_1 = Instance(this, tmp$ret$14, null).a5d(this, json$factory_1());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(SnackBarDispatcher), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.lqn_1 = Instance(this, tmp$ret$16, null).a5d(this, snackDispatcher$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(NavResultReturner), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.mqn_1 = Instance(this, tmp$ret$18, null).a5d(this, resultReturner$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$20 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.nqn_1 = Instance(this, tmp$ret$20, null).a5d(this, systemImpl$factory());
    var tmp_19 = this;
    tmp_19.oqn_1 = lazy_0(UstadViewModel$onClickLinkUseCase$delegate$lambda(this));
    var tmp_20 = this;
    var tmp0_safe_receiver = this.aqn_1.ba('collectedTs');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_20.pqn_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    if (this.pqn_1.equals(new Long(0, 0))) {
      _set_lastNavResultTimestampCollected__txfbew(this, systemTimeInMillis());
    }
  }
  protoOf(UstadViewModel).a57 = function () {
    return this.zqm_1;
  };
  protoOf(UstadViewModel).qqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.gqn_1;
    accountManager$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).rqn = function () {
    return get_viewModelScope(this);
  };
  protoOf(UstadViewModel).sqn = function () {
    return this.qqn().uo9().onu_1.f96_1;
  };
  protoOf(UstadViewModel).tqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.hqn_1;
    activeDataLayer$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).uqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.iqn_1;
    activeDb$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).vqn = function () {
    return this.tqn().tk2_1;
  };
  protoOf(UstadViewModel).wqn = function () {
    return this.tqn().wk2();
  };
  protoOf(UstadViewModel).xqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.jqn_1;
    navResultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).m4r = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.kqn_1;
    json$factory_2();
    return this_0.t2();
  };
  protoOf(UstadViewModel).yqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.lqn_1;
    snackDispatcher$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).zqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.mqn_1;
    resultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).aqo = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.nqn_1;
    systemImpl$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).bqo = function () {
    var popUpToViewName = this.aqn_1.ba('result_viewname');
    var saveToKey = this.aqn_1.ba('result_key');
    var tmp;
    if (!(popUpToViewName == null) ? !(saveToKey == null) : false) {
      tmp = new NavResultDest(popUpToViewName, saveToKey);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(UstadViewModel).cqo = function (value) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.<set-loadingState>.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, value);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(UstadViewModel).dqo = function () {
    return this.eqn_1.t2().yq5_1;
  };
  protoOf(UstadViewModel).eqo = function (_this__u8e3s4, key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.aqa(key);
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_2(this_0, this);
  };
  protoOf(UstadViewModel).fqo = function (_this__u8e3s4, key, deserializer, $completion) {
    var tmp = new $getJsonCOROUTINE$57(this, _this__u8e3s4, key, deserializer, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).gqo = function (_this__u8e3s4, key, serializer, value, $completion) {
    var tmp = new $setJsonCOROUTINE$58(this, _this__u8e3s4, key, serializer, value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).mqu = function (_this__u8e3s4, viewUri, goOptions) {
    var viewName = substringBefore_0(viewUri, '?');
    var tmp;
    if (contains(viewUri, '?')) {
      tmp = UMFileUtil_getInstance().parseURLQueryString(viewUri);
    } else {
      // Inline function 'kotlin.collections.mapOf' call
      tmp = emptyMap();
    }
    var args = tmp;
    _this__u8e3s4.lq9(viewName, args, goOptions);
  };
  protoOf(UstadViewModel).lqt = function (result) {
    var resultDest = this.bqo();
    if (!(resultDest == null)) {
      this.xqn().bqa(new NavResult(resultDest.zq9_1, systemTimeInMillis(), result));
      this.cqn_1.mq9(resultDest.yq9_1, false);
    } else {
      Companion_getInstance_116();
      this.cqn_1.mq9('', true);
    }
  };
  protoOf(UstadViewModel).hqo = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination) {
    var navArgs = toMutableMap(args);
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateForResult.<anonymous>' call
    if (!overwriteDestination) {
      tmp = navArgs;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      this.nqo(tmp0_safe_receiver, 'result_key');
    }
    if (!navArgs.r('result_key') ? true : overwriteDestination) {
      // Inline function 'kotlin.collections.set' call
      var key_0 = 'result_key';
      navArgs.s(key_0, key);
    }
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateForResult.<anonymous>' call
    if (!overwriteDestination) {
      tmp_0 = navArgs;
    } else {
      tmp_0 = null;
    }
    var tmp1_safe_receiver = tmp_0;
    if (tmp1_safe_receiver == null)
      null;
    else {
      this.nqo(tmp1_safe_receiver, 'result_viewname');
    }
    if (!navArgs.r('result_viewname') ? true : overwriteDestination) {
      // Inline function 'kotlin.collections.set' call
      var key_1 = 'result_viewname';
      var value = this.bqn_1;
      navArgs.s(key_1, value);
    }
    if (!(currentValue == null)) {
      // Inline function 'kotlin.collections.set' call
      Companion_getInstance_115();
      var value_0 = this.m4r().r45(serializer, currentValue);
      navArgs.s('entity', value_0);
    }
    this.cqn_1.lq9(nextViewName, toMap_0(navArgs), goOptions);
  };
  protoOf(UstadViewModel).iqo = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination, $super) {
    args = args === VOID ? emptyMap() : args;
    goOptions = goOptions === VOID ? Companion_getInstance_95().cq4_1 : goOptions;
    var tmp;
    if (overwriteDestination === VOID) {
      tmp = this instanceof UstadEditViewModel;
    } else {
      tmp = overwriteDestination;
    }
    overwriteDestination = tmp;
    var tmp_0;
    if ($super === VOID) {
      this.hqo(nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.hqo.call(this, nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
    }
    return tmp_0;
  };
  protoOf(UstadViewModel).jqo = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) {
    var tmp = new $loadEntityCOROUTINE$59(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).kqo = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion, $super) {
    var tmp;
    if (loadFromStateKeys === VOID) {
      Companion_getInstance_115();
      tmp = listOf(['entityState', 'entity']);
    } else {
      tmp = loadFromStateKeys;
    }
    loadFromStateKeys = tmp;
    savedStateKey = savedStateKey === VOID ? first_0(loadFromStateKeys) : savedStateKey;
    return $super === VOID ? this.jqo(serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) : $super.jqo.call(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
  };
  protoOf(UstadViewModel).lqo = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block) {
    if (setLoadingState) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.launchIfHasPermission.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, Companion_getInstance_97().tq6_1);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (onSetFieldsEnabled == null)
      null;
    else
      onSetFieldsEnabled(false);
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, UstadViewModel$launchIfHasPermission$slambda_0(this, permissionCheck, block, onSetFieldsEnabled, null));
  };
  protoOf(UstadViewModel).mqo = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block, $super) {
    setLoadingState = setLoadingState === VOID ? false : setLoadingState;
    onSetFieldsEnabled = onSetFieldsEnabled === VOID ? null : onSetFieldsEnabled;
    var tmp;
    if ($super === VOID) {
      this.lqo(permissionCheck, setLoadingState, onSetFieldsEnabled, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.lqo.call(this, permissionCheck, setLoadingState, onSetFieldsEnabled, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).nqo = function (_this__u8e3s4, key) {
    putFromSavedStateIfPresent(_this__u8e3s4, this.aqn_1, key);
  };
  protoOf(UstadViewModel).oqo = function (_this__u8e3s4, keys) {
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = keys.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.putAllFromSavedStateIfPresent.<anonymous>' call
      this.nqo(_this__u8e3s4, element);
    }
  };
  protoOf(UstadViewModel).nqu = function (onSetFieldsEnabled, block) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, UstadViewModel$launchWithLoadingIndicator$slambda_0(onSetFieldsEnabled, this, block, null));
  };
  protoOf(UstadViewModel).pqo = function (requireAdultAccount, args, block) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var apiUrlConfig$delegate = Instance(this, tmp$ret$0, null).a5d(null, getLocalDelegateReference('apiUrlConfig', KProperty0, false, function () {
      return THROW_ISE();
    }));
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.ifLoggedInElseNavigateToLoginWithNextDestSet.<anonymous>' call
    var it = this.qqn().uo9().onu_1;
    if (isGuestUser(it) ? true : requireAdultAccount ? !isDateOfBirthAnAdult(Companion_getInstance_6().fmh(it.o96_1)) : false) {
      var tmp_0 = this.bqn_1 + '?' + toQueryString(args);
      var tmp_1 = this.qqn();
      var tmp_2 = UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda;
      navigateToLink(this.cqn_1, tmp_0, tmp_1, new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(tmp_2), new UstadGoOptions(this.bqn_1, true), VOID, ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(apiUrlConfig$delegate).ao6_1);
    } else {
      block();
    }
  };
  protoOf(UstadViewModel).qqo = function (requireAdultAccount, args, block, $super) {
    requireAdultAccount = requireAdultAccount === VOID ? false : requireAdultAccount;
    var tmp;
    if ($super === VOID) {
      this.pqo(requireAdultAccount, args, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.pqo.call(this, requireAdultAccount, args, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).rqo = function (contentEntryUid, clazzUid, cbUid) {
    var registrationUuid = uuid4();
    var activityId = this.qqn().loa().wnt_1 + 'ns/xapi/contentEntry/' + contentEntryUid.toString();
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(this.a57()).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var xxStringHasher = tmp.d58(tmp$ret$0, null);
    var tmp_1 = get_doorPrimaryKeyManager(this.uqn());
    var tmp1_xseUid = tmp_1.n62(400122);
    var tmp2_xseAccountPersonUid = this.sqn();
    var tmp0_elvis_lhs = this.qqn().uo9().onu_1.g96_1;
    var tmp3_xseAccountUsername = tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs;
    var tmp4_xseRootActivityUid = xxStringHasher.hm7(activityId);
    var tmp5_xseRegistrationHi = registrationUuid.vmd();
    var tmp6_xseRegistrationLo = registrationUuid.wmd();
    return new XapiSessionEntity(tmp1_xseUid, VOID, tmp5_xseRegistrationHi, tmp6_xseRegistrationLo, VOID, tmp2_xseAccountPersonUid, VOID, tmp3_xseAccountUsername, clazzUid, cbUid, contentEntryUid, VOID, activityId, tmp4_xseRootActivityUid);
  };
  protoOf(UstadViewModel).sqo = function (contentEntryUid, clazzUid, cbUid, $super) {
    contentEntryUid = contentEntryUid === VOID ? new Long(0, 0) : contentEntryUid;
    var tmp;
    if (clazzUid === VOID) {
      var tmp0_safe_receiver = this.aqn_1.ba('clazzUid');
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
      tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    } else {
      tmp = clazzUid;
    }
    clazzUid = tmp;
    var tmp_0;
    if (cbUid === VOID) {
      var tmp2_safe_receiver = this.aqn_1.ba('courseBlockUid');
      var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
      tmp_0 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    } else {
      tmp_0 = cbUid;
    }
    cbUid = tmp_0;
    return $super === VOID ? this.rqo(contentEntryUid, clazzUid, cbUid) : $super.rqo.call(this, contentEntryUid, clazzUid, cbUid);
  };
  function accountManager$factory() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.qqn();
    }, null);
  }
  function activeDataLayer$factory() {
    return getPropertyCallableRef('activeDataLayer', 1, KProperty1, function (receiver) {
      return receiver.tqn();
    }, null);
  }
  function activeDb$factory() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.uqn();
    }, null);
  }
  function navResultReturner$factory() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.xqn();
    }, null);
  }
  function json$factory_1() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.m4r();
    }, null);
  }
  function snackDispatcher$factory() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.yqn();
    }, null);
  }
  function resultReturner$factory() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.zqn();
    }, null);
  }
  function systemImpl$factory() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.aqo();
    }, null);
  }
  function accountManager$factory_0() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.qqn();
    }, null);
  }
  function activeDataLayer$factory_0() {
    return getPropertyCallableRef('activeDataLayer', 1, KProperty1, function (receiver) {
      return receiver.tqn();
    }, null);
  }
  function activeDb$factory_0() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.uqn();
    }, null);
  }
  function navResultReturner$factory_0() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.xqn();
    }, null);
  }
  function json$factory_2() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.m4r();
    }, null);
  }
  function snackDispatcher$factory_0() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.yqn();
    }, null);
  }
  function resultReturner$factory_0() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.zqn();
    }, null);
  }
  function systemImpl$factory_0() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.aqo();
    }, null);
  }
  function Companion_109() {
    this.dr4_1 = 'OpenLicenses';
  }
  var Companion_instance_158;
  function Companion_getInstance_126() {
    return Companion_instance_158;
  }
  function OpenLicensesViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'EpubContent');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.about.OpenLicensesViewModel.<anonymous>' call
        var tmp0_title = this.aqo().moj(strings_getInstance().snm_1);
        var nextValue = prevValue.mq6(VOID, VOID, tmp0_title, false, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda$lambda($credentialResult) {
    return function () {
      return 'Error occurred: ' + $credentialResult.er4_1;
    };
  }
  function _get_supportLangConfig__jc22wi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.br5_1;
    supportLangConfig$factory_0();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cr5_1;
    setLanguageUseCase$factory_0();
    return this_0.t2();
  }
  function _get_decodeUserHandleUseCase__wbsil7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dr5_1;
    decodeUserHandleUseCase$factory_0();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.er5_1;
    apiUrlConfig$factory_2();
    return this_0.t2();
  }
  function _get_impl__d88w17($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fr5_1;
    impl$factory_0();
    return this_0.t2();
  }
  function _get_getCredentialUseCase__qofq9r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hr5_1;
    getCredentialUseCase$factory_0();
    return this_0.t2();
  }
  function _get_parseCredentialUsernameUseCase__8m48wk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jr5_1;
    parseCredentialUsernameUseCase$factory_0();
    return this_0.t2();
  }
  function getCredentials($this) {
    var tmp = $this.rqn();
    launch(tmp, VOID, VOID, AddAccountSelectNewOrExistingViewModel$getCredentials$slambda_0($this, null));
  }
  function onLoginWithUsernameAndPasswordFromCredentialManager($this, credentialUsername, password) {
    var tmp = $this.rqn();
    launch(tmp, VOID, VOID, AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda_0($this, credentialUsername, password, null));
  }
  function goToNextDestAfterSignIn($this, person, serverUrl) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_0 = $this.a57();
    var context = new LearningSpace(serverUrl);
    var trigger = this_0.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.h57(tmp$ret$0, context);
    var tmp$ret$2 = On(this_0, tmp$ret$1, trigger);
    var tmp_1 = get_direct(tmp$ret$2).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetDefaultDestinationUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var getDefaultDestinationUseCase = tmp_1.d58(tmp$ret$3, null);
    Companion_getInstance_116();
    var tmp0_elvis_lhs = $this.aqn_1.ba('next');
    var nextDestVal = tmp0_elvis_lhs == null ? getDefaultDestinationUseCase.xpe() : tmp0_elvis_lhs;
    var tmp_3 = Napier_getInstance();
    tmp_3.k5e(VOID, VOID, AddAccountSelectNewOrExistingViewModel$goToNextDestAfterSignIn$lambda(nextDestVal));
    $this.mqu($this.cqn_1, appendSelectedAccount(nextDestVal, person.f96_1, new LearningSpace(serverUrl)), new UstadGoOptions(VOID, VOID, true));
  }
  function Companion_110() {
    this.kr5_1 = 'AddAccountSelectNewOrExisting';
  }
  var Companion_instance_159;
  function Companion_getInstance_127() {
    return Companion_instance_159;
  }
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this$0, resultContinuation) {
    this.tr5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.id_1 = 5;
            this.vr5_1 = _get_getCredentialUseCase__qofq9r(this.tr5_1);
            if (this.vr5_1 == null) {
              this.wr5_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.vr5_1.qpb(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.wr5_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.xr5_1 = this.wr5_1;
            var tmp_0 = this.xr5_1;
            if (tmp_0 instanceof PasskeyCredentialResult) {
              var tmp_1 = this;
              var tmp1_elvis_lhs = this.xr5_1.ir6_1.bpc_1.xpb_1;
              var tmp_2;
              if (tmp1_elvis_lhs == null) {
                throw IllegalStateException_init_$Create$('userHandle not found');
              } else {
                tmp_2 = tmp1_elvis_lhs;
              }
              tmp_1.yr5_1 = tmp_2;
              this.zr5_1 = _get_decodeUserHandleUseCase__wbsil7(this.tr5_1).up9(this.yr5_1);
              this.ar6_1 = this.zr5_1.y6();
              this.hd_1 = 3;
              suspendResult = this.tr5_1.qqn().toa(this.xr5_1.ir6_1, this.ar6_1.wnt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_3 = this.xr5_1;
              if (tmp_3 instanceof PasswordCredentialResult) {
                onLoginWithUsernameAndPasswordFromCredentialManager(this.tr5_1, this.xr5_1.gr6_1, this.xr5_1.hr6_1);
                this.hd_1 = 4;
                continue $sm;
              } else {
                var tmp_4 = this.xr5_1;
                if (tmp_4 instanceof Error_2) {
                  var tmp_5 = Napier_getInstance();
                  tmp_5.s5e(VOID, VOID, AddAccountSelectNewOrExistingViewModel$getCredentials$slambda$lambda(this.xr5_1));
                  l$ret$1: do {
                    var this_0 = this.tr5_1.ar5_1;
                    while (true) {
                      var prevValue = this_0.t2();
                      var nextValue = prevValue.fr6(VOID, VOID, VOID, this.xr5_1.er4_1);
                      if (this_0.y1k(prevValue, nextValue)) {
                        break l$ret$1;
                      }
                    }
                  }
                   while (false);
                  this.hd_1 = 4;
                  continue $sm;
                } else {
                  var tmp_6;
                  var tmp_7;
                  var tmp_8 = this.xr5_1;
                  if (tmp_8 instanceof NoCredentialAvailableResult) {
                    tmp_7 = true;
                  } else {
                    var tmp_9 = this.xr5_1;
                    tmp_7 = tmp_9 instanceof UserCanceledResult_0;
                  }
                  if (tmp_7) {
                    tmp_6 = true;
                  } else {
                    tmp_6 = this.xr5_1 == null;
                  }
                  if (tmp_6) {
                    this.hd_1 = 4;
                    continue $sm;
                  } else {
                    this.hd_1 = 4;
                    continue $sm;
                  }
                }
              }
            }

          case 3:
            var account = suspendResult;
            goToNextDestAfterSignIn(this.tr5_1, account.dkz(), this.ar6_1.wnt_1);
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.id_1 = 6;
            this.hd_1 = 7;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_10 = this.kd_1;
            if (tmp_10 instanceof Exception) {
              var e = this.kd_1;
              Napier_getInstance().q5e('AddAccountSelectNewOrExistingViewModel: getCredentials: Error occurred', e);
              this.hd_1 = 7;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            throw this.kd_1;
          case 7:
            this.id_1 = 6;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).v1m = function ($this$launch, completion) {
    var i = new AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this.tr5_1, completion);
    i.ur5_1 = $this$launch;
    return i;
  };
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda_0(this$0, resultContinuation) {
    var i = new AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda(this$0, $credentialUsername, $password, resultContinuation) {
    this.rr6_1 = this$0;
    this.sr6_1 = $credentialUsername;
    this.tr6_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.vr6_1 = null;
            this.wr6_1 = _get_parseCredentialUsernameUseCase__8m48wk(this.rr6_1).up9(this.sr6_1);
            this.xr6_1 = this.wr6_1.y6();
            this.yr6_1 = this.wr6_1.z6();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            var tmp_0 = this.rr6_1.qqn();
            var this_0 = this.yr6_1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.tr6_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            Companion_getInstance_116();
            var tmp1_safe_receiver = this.rr6_1.aqn_1.ba('maxDob');
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toLong_0(tmp1_safe_receiver);
            suspendResult = tmp_0.uoa(tmp_1, tmp_2, this.xr6_1.wnt_1, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.rr6_1.gr5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var account = suspendResult;
            var tmp_3 = this;
            goToNextDestAfterSignIn(this.rr6_1, account.dkz(), this.xr6_1.wnt_1);
            tmp_3.zr6_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof AdultAccountRequiredException) {
              var e = this.kd_1;
              var tmp_5 = this;
              this.vr6_1 = _get_impl__d88w17(this.rr6_1).moj(strings_getInstance().fnf_1);
              tmp_5.zr6_1 = Unit_instance;
              this.id_1 = 5;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_6 = this.kd_1;
              if (tmp_6 instanceof UnauthorizedException) {
                var e_0 = this.kd_1;
                var tmp_7 = this;
                this.vr6_1 = _get_impl__d88w17(this.rr6_1).moj(strings_getInstance().zmi_1);
                tmp_7.zr6_1 = Unit_instance;
                this.id_1 = 5;
                this.hd_1 = 6;
                continue $sm;
              } else {
                var tmp_8 = this.kd_1;
                if (tmp_8 instanceof ConsentNotGrantedException) {
                  var e_1 = this.kd_1;
                  var tmp_9 = this;
                  this.vr6_1 = _get_impl__d88w17(this.rr6_1).moj(strings_getInstance().enf_1);
                  tmp_9.zr6_1 = Unit_instance;
                  this.id_1 = 5;
                  this.hd_1 = 6;
                  continue $sm;
                } else {
                  var tmp_10 = this.kd_1;
                  if (tmp_10 instanceof Exception) {
                    var e_2 = this.kd_1;
                    var tmp_11 = this;
                    this.vr6_1 = _get_impl__d88w17(this.rr6_1).moj(strings_getInstance().amj_1);
                    tmp_11.zr6_1 = Unit_instance;
                    this.id_1 = 5;
                    this.hd_1 = 6;
                    continue $sm;
                  } else {
                    throw this.kd_1;
                  }
                }
              }
            }

          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.rr6_1.cqo(Companion_getInstance_97().uq6_1);
            if (!(this.vr6_1 == null)) {
              this.rr6_1.yqn().bq7(new Snack(toString(this.vr6_1)));
            }

            throw t;
          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            this.rr6_1.cqo(Companion_getInstance_97().uq6_1);
            if (!(this.vr6_1 == null)) {
              this.rr6_1.yqn().bq7(new Snack(toString(this.vr6_1)));
            }

            return Unit_instance;
        }
      } catch ($p) {
        var e_3 = $p;
        if (this.id_1 === 5) {
          throw e_3;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_3;
        }
      }
     while (true);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).v1m = function ($this$launch, completion) {
    var i = new AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda(this.rr6_1, this.sr6_1, this.tr6_1, completion);
    i.ur6_1 = $this$launch;
    return i;
  };
  function AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda_0(this$0, $credentialUsername, $password, resultContinuation) {
    var i = new AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda(this$0, $credentialUsername, $password, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddAccountSelectNewOrExistingViewModel$goToNextDestAfterSignIn$lambda($nextDestVal) {
    return function () {
      return 'AddAccountSelectNewOrExistingViewModel: go to next destination: ' + $nextDestVal;
    };
  }
  function AddAccountSelectNewOrExistingViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'AddAccountSelectNewOrExisting');
    this.ar5_1 = MutableStateFlow(new AddAccountSelectNewOrExistingUiState());
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.br5_1 = Instance(this, tmp$ret$0, null).a5d(this, supportLangConfig$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.cr5_1 = Instance(this, tmp$ret$2, null).a5d(this, setLanguageUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(DecodeUserHandleUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.dr5_1 = Instance(this, tmp$ret$4, null).a5d(this, decodeUserHandleUseCase$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.er5_1 = Instance(this, tmp$ret$6, null).a5d(this, apiUrlConfig$factory_1());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.fr5_1 = Instance(this, tmp$ret$8, null).a5d(this, impl$factory());
    var tmp_9 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_9.gr5_1 = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(GetCredentialUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.hr5_1 = InstanceOrNull(this, tmp$ret$10, null).a5d(this, getCredentialUseCase$factory());
    this.ir5_1 = asStateFlow(this.ar5_1);
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.jr5_1 = Instance(this, tmp$ret$12, null).a5d(this, parseCredentialUsernameUseCase$factory());
    this.eqn_1.x1k(new AppUiState(VOID, VOID, VOID, false, VOID, VOID, false, VOID, VOID, VOID, true));
    var allLanguages = _get_supportLangConfig__jc22wi(this).aq8(this.aqo());
    var currentLanguage = _get_supportLangConfig__jc22wi(this).zq7(this.aqo());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ar5_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.<anonymous>' call
        var nextValue = new AddAccountSelectNewOrExistingUiState(currentLanguage, allLanguages);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    getCredentials(this);
  }
  protoOf(AddAccountSelectNewOrExistingViewModel).ar7 = function () {
    this.br7(true);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).cr7 = function () {
    this.br7(false);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).br7 = function (isNewUser) {
    var tmp;
    if (isNewUser) {
      Companion_getInstance_213();
      tmp = 'new';
    } else {
      Companion_getInstance_213();
      tmp = 'existing';
    }
    var userType = tmp;
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.navigateUser.<anonymous>' call
    this.oqo(this_0, Companion_getInstance_213().kr7_1);
    Companion_getInstance_125();
    this.nqo(this_0, 'next');
    Companion_getInstance_213();
    this_0.s('newOrExisting', userType);
    var tmp0_safe_receiver = _get_apiUrlConfig__mldllg_0(this).yo5_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      Companion_getInstance_116();
      this_0.s('learningSpaceUrl', tmp0_safe_receiver);
    }
    var args = this_0.f3();
    var tmp_0;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    var this_1 = _get_apiUrlConfig__mldllg_0(this).yo5_1;
    // Inline function 'kotlin.contracts.contract' call
    if (!(this_1 == null ? true : charSequenceLength(this_1) === 0)) {
      var tmp_1;
      if (isNewUser) {
        tmp_1 = 'RegisterAgeRedirect';
      } else {
        tmp_1 = 'Login';
      }
      tmp_0 = tmp_1;
    } else {
      // Inline function 'kotlin.text.isNullOrEmpty' call
      var this_2 = _get_apiUrlConfig__mldllg_0(this).zo5_1;
      // Inline function 'kotlin.contracts.contract' call
      if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
        tmp_0 = 'LearningSpaceList';
      } else {
        tmp_0 = 'AddAccountSelectUserType';
      }
    }
    var destination = tmp_0;
    this.cqn_1.rp6(destination, args);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).mr7 = function (uiLanguage) {
    if (!uiLanguage.equals(this.ar5_1.t2().br6_1)) {
      var result = _get_setLanguageUseCase__st7nci(this).npi(uiLanguage, 'AddAccountSelectNewOrExisting', this.cqn_1);
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.ar5_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.onLanguageSelected.<anonymous>' call
          var nextValue = prevValue.fr6(uiLanguage, VOID, result.lpi_1);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  function AddAccountSelectNewOrExistingUiState(currentLanguage, languageList, showWaitForRestart, errorText) {
    currentLanguage = currentLanguage === VOID ? new UiLanguage('en', 'English') : currentLanguage;
    languageList = languageList === VOID ? listOf_0(currentLanguage) : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? false : showWaitForRestart;
    errorText = errorText === VOID ? null : errorText;
    this.br6_1 = currentLanguage;
    this.cr6_1 = languageList;
    this.dr6_1 = showWaitForRestart;
    this.er6_1 = errorText;
  }
  protoOf(AddAccountSelectNewOrExistingUiState).nr7 = function (currentLanguage, languageList, showWaitForRestart, errorText) {
    return new AddAccountSelectNewOrExistingUiState(currentLanguage, languageList, showWaitForRestart, errorText);
  };
  protoOf(AddAccountSelectNewOrExistingUiState).fr6 = function (currentLanguage, languageList, showWaitForRestart, errorText, $super) {
    currentLanguage = currentLanguage === VOID ? this.br6_1 : currentLanguage;
    languageList = languageList === VOID ? this.cr6_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.dr6_1 : showWaitForRestart;
    errorText = errorText === VOID ? this.er6_1 : errorText;
    return $super === VOID ? this.nr7(currentLanguage, languageList, showWaitForRestart, errorText) : $super.nr7.call(this, currentLanguage, languageList, showWaitForRestart, errorText);
  };
  protoOf(AddAccountSelectNewOrExistingUiState).toString = function () {
    return 'AddAccountSelectNewOrExistingUiState(currentLanguage=' + this.br6_1 + ', languageList=' + this.cr6_1 + ', showWaitForRestart=' + this.dr6_1 + ', errorText=' + this.er6_1 + ')';
  };
  protoOf(AddAccountSelectNewOrExistingUiState).hashCode = function () {
    var result = this.br6_1.hashCode();
    result = imul(result, 31) + hashCode(this.cr6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dr6_1) | 0;
    result = imul(result, 31) + (this.er6_1 == null ? 0 : getStringHashCode(this.er6_1)) | 0;
    return result;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AddAccountSelectNewOrExistingUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AddAccountSelectNewOrExistingUiState ? other : THROW_CCE();
    if (!this.br6_1.equals(tmp0_other_with_cast.br6_1))
      return false;
    if (!equals(this.cr6_1, tmp0_other_with_cast.cr6_1))
      return false;
    if (!(this.dr6_1 === tmp0_other_with_cast.dr6_1))
      return false;
    if (!(this.er6_1 == tmp0_other_with_cast.er6_1))
      return false;
    return true;
  };
  function supportLangConfig$factory() {
    return getPropertyCallableRef('supportLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportLangConfig__jc22wi(receiver);
    }, null);
  }
  function setLanguageUseCase$factory() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function decodeUserHandleUseCase$factory() {
    return getPropertyCallableRef('decodeUserHandleUseCase', 1, KProperty1, function (receiver) {
      return _get_decodeUserHandleUseCase__wbsil7(receiver);
    }, null);
  }
  function apiUrlConfig$factory_1() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function impl$factory() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function getCredentialUseCase$factory() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk(receiver);
    }, null);
  }
  function supportLangConfig$factory_0() {
    return getPropertyCallableRef('supportLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportLangConfig__jc22wi(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_0() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function decodeUserHandleUseCase$factory_0() {
    return getPropertyCallableRef('decodeUserHandleUseCase', 1, KProperty1, function (receiver) {
      return _get_decodeUserHandleUseCase__wbsil7(receiver);
    }, null);
  }
  function apiUrlConfig$factory_2() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function impl$factory_0() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function getCredentialUseCase$factory_0() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory_0() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk(receiver);
    }, null);
  }
  function _get_apiUrlConfig__mldllg_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jr8_1;
    apiUrlConfig$factory_4();
    return this_0.t2();
  }
  function Companion_111() {
    this.nr8_1 = 'AddAccountSelectUserType';
  }
  var Companion_instance_160;
  function Companion_getInstance_128() {
    return Companion_instance_160;
  }
  function AddAccountSelectNewOrExistingUserTypeViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'AddAccountSelectUserType');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.jr8_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_3());
    this.kr8_1 = MutableStateFlow(new AddAccountSelectNewOrExistingUserTypeUiState());
    var tmp_1 = this;
    Companion_getInstance_213();
    var tmp_2 = savedStateHandle.ba('newOrExisting');
    Companion_getInstance_213();
    tmp_1.lr8_1 = tmp_2 === 'new';
    this.mr8_1 = _get_apiUrlConfig__mldllg_1(this).zo5_1;
    var tmp_3;
    if (this.lr8_1) {
      tmp_3 = this.aqo().moj(strings_getInstance().anq_1);
    } else {
      tmp_3 = this.aqo().moj(strings_getInstance().bnq_1);
    }
    var tmp0_title = tmp_3;
    this.eqn_1.x1k(new AppUiState(VOID, VOID, tmp0_title, false, VOID, VOID, false, VOID, VOID, VOID, false));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.kr8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.<anonymous>' call
        var nextValue = prevValue.p6s(!(this.mr8_1 == null));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).pr8 = function () {
    return asStateFlow(this.kr8_1);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).qr8 = function () {
    var tmp;
    Companion_getInstance_213();
    var tmp_0 = this.aqn_1.ba('newOrExisting');
    Companion_getInstance_213();
    if (tmp_0 === 'new') {
      tmp = 'RegisterAgeRedirect';
    } else {
      tmp = 'Login';
    }
    var tmp_1 = tmp;
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.onClickPersonalAccount.<anonymous>' call
    this.oqo(this_0, Companion_getInstance_213().kr7_1);
    Companion_getInstance_213();
    this_0.s('personalAccount', 'true');
    Companion_getInstance_116();
    var tmp0_elvis_lhs = this.mr8_1;
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalStateException_init_$Create$('Personal account button should not have been there...');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    this_0.s('learningSpaceUrl', tmp_2);
    var tmp$ret$2 = this_0.f3();
    this.cqn_1.rp6(tmp_1, tmp$ret$2);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).rr8 = function () {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.onClickJoinLearningSpace.<anonymous>' call
    this.oqo(this_0, Companion_getInstance_213().kr7_1);
    var tmp$ret$2 = this_0.f3();
    this.cqn_1.rp6('LearningSpaceList', tmp$ret$2);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).sr8 = function () {
  };
  function AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount) {
    showAddPersonalAccount = showAddPersonalAccount === VOID ? false : showAddPersonalAccount;
    this.or8_1 = showAddPersonalAccount;
  }
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).p6s = function (showAddPersonalAccount) {
    return new AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).toString = function () {
    return 'AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount=' + this.or8_1 + ')';
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).hashCode = function () {
    return getBooleanHashCode(this.or8_1);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AddAccountSelectNewOrExistingUserTypeUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AddAccountSelectNewOrExistingUserTypeUiState ? other : THROW_CCE();
    if (!(this.or8_1 === tmp0_other_with_cast.or8_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_3() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function apiUrlConfig$factory_4() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function AccountListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.br9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda).any = function (it, $completion) {
    var tmp = this.bny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.any(p1 instanceof UserSessionWithPersonAndLearningSpace ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.br9_1.era_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.sra(this.cr9_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda).bny = function (it, completion) {
    var i = new AccountListViewModel$slambda$slambda(this.br9_1, completion);
    i.cr9_1 = it;
    return i;
  };
  function AccountListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.any(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.brb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda$slambda).drb = function (accountList, $completion) {
    var tmp = this.erb(accountList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.drb((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var currentUserSessionUid = this.brb_1.qqn().uo9().nnu_1.rij_1;
          var this_0 = this.crb_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_0.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            var isFilteredOutActiveAccount = this.brb_1.ara_1 === 'header' ? element.nnu_1.rij_1.equals(currentUserSessionUid) : false;
            var isFilteredOutByEndpoint = !(this.brb_1.zr9_1 == null) ? !(element.pnu_1.wnt_1 === this.brb_1.zr9_1) : false;
            var isFilteredOutByDateOfBirth = this.brb_1.bra_1.c7(new Long(0, 0)) > 0 ? element.onu_1.o96_1.c7(this.brb_1.bra_1) > 0 : false;
            if (!(((isFilteredOutActiveAccount ? true : isFilteredOutByEndpoint) ? true : isFilteredOutByDateOfBirth) ? true : isTemporary(element.nnu_1))) {
              destination.i1(element);
            }
          }
          var accountsToDisplay = destination;
          l$ret$1: do {
            var this_1 = this.brb_1.era_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.sra(VOID, accountsToDisplay);
              if (this_1.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).erb = function (accountList, completion) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this.brb_1, completion);
    i.crb_1 = accountList;
    return i;
  };
  function AccountListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (accountList, $completion) {
      return i.drb(accountList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.nrb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(AccountListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.nrb_1.qqn().koa();
            var tmp_1 = AccountListViewModel$slambda$slambda$slambda_0(this.nrb_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_5(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda_1).l78 = function (completion) {
    return new AccountListViewModel$slambda$slambda_1(this.nrb_1, completion);
  };
  function AccountListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function AccountListViewModel$onClickLogout$slambda$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function AccountListViewModel$onClickLogout$slambda$lambda_0(this$0) {
    return function (it) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var this_0 = this$0.a57();
      var trigger = this_0.d57();
      // Inline function 'org.kodein.di.diContext' call
      var tmp = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
      var tmp$ret$1 = tmp.h57(tmp$ret$0, it);
      var tmp$ret$2 = On(this_0, tmp$ret$1, trigger);
      var tmp_1 = get_direct(tmp$ret$2).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_2 = typeToken(createKType(getKClass(CheckRegistrationAllowedUseCase), arrayOf([]), false));
      var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
      return tmp_1.d58(tmp$ret$3, null);
    };
  }
  function _get_apiUrlConfig__mldllg_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cra_1;
    apiUrlConfig$factory_6();
    return this_0.t2();
  }
  function _get_shareAppUseCase__louoas($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dra_1;
    shareAppUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gra_1;
    getVersionUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchOpenLicensesUseCase__f5qz1z($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hra_1;
    launchOpenLicensesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ira_1;
    getShowPoweredByUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_112() {
    this.orb_1 = 'AccountList';
    this.prb_1 = 'filterByLearningSpace';
    this.qrb_1 = 'activeAccountMode';
    this.rrb_1 = 'header';
    this.srb_1 = 'inlist';
  }
  var Companion_instance_161;
  function Companion_getInstance_129() {
    return Companion_instance_161;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_5(function_0) {
    this.trb_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_5).t1d = function (value, $completion) {
    return this.trb_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(function_0) {
    this.urb_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0).cpj = function (url, target) {
    return this.urb_1(url, target);
  };
  function AccountListViewModel$slambda(this$0, resultContinuation) {
    this.drc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.drc_1.qqn().ioa();
            var tmp_1 = AccountListViewModel$slambda$slambda_0(this.drc_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_5(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$slambda(this.drc_1, completion);
    i.erc_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda_1(this$0, resultContinuation) {
    this.nrc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.nrc_1.era_1, AccountListViewModel$slambda$slambda_2(this.nrc_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$slambda_1(this.nrc_1, completion);
    i.orc_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickLogout$slambda(this$0, $currentSession, resultContinuation) {
    this.xrc_1 = this$0;
    this.yrc_1 = $currentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickLogout$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.xrc_1.qqn().soa(this.yrc_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_$receiver = this.xrc_1.cqn_1;
            Companion_getInstance_140();
            var tmp1_link = 'CourseListHome';
            var tmp2_accountManager = this.xrc_1.qqn();
            var tmp_0 = AccountListViewModel$onClickLogout$slambda$lambda;
            var tmp3_openExternalLinkUseCase = new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(tmp_0);
            var tmp4_userCanSelectServer = _get_apiUrlConfig__mldllg_2(this.xrc_1).ao6_1;
            var tmp5_goOptions = new UstadGoOptions(VOID, VOID, true);
            var tmp6_presetLearningSpaceUrl = _get_apiUrlConfig__mldllg_2(this.xrc_1).yo5_1;
            navigateToLink(tmp0_$receiver, tmp1_link, tmp2_accountManager, tmp3_openExternalLinkUseCase, tmp5_goOptions, VOID, tmp4_userCanSelectServer, VOID, VOID, VOID, VOID, tmp6_presetLearningSpaceUrl, AccountListViewModel$onClickLogout$slambda$lambda_0(this.xrc_1));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickLogout$slambda(this.xrc_1, this.yrc_1, completion);
    i.zrc_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickLogout$slambda_0(this$0, $currentSession, resultContinuation) {
    var i = new AccountListViewModel$onClickLogout$slambda(this$0, $currentSession, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickAddAccount$slambda(this$0, $args, resultContinuation) {
    this.ird_1 = this$0;
    this.jrd_1 = $args;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickAddAccount$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickAddAccount$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickAddAccount$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (!(this.ird_1.jra_1 == null)) {
              this.hd_1 = 1;
              suspendResult = this.ird_1.jra_1.v7e().lhn(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.lrd_1 = false;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var tmp0_safe_receiver = suspendResult;
            var ARGUMENT = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xhn_1;
            this.lrd_1 = ARGUMENT === false;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.lrd_1) {
              var this_0 = LinkedHashMap_init_$Create$();
              this.ird_1.oqo(this_0, Companion_getInstance_213().kr7_1);
              Companion_getInstance_213();
              this_0.s('newOrExisting', 'existing');
              Companion_getInstance_116();
              this_0.s('learningSpaceUrl', toString_0(_get_apiUrlConfig__mldllg_2(this.ird_1).yo5_1));
              var arg = this_0.f3();
              this.ird_1.cqn_1.rp6('Login', arg);
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.ird_1.cqn_1.rp6('AddAccountSelectNewOrExisting', this.jrd_1);
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickAddAccount$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickAddAccount$slambda(this.ird_1, this.jrd_1, completion);
    i.krd_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickAddAccount$slambda_0(this$0, $args, resultContinuation) {
    var i = new AccountListViewModel$onClickAddAccount$slambda(this$0, $args, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickDeleteAccount$slambda(this$0, $session, resultContinuation) {
    this.urd_1 = this$0;
    this.vrd_1 = $session;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.urd_1.qqn().soa(this.vrd_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickDeleteAccount$slambda(this.urd_1, this.vrd_1, completion);
    i.wrd_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickDeleteAccount$slambda_0(this$0, $session, resultContinuation) {
    var i = new AccountListViewModel$onClickDeleteAccount$slambda(this$0, $session, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickOpenLicenses$slambda($launchUseCaseVal, resultContinuation) {
    this.fre_1 = $launchUseCaseVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.fre_1.j87(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickOpenLicenses$slambda(this.fre_1, completion);
    i.gre_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickOpenLicenses$slambda_0($launchUseCaseVal, resultContinuation) {
    var i = new AccountListViewModel$onClickOpenLicenses$slambda($launchUseCaseVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel(di, savedStateHandle, startUserSessionUseCase) {
    var tmp;
    if (startUserSessionUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.d58(tmp$ret$0, null);
      tmp = new StartUserSessionUseCase(tmp$ret$1);
    } else {
      tmp = startUserSessionUseCase;
    }
    startUserSessionUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'AccountList');
    this.yr9_1 = startUserSessionUseCase;
    this.zr9_1 = savedStateHandle.ba('filterByLearningSpace');
    var tmp_2 = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('activeAccountMode');
    tmp_2.ara_1 = tmp0_elvis_lhs == null ? 'header' : tmp0_elvis_lhs;
    var tmp_3 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('maxDob');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.bra_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.cra_1 = Instance(this, tmp$ret$2, null).a5d(this, apiUrlConfig$factory_5());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(ShareAppUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.dra_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, shareAppUseCase$factory());
    this.era_1 = MutableStateFlow(new AccountListUiState(VOID, VOID, _get_apiUrlConfig__mldllg_2(this).ao6_1, VOID, VOID, !(_get_shareAppUseCase__louoas(this) == null)));
    this.fra_1 = asStateFlow(this.era_1);
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_8.gra_1 = InstanceOrNull(this, tmp$ret$6, null).a5d(this, getVersionUseCase$factory());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(LaunchOpenLicensesUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.hra_1 = InstanceOrNull(this, tmp$ret$8, null).a5d(this, launchOpenLicensesUseCase$factory());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(GetShowPoweredByUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.ira_1 = InstanceOrNull(this, tmp$ret$10, null).a5d(this, getShowPoweredByUseCase$factory());
    var tmp_14 = this;
    var tmp0_safe_receiver_0 = _get_apiUrlConfig__mldllg_2(this).yo5_1;
    var tmp_15;
    if (tmp0_safe_receiver_0 == null) {
      tmp_15 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.presetRepo.<anonymous>' call
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var context = new LearningSpace(tmp0_safe_receiver_0);
      var trigger = di.d57();
      // Inline function 'org.kodein.di.diContext' call
      var tmp_16 = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_17 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$12 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
      var tmp$ret$13 = tmp_16.h57(tmp$ret$12, context);
      var tmp$ret$14 = On(di, tmp$ret$13, trigger);
      var tmp_18 = get_direct(tmp$ret$14).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_19 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
      var tmp$ret$15 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
      tmp_15 = tmp_18.d58(tmp$ret$15, null).tk2_1;
    }
    tmp_14.jra_1 = tmp_15;
    var tmp_20 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : toBoolean(tmp0_safe_receiver_1);
    tmp_20.kra_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_21;
    if (savedStateHandle.ba('listMode') === ListViewMode_PICKER_getInstance().zqj_1) {
      tmp_21 = this.aqo().moj(strings_getInstance().qna_1);
    } else {
      tmp_21 = this.aqo().moj(strings_getInstance().xml_1);
    }
    var tmp0_title = tmp_21;
    this.eqn_1.x1k(new AppUiState(VOID, VOID, tmp0_title, false, VOID, VOID, false));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.era_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.<anonymous>' call
        var tmp0_safe_receiver_2 = _get_getVersionUseCase__n7x57g(this);
        var tmp1_safe_receiver = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.xpe();
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vpe_1;
        var tmp_22 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
        var tmp3_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e(this);
        var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.xpe();
        var nextValue = prevValue.sra(VOID, VOID, VOID, tmp_22, tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'kotlin.takeIf' call
    var this_1 = this.rqn();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_23;
    // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.<anonymous>' call
    if (this.ara_1 === 'header') {
      tmp_23 = this_1;
    } else {
      tmp_23 = null;
    }
    var tmp1_safe_receiver_0 = tmp_23;
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      launch(tmp1_safe_receiver_0, VOID, VOID, AccountListViewModel$slambda_0(this, null));
    }
    var tmp_24 = this.rqn();
    launch(tmp_24, VOID, VOID, AccountListViewModel$slambda_2(this, null));
  }
  protoOf(AccountListViewModel).hre = function () {
    var tmp0_elvis_lhs = this.era_1.t2().lra_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var currentSession = tmp;
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, AccountListViewModel$onClickLogout$slambda_0(this, currentSession, null));
  };
  protoOf(AccountListViewModel).ire = function () {
    var tmp0_safe_receiver = this.era_1.t2().lra_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.onu_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f96_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var personUid = tmp;
    Companion_getInstance_125();
    this.cqn_1.rp6('PersonDetailView', mapOf_0(to('entityUid', personUid.toString())));
  };
  protoOf(AccountListViewModel).jre = function () {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.onClickAddAccount.<anonymous>' call
    if (!(this.zr9_1 == null)) {
      Companion_getInstance_125();
      this_0.s('serverUrl', this.zr9_1);
    }
    Companion_getInstance_125();
    Companion_getInstance_125();
    this.oqo(this_0, listOf(['next', 'noSessionChange']));
    Companion_getInstance_125();
    Companion_getInstance_125();
    var tmp0_elvis_lhs = this.aqn_1.ba('maxDob');
    this_0.s('maxDob', tmp0_elvis_lhs == null ? '0' : tmp0_elvis_lhs);
    var args = this_0.f3();
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickAddAccount$slambda_0(this, args, null));
  };
  protoOf(AccountListViewModel).kre = function (sessionWithPersonAndLearningSpace) {
    var tmp;
    if (sessionWithPersonAndLearningSpace.onu_1.n96_1) {
      Companion_getInstance_169();
      tmp = 'ContentEntryListHome';
    } else {
      Companion_getInstance_140();
      tmp = 'CourseListHome';
    }
    var viewName = tmp;
    var tmp1_$this = this.yr9_1;
    var tmp2_navController = this.cqn_1;
    Companion_getInstance_125();
    var tmp0_elvis_lhs = this.aqn_1.ba('next');
    var tmp3_nextDest = tmp0_elvis_lhs == null ? viewName : tmp0_elvis_lhs;
    var tmp4_dontSetCurrentSession = this.kra_1;
    tmp1_$this.npo(sessionWithPersonAndLearningSpace, tmp3_nextDest, tmp2_navController, VOID, tmp4_dontSetCurrentSession);
  };
  protoOf(AccountListViewModel).lre = function (session) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickDeleteAccount$slambda_0(this, session, null));
  };
  protoOf(AccountListViewModel).mre = function () {
    var launchUseCaseVal = _get_launchOpenLicensesUseCase__f5qz1z(this);
    if (!(launchUseCaseVal == null)) {
      var tmp = this.rqn();
      launch(tmp, VOID, VOID, AccountListViewModel$onClickOpenLicenses$slambda_0(launchUseCaseVal, null));
    } else {
      this.cqn_1.rp6('OpenLicenses', emptyMap());
    }
  };
  function AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    headerAccount = headerAccount === VOID ? null : headerAccount;
    accountsList = accountsList === VOID ? emptyList() : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? false : showAccountEndpoint;
    version = version === VOID ? '' : version;
    showPoweredBy = showPoweredBy === VOID ? false : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? false : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? false : shareAppBottomSheetVisible;
    this.lra_1 = headerAccount;
    this.mra_1 = accountsList;
    this.nra_1 = showAccountEndpoint;
    this.ora_1 = version;
    this.pra_1 = showPoweredBy;
    this.qra_1 = shareAppOptionVisible;
    this.rra_1 = shareAppBottomSheetVisible;
  }
  protoOf(AccountListUiState).nre = function () {
    return !(this.lra_1 == null) ? !this.lra_1.onu_1.f96_1.equals(new Long(0, 0)) : false;
  };
  protoOf(AccountListUiState).ore = function () {
    return !(this.lra_1 == null) ? !isGuestUser(this.lra_1.onu_1) : false;
  };
  protoOf(AccountListUiState).pre = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    return new AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).sra = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible, $super) {
    headerAccount = headerAccount === VOID ? this.lra_1 : headerAccount;
    accountsList = accountsList === VOID ? this.mra_1 : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? this.nra_1 : showAccountEndpoint;
    version = version === VOID ? this.ora_1 : version;
    showPoweredBy = showPoweredBy === VOID ? this.pra_1 : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? this.qra_1 : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? this.rra_1 : shareAppBottomSheetVisible;
    return $super === VOID ? this.pre(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) : $super.pre.call(this, headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).toString = function () {
    return 'AccountListUiState(headerAccount=' + this.lra_1 + ', accountsList=' + this.mra_1 + ', showAccountEndpoint=' + this.nra_1 + ', version=' + this.ora_1 + ', showPoweredBy=' + this.pra_1 + ', shareAppOptionVisible=' + this.qra_1 + ', shareAppBottomSheetVisible=' + this.rra_1 + ')';
  };
  protoOf(AccountListUiState).hashCode = function () {
    var result = this.lra_1 == null ? 0 : this.lra_1.hashCode();
    result = imul(result, 31) + hashCode(this.mra_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nra_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ora_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pra_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qra_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rra_1) | 0;
    return result;
  };
  protoOf(AccountListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AccountListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AccountListUiState ? other : THROW_CCE();
    if (!equals(this.lra_1, tmp0_other_with_cast.lra_1))
      return false;
    if (!equals(this.mra_1, tmp0_other_with_cast.mra_1))
      return false;
    if (!(this.nra_1 === tmp0_other_with_cast.nra_1))
      return false;
    if (!(this.ora_1 === tmp0_other_with_cast.ora_1))
      return false;
    if (!(this.pra_1 === tmp0_other_with_cast.pra_1))
      return false;
    if (!(this.qra_1 === tmp0_other_with_cast.qra_1))
      return false;
    if (!(this.rra_1 === tmp0_other_with_cast.rra_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_5() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(receiver);
    }, null);
  }
  function shareAppUseCase$factory() {
    return getPropertyCallableRef('shareAppUseCase', 1, KProperty1, function (receiver) {
      return _get_shareAppUseCase__louoas(receiver);
    }, null);
  }
  function getVersionUseCase$factory() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g(receiver);
    }, null);
  }
  function launchOpenLicensesUseCase$factory() {
    return getPropertyCallableRef('launchOpenLicensesUseCase', 1, KProperty1, function (receiver) {
      return _get_launchOpenLicensesUseCase__f5qz1z(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e(receiver);
    }, null);
  }
  function apiUrlConfig$factory_6() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(receiver);
    }, null);
  }
  function shareAppUseCase$factory_0() {
    return getPropertyCallableRef('shareAppUseCase', 1, KProperty1, function (receiver) {
      return _get_shareAppUseCase__louoas(receiver);
    }, null);
  }
  function getVersionUseCase$factory_0() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g(receiver);
    }, null);
  }
  function launchOpenLicensesUseCase$factory_0() {
    return getPropertyCallableRef('launchOpenLicensesUseCase', 1, KProperty1, function (receiver) {
      return _get_launchOpenLicensesUseCase__f5qz1z(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_0() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e(receiver);
    }, null);
  }
  function launchSetTitleFromClazzUid(_this__u8e3s4, clazzUid, updateUi) {
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(_this__u8e3s4.a57());
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var dataLayer$delegate = Instance(this_0, tmp$ret$0, null).a5d(null, getLocalDelegateReference('dataLayer', KProperty0, false, function () {
      return THROW_ISE();
    }));
    // Inline function 'kotlin.takeIf' call
    var this_1 = _this__u8e3s4.rqn();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.launchSetTitleFromClazzUid.<anonymous>' call
    if (!clazzUid.equals(new Long(0, 0))) {
      tmp_0 = this_1;
    } else {
      tmp_0 = null;
    }
    var tmp0_safe_receiver = tmp_0;
    if (tmp0_safe_receiver == null)
      null;
    else {
      launch(tmp0_safe_receiver, VOID, VOID, launchSetTitleFromClazzUid$slambda_0(clazzUid, dataLayer$delegate, updateUi, null));
    }
  }
  function launchSetTitleFromClazzUid$lambda($dataLayer$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('dataLayer', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $dataLayer$delegate.t2();
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_6(function_0) {
    this.qre_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_6).t1d = function (value, $completion) {
    return this.qre_1(value, $completion);
  };
  function launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation) {
    this.zre_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).brf = function (it, $completion) {
    var tmp = this.crf(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).he = function (p1, $completion) {
    return this.brf((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          this.zre_1(this.arf_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).crf = function (it, completion) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda(this.zre_1, completion);
    i.arf_1 = it;
    return i;
  };
  function launchSetTitleFromClazzUid$slambda$slambda_0($updateUi, resultContinuation) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation);
    var l = function (it, $completion) {
      return i.brf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function launchSetTitleFromClazzUid$slambda($clazzUid, $dataLayer$delegate, $updateUi, resultContinuation) {
    this.lrf_1 = $clazzUid;
    this.mrf_1 = $dataLayer$delegate;
    this.nrf_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(launchSetTitleFromClazzUid$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(launchSetTitleFromClazzUid$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = launchSetTitleFromClazzUid$lambda(this.mrf_1).wk2().o7d().z8c(this.lrf_1);
            var tmp_1 = launchSetTitleFromClazzUid$slambda$slambda_0(this.nrf_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_6(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(launchSetTitleFromClazzUid$slambda).v1m = function ($this$launch, completion) {
    var i = new launchSetTitleFromClazzUid$slambda(this.lrf_1, this.mrf_1, this.nrf_1, completion);
    i.orf_1 = $this$launch;
    return i;
  };
  function launchSetTitleFromClazzUid$slambda_0($clazzUid, $dataLayer$delegate, $updateUi, resultContinuation) {
    var i = new launchSetTitleFromClazzUid$slambda($clazzUid, $dataLayer$delegate, $updateUi, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function parseAndUpdateTerminologyStringsIfNeeded(currentTerminologyStrings, terminology, systemImpl, json, onUpdate) {
    var tmp = currentTerminologyStrings == null ? null : currentTerminologyStrings.nq8_1;
    if (!equals(tmp, terminology == null ? null : terminology.p8g_1)) {
      var tmp_0;
      if (terminology == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.parseAndUpdateTerminologyStringsIfNeeded.<anonymous>' call
        tmp_0 = CourseTerminologyStrings_init_$Create$(terminology, systemImpl, json);
      }
      var courseTerminologyStrings = tmp_0;
      onUpdate(courseTerminologyStrings);
    }
  }
  function collectClazzNameAndUpdateTitle(clazzUid, activeDb, appUiState, $completion) {
    var tmp = activeDb.o7d().z8c(clazzUid);
    var tmp_0 = collectClazzNameAndUpdateTitle$slambda_0(appUiState, null);
    return tmp.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_7(tmp_0), $completion);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_7(function_0) {
    this.prf_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_7).t1d = function (value, $completion) {
    return this.prf_1(value, $completion);
  };
  function collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation) {
    this.yrf_1 = $appUiState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectClazzNameAndUpdateTitle$slambda).brf = function (clazzTitle, $completion) {
    var tmp = this.crf(clazzTitle, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).he = function (p1, $completion) {
    return this.brf((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.yrf_1;
          var tmp_0;
          if (!(this.yrf_1.t2().zq5_1 == this.zrf_1)) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver = tmp_0;
          if (tmp0_safe_receiver == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver.t2();
                var nextValue = prevValue.mq6(VOID, VOID, this.zrf_1);
                if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).crf = function (clazzTitle, completion) {
    var i = new collectClazzNameAndUpdateTitle$slambda(this.yrf_1, completion);
    i.zrf_1 = clazzTitle;
    return i;
  };
  function collectClazzNameAndUpdateTitle$slambda_0($appUiState, resultContinuation) {
    var i = new collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation);
    var l = function (clazzTitle, $completion) {
      return i.brf(clazzTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function get_blockTypeStringResource(_this__u8e3s4) {
    var tmp0_subject = _this__u8e3s4.u7x_1;
    var tmp;
    if (tmp0_subject === 102) {
      tmp = strings_getInstance().sn2_1;
    } else {
      if (tmp0_subject === 104) {
        tmp = strings_getInstance().fn4_1;
      } else {
        if (tmp0_subject === 100) {
          tmp = strings_getInstance().inh_1;
        } else {
          if (tmp0_subject === 103) {
            tmp = strings_getInstance().sn3_1;
          } else {
            if (tmp0_subject === 105) {
              tmp = strings_getInstance().nnh_1;
            } else {
              tmp = strings_getInstance().hmi_1;
            }
          }
        }
      }
    }
    return tmp;
  }
  function CoursePermissionConstants() {
    CoursePermissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().lnn_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1, 0));
    var tmp_2 = strings_getInstance().rnn_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().inj_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(2, 0));
    var tmp_6 = strings_getInstance().mnn_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(4, 0));
    var tmp_8 = strings_getInstance().nnn_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(8, 0));
    var tmp_10 = strings_getInstance().onn_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(16, 0));
    var tmp_12 = strings_getInstance().dn2_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(32, 0));
    var tmp_14 = strings_getInstance().fn2_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(64, 0));
    var tmp_16 = strings_getInstance().pnn_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(128, 0));
    var tmp_18 = strings_getInstance().qnn_1;
    PermissionFlags_getInstance();
    tmp.arg_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, to(tmp_18, new Long(256, 0))]);
  }
  var CoursePermissionConstants_instance;
  function CoursePermissionConstants_getInstance() {
    if (CoursePermissionConstants_instance == null)
      new CoursePermissionConstants();
    return CoursePermissionConstants_instance;
  }
  function getTitleForCoursePermission(_this__u8e3s4, entity, $completion) {
    var tmp = new $getTitleForCoursePermissionCOROUTINE$61(_this__u8e3s4, entity, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function titleStringResource(_this__u8e3s4) {
    var tmp0_subject = _this__u8e3s4.cdl_1;
    var tmp;
    if (tmp0_subject === 1000) {
      tmp = strings_getInstance().sml_1;
    } else {
      if (tmp0_subject === 1001) {
        tmp = strings_getInstance().umy_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function getTitleForCoursePermission$slambda($entity, resultContinuation) {
    this.wrg_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda).yrg = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda).he = function (p1, $completion) {
    return this.yrg(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(getTitleForCoursePermission$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.xrg_1.q7d().ge7(this.wrg_1.bdl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(getTitleForCoursePermission$slambda).yny = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda(this.wrg_1, completion);
    i.xrg_1 = it;
    return i;
  };
  function getTitleForCoursePermission$slambda_0($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.yrg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function getTitleForCoursePermission$slambda_1($entity, resultContinuation) {
    this.hrh_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda_1).jrh = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda_1).he = function (p1, $completion) {
    return this.jrh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(getTitleForCoursePermission$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.irh_1.n7d();
            var tmp0_safe_receiver = this.hrh_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ddl_1;
            suspendResult = tmp_0.mg4(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp2_safe_receiver = suspendResult;
            return tmp2_safe_receiver == null ? null : personFullName(tmp2_safe_receiver);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(getTitleForCoursePermission$slambda_1).yny = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda_1(this.hrh_1, completion);
    i.irh_1 = it;
    return i;
  };
  function getTitleForCoursePermission$slambda_2($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda_1($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.jrh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $getTitleForCoursePermissionCOROUTINE$61(_this__u8e3s4, entity, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jrg_1 = _this__u8e3s4;
    this.krg_1 = entity;
  }
  protoOf($getTitleForCoursePermissionCOROUTINE$61).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = get_direct(this.jrg_1.a57()).f58();
            var tmp_2 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
            tmp_0.lrg_1 = tmp_1.d58(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            var tmp0_safe_receiver = this.krg_1;
            tmp_3.mrg_1 = tmp0_safe_receiver == null ? null : titleStringResource(tmp0_safe_receiver);
            if (!(this.mrg_1 == null)) {
              this.hd_1 = 2;
              var tmp_4 = this.jrg_1.wqn();
              suspendResult = localFirstThenRepoIfNull(tmp_4, getTitleForCoursePermission$slambda_0(this.krg_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_5 = this.jrg_1.wqn();
              suspendResult = localFirstThenRepoIfNull(tmp_5, getTitleForCoursePermission$slambda_2(this.krg_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp5_elvis_lhs = suspendResult;
            this.nrg_1 = tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            var terminology = suspendResult;
            var tmp2_elvis_lhs = terminology == null ? null : toTerminologyEntries(terminology, this.lrg_1, this.jrg_1.aqo());
            var terminologyEntries = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = terminologyEntries.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.qq8_1.equals(this.mrg_1)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp3_safe_receiver = tmp$ret$0;
            var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.rq8_1;
            tmp_6.nrg_1 = tmp4_elvis_lhs == null ? this.jrg_1.aqo().moj(this.mrg_1) : tmp4_elvis_lhs;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.nrg_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function defaultCourseBannerImageIndex(courseName) {
    // Inline function 'kotlin.mod' call
    var r = avatarColorForName(courseName == null ? '' : courseName) % 5 | 0;
    return r + (5 & ((r ^ 5) & (r | (-r | 0))) >> 31) | 0;
  }
  function ClazzDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.srh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).urh = function (it, $completion) {
    var tmp = this.vrh(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.urh((p1 == null ? true : p1 instanceof ClazzAndDetailPermissions) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_safe_receiver = this.trh_1;
          var clazz = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z8j_1;
          var tmp_0;
          if (clazz == null) {
            tmp_0 = emptyList();
          } else {
            var tmp_1;
            var tmp_2 = clazz.b8e_1;
            Companion_getInstance_4();
            if (hasFlag_0(tmp_2, new Long(1, 0))) {
              tmp_1 = this.trh_1.a8k_1;
            } else {
              tmp_1 = false;
            }
            tmp_0 = createTabList(this.srh_1, tmp_1, this.trh_1.b8k_1, this.trh_1.c8k_1);
          }
          var tabList = tmp_0;
          l$ret$1: do {
            var this_0 = this.srh_1.sri_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vri(tabList);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).vrh = function (it, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this.srh_1, completion);
    i.trh_1 = it;
    return i;
  };
  function ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.urh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.erj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.erj_1.uqn().o7d().x8c(this.erj_1.sqn(), this.erj_1.uqm_1);
            var tmp_1 = ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this.erj_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda(this.erj_1, completion);
    i.frj_1 = $this$launch;
    return i;
  };
  function ClazzDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.orj_1 = $this_launch;
    this.prj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.orj_1, VOID, VOID, ClazzDetailViewModel$slambda$slambda$slambda_0(this.prj_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new ClazzDetailViewModel$slambda$slambda(this.orj_1, this.prj_1, completion);
  };
  function ClazzDetailViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function createTabList($this, showAttendance, showMembers, showProgressReport) {
    Companion_getInstance_116();
    var tabs = mutableListOf([new TabItem('CourseDetailOverviewView', mapOf_0(to('entityUid', $this.uqm_1.toString())), $this.aqo().moj(strings_getInstance().uni_1))]);
    if (showMembers) {
      Companion_getInstance_116();
      tabs.i1(new TabItem('CourseMembers', mapOf_0(to('clazzUid', $this.uqm_1.toString())), capitalizeFirstLetter($this.aqo().moj(strings_getInstance().kn1_1))));
    }
    if (showProgressReport) {
      Companion_getInstance_116();
      tabs.i1(new TabItem('Gradebook', mapOf_0(to('clazzUid', $this.uqm_1.toString())), $this.aqo().moj(strings_getInstance().knp_1)));
    }
    if (showAttendance) {
      Companion_getInstance_116();
      tabs.i1(new TabItem('CourseLogListAttendanceView', mapOf_0(to('clazzUid', $this.uqm_1.toString())), $this.aqo().moj(strings_getInstance().lml_1)));
    }
    Companion_getInstance_116();
    tabs.i1(new TabItem('CourseGroups', mapOf_0(to('clazzUid', $this.uqm_1.toString())), $this.aqo().moj(strings_getInstance().un0_1)));
    return toList(tabs);
  }
  function Companion_113() {
    this.qrj_1 = 'Course';
  }
  var Companion_instance_162;
  function Companion_getInstance_130() {
    return Companion_instance_162;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_8(function_0) {
    this.rrj_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_8).t1d = function (value, $completion) {
    return this.rrj_1(value, $completion);
  };
  function ClazzDetailViewModel$slambda(this$0, resultContinuation) {
    this.ark_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.ark_1.sri_1, ClazzDetailViewModel$slambda$slambda_0(this.brk_1, this.ark_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailViewModel$slambda(this.ark_1, completion);
    i.brk_1 = $this$launch;
    return i;
  };
  function ClazzDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'Course');
    this.sri_1 = MutableStateFlow(new ClazzDetailUiState());
    this.tri_1 = asStateFlow(this.sri_1);
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzDetailViewModel$slambda_0(this, null));
  }
  function ClazzDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.uri_1 = tabs;
  }
  protoOf(ClazzDetailUiState).vri = function (tabs) {
    return new ClazzDetailUiState(tabs);
  };
  protoOf(ClazzDetailUiState).toString = function () {
    return 'ClazzDetailUiState(tabs=' + this.uri_1 + ')';
  };
  protoOf(ClazzDetailUiState).hashCode = function () {
    return hashCode(this.uri_1);
  };
  protoOf(ClazzDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzDetailUiState ? other : THROW_CCE();
    if (!equals(this.uri_1, tmp0_other_with_cast.uri_1))
      return false;
    return true;
  };
  var ClazzAction_EDIT_instance;
  var ClazzAction_COPY_instance;
  function valueOf_0(value) {
    switch (value) {
      case 'EDIT':
        return ClazzAction_EDIT_getInstance();
      case 'COPY':
        return ClazzAction_COPY_getInstance();
      default:
        ClazzAction_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  var ClazzAction_entriesInitialized;
  function ClazzAction_initEntries() {
    if (ClazzAction_entriesInitialized)
      return Unit_instance;
    ClazzAction_entriesInitialized = true;
    ClazzAction_EDIT_instance = new ClazzAction('EDIT', 0);
    ClazzAction_COPY_instance = new ClazzAction('COPY', 1);
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.krk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).lqf = function (hasPermission, $completion) {
    var tmp = this.mqf(hasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.krk_1.irl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yrl(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.lrk_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).mqf = function (hasPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda(this.krk_1, completion);
    i.lrk_1 = hasPermission;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermission, $completion) {
      return i.lqf(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation) {
    this.hrm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.hrm_1.wqn().p7f();
            var tmp_1 = this.hrm_1.qqn().joa().vky_1;
            PermissionFlags_getInstance();
            var tmp_2 = distinctUntilChanged(tmp_0.ui0(tmp_1, new Long(512, 0)));
            var tmp_3 = ClazzDetailOverviewViewModel$slambda$slambda$slambda_0(this.hrm_1, null);
            suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).l78 = function (completion) {
    return new ClazzDetailOverviewViewModel$slambda$slambda(this.hrm_1, completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.qrm_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).urm = function (value, $completion) {
    var tmp = this.vrm(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.urm(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.srm_1 = this.qrm_1;
            var tmp_1 = this;
            tmp_1.trm_1 = this.rrm_1;
            this.hd_1 = 1;
            var it = this.trm_1;
            suspendResult = this.srm_1.t1d(it.xdn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).vrm = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.qrm_1, completion);
    i.rrm_1 = value;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.urm(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$62(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ern_1 = _this__u8e3s4;
    this.frn_1 = collector;
  }
  protoOf($collectCOROUTINE$62).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.grn_1 = this.frn_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.grn_1, null);
            suspendResult = this.ern_1.hrn_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.qrn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).srn = function (courseBlockList, $completion) {
    var tmp = this.trn(courseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.srn((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.qrn_1.irl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yrl(VOID, VOID, this.rrn_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).trn = function (courseBlockList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.qrn_1, completion);
    i.rrn_1 = courseBlockList;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (courseBlockList, $completion) {
      return i.srn(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.cro_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).ero = function (blockStatuses, $completion) {
    var tmp = this.fro(blockStatuses, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.ero((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.cro_1.irl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yrl(VOID, VOID, VOID, this.dro_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).fro = function (blockStatuses, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this.cro_1, completion);
    i.dro_1 = blockStatuses;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (blockStatuses, $completion) {
      return i.ero(blockStatuses, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.oro_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).qro = function (scheduleList, $completion) {
    var tmp = this.rro(scheduleList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.qro((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.oro_1.irl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yrl(VOID, this.pro_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).rro = function (scheduleList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.oro_1, completion);
    i.pro_1 = scheduleList;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (scheduleList, $completion) {
      return i.qro(scheduleList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.arp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.arp_1.wqn().p7d().icl(this.arp_1.uqm_1, false, false, systemTimeInMillis(), this.arp_1.sqn());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.arp_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.arp_1, completion);
    i.brp_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.krp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.krp_1.wqn().j7e().oje(this.krp_1.uqm_1, listOf_0(this.krp_1.sqn()), this.krp_1.sqn());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this.krp_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this.krp_1, completion);
    i.lrp_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.urp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.urp_1.wqn().n7e().zhd(this.urp_1.uqm_1);
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.urp_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3(this.urp_1, completion);
    i.vrp_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_3($this) {
    this.hrn_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_3).aqf = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$62(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_3).a1c = function (collector, $completion) {
    return this.aqf(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.erq_1 = $this_launch;
    this.frq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).lqf = function (hasViewPermission, $completion) {
    var tmp = this.mqf(hasViewPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          if (this.grq_1) {
            launch(this.erq_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.frq_1, null));
            launch(this.erq_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this.frq_1, null));
            launch(this.erq_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_4(this.frq_1, null));
          } else {
            l$ret$1: do {
              var this_0 = this.frq_1.irl_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.yrl(VOID, VOID, emptyList());
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).mqf = function (hasViewPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.erq_1, this.frq_1, completion);
    i.grq_1 = hasViewPermission;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function (hasViewPermission, $completion) {
      return i.lqf(hasViewPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.irl_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.yrl(VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).rrq = function (clazzWithDisplayDetails, permissions, $completion) {
    var tmp = this.srq(clazzWithDisplayDetails, permissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof ClazzAndDisplayDetails) ? p1 : THROW_CCE();
    return this.rrq(tmp, p2 instanceof PermissionTriple ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.prq_1;
          var tmp_0;
          if (this.qrq_1.xdn_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).srq = function (clazzWithDisplayDetails, permissions, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.prq_1 = clazzWithDisplayDetails;
    i.qrq_1 = permissions;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (clazzWithDisplayDetails, permissions, $completion) {
      return i.rrq(clazzWithDisplayDetails, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.brr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).drr = function (it, $completion) {
    var tmp = this.err(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.drr((p1 == null ? true : p1 instanceof ClazzAndDisplayDetails) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.brr_1.irl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yrl(this.crr_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          var tmp1_currentTerminologyStrings = this.brr_1.irl_1.t2().url_1;
          var tmp0_safe_receiver = this.crr_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q8k_1;
          var tmp3_json = this.brr_1.m4r();
          var tmp4_systemImpl = this.brr_1.aqo();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this.brr_1));
          l$ret$3: do {
            var this_1 = this.brr_1.eqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_0 = this.crr_1;
              var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.p8k_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s8d_1;
              var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).err = function (it, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.brr_1, completion);
    i.crr_1 = it;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.drr(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation) {
    this.nrr_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).urm = function (value, $completion) {
    var tmp = this.vrm(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).he = function (p1, $completion) {
    return this.urm(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.prr_1 = this.nrr_1;
            var tmp_1 = this;
            tmp_1.qrr_1 = this.orr_1;
            this.hd_1 = 1;
            var it = this.qrr_1;
            suspendResult = this.prr_1.t1d(it.ydn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).vrm = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1(this.nrr_1, completion);
    i.orr_1 = value;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.urm(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$63(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zrr_1 = _this__u8e3s4;
    this.ars_1 = collector;
  }
  protoOf($collectCOROUTINE$63).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.brs_1 = this.ars_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2(this.brs_1, null);
            suspendResult = this.zrr_1.crs_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_4($this) {
    this.crs_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_4).aqf = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$63(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_4).a1c = function (collector, $completion) {
    return this.aqf(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.lrs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).lqf = function (hasEditPermission, $completion) {
    var tmp = this.mqf(hasEditPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.lrs_1.eqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mq6(prevValue.xq5_1.sq6(this.mrs_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.lrs_1.irl_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.yrl(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.mrs_1);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).mqf = function (hasEditPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.lrs_1, completion);
    i.mrs_1 = hasEditPermission;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (hasEditPermission, $completion) {
      return i.lqf(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation) {
    this.vrs_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).urm = function (value, $completion) {
    var tmp = this.vrm(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).he = function (p1, $completion) {
    return this.urm(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.xrs_1 = this.vrs_1;
            var tmp_1 = this;
            tmp_1.yrs_1 = this.wrs_1;
            this.hd_1 = 1;
            var it = this.yrs_1;
            suspendResult = this.xrs_1.t1d(it.zdn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).vrm = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3(this.vrs_1, completion);
    i.wrs_1 = value;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.urm(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$64(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.hrt_1 = _this__u8e3s4;
    this.irt_1 = collector;
  }
  protoOf($collectCOROUTINE$64).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.jrt_1 = this.irt_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4(this.jrt_1, null);
            suspendResult = this.hrt_1.krt_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_5($this) {
    this.krt_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_5).aqf = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$64(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_5).a1c = function (collector, $completion) {
    return this.aqf(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.trt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).lqf = function (canAddStudent, $completion) {
    var tmp = this.mqf(canAddStudent, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.trt_1.irl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yrl(VOID, VOID, VOID, VOID, this.urt_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).mqf = function (canAddStudent, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.trt_1, completion);
    i.urt_1 = canAddStudent;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (canAddStudent, $completion) {
      return i.lqf(canAddStudent, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation) {
    this.dru_1 = $permissionFlow;
    this.eru_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.dru_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_3(this_0));
            suspendResult = collectLatest(tmp_0, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.fru_1, this.eru_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_1(this.dru_1, this.eru_1, completion);
    i.fru_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_2($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, $permissionFlow, resultContinuation) {
    this.oru_1 = this$0;
    this.pru_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.oru_1.wqn().o7d().y8c(this.oru_1.uqm_1, systemTimeInMillis(), this.oru_1.sqn());
            var tmp_1 = combine(tmp_0, this.pru_1, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_2 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.oru_1, null);
            suspendResult = tmp_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this.oru_1, this.pru_1, completion);
    i.qru_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_5($permissionFlow, this$0, resultContinuation) {
    this.zru_1 = $permissionFlow;
    this.arv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.zru_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_4(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.arv_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_5(this.zru_1, this.arv_1, completion);
    i.brv_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_6($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_5($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_7($permissionFlow, this$0, resultContinuation) {
    this.krv_1 = $permissionFlow;
    this.lrv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.krv_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_5(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.lrv_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_7(this.krv_1, this.lrv_1, completion);
    i.mrv_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_8($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_7($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda_1($this_launch, $permissionFlow, this$0, resultContinuation) {
    this.vrv_1 = $this_launch;
    this.wrv_1 = $permissionFlow;
    this.xrv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.vrv_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_2(this.wrv_1, this.xrv_1, null));
          launch(this.vrv_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_4(this.xrv_1, this.wrv_1, null));
          launch(this.vrv_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_6(this.wrv_1, this.xrv_1, null));
          launch(this.vrv_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_8(this.wrv_1, this.xrv_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ClazzDetailOverviewViewModel$slambda$slambda_1(this.vrv_1, this.wrv_1, this.xrv_1, completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda_2($this_launch, $permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda_1($this_launch, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_setClipboardStringUseCase__31i1s1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.krl_1;
    setClipboardStringUseCase$factory_0();
    return this_0.t2();
  }
  function _get_copyCourseUseCase__jeltyi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nrl_1;
    copyCourseUseCase$factory_0();
    return this_0.t2();
  }
  function onClickEdit($this) {
    Companion_getInstance_116();
    var tmp = to('entityUid', $this.uqm_1.toString());
    Companion_getInstance_116();
    $this.cqn_1.rp6('CourseEdit', mapOf([tmp, to('clazzAction', 'EDIT')]));
  }
  function Companion_114() {
    this.yrv_1 = 'CourseDetailOverviewView';
  }
  var Companion_instance_163;
  function Companion_getInstance_131() {
    return Companion_instance_163;
  }
  function ClazzAction(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_9(function_0) {
    this.zrv_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_9).t1d = function (value, $completion) {
    return this.zrv_1(value, $completion);
  };
  function ClazzDetailOverviewViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda(this$0, resultContinuation) {
    this.irw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.irw_1.irl_1, ClazzDetailOverviewViewModel$slambda$slambda_0(this.irw_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda(this.irw_1, completion);
    i.jrw_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda_1(this$0, $permissionFlow, resultContinuation) {
    this.srw_1 = this$0;
    this.trw_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.srw_1.irl_1, ClazzDetailOverviewViewModel$slambda$slambda_2(this.urw_1, this.trw_1, this.srw_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda_1(this.srw_1, this.trw_1, completion);
    i.urw_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda_2(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda_1(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$onClickCopyCourse$slambda(this$0, resultContinuation) {
    this.drx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.drx_1.irl_1.t2().hrx();
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.frx_1 = tmp_1;
            this.grx_1 = this.drx_1.irl_1.t2().prl_1;
            this.hd_1 = 1;
            suspendResult = _get_copyCourseUseCase__jeltyi(this.drx_1).krx(this.frx_1, this.grx_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            this_0.lrx_1.s8d_1 = this.drx_1.aqo().moj(strings_getInstance().anr_1) + ' ' + this_0.lrx_1.s8d_1;
            var copyResult = this_0;
            Companion_getInstance_116();
            var tmp_2 = to('clazzAction', 'COPY');
            Companion_getInstance_115();
            var this_1 = this.drx_1.m4r();
            var value = copyResult.lrx_1;
            var this_2 = this_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(ClazzWithHolidayCalendarAndAndTerminology), arrayOf([]), false));
            var tmp_3 = to('entity', this_1.r45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), value));
            var this_4 = this.drx_1.m4r();
            var value_0 = copyResult.mrx_1;
            var this_5 = this_4.t45();
            var this_6 = serializer(this_5, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(getKClass(CourseBlockAndEditEntities), arrayOf([]), false))]), false));
            var tmp_4 = to('courseblocks', this_4.r45(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), value_0));
            var this_7 = this.drx_1.m4r();
            var value_1 = copyResult.nrx_1;
            var this_8 = this_7.t45();
            var this_9 = serializer(this_8, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(getKClass(Schedule), arrayOf([]), false))]), false));
            this.drx_1.cqn_1.rp6('CourseEdit', mapOf([tmp_2, tmp_3, tmp_4, to('schedule', this_7.r45(isInterface(this_9, KSerializer) ? this_9 : THROW_CCE(), value_1))]));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$onClickCopyCourse$slambda(this.drx_1, completion);
    i.erx_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$onClickCopyCourse$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$onClickCopyCourse$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAction_EDIT_getInstance() {
    ClazzAction_initEntries();
    return ClazzAction_EDIT_instance;
  }
  function ClazzAction_COPY_getInstance() {
    ClazzAction_initEntries();
    return ClazzAction_COPY_instance;
  }
  function ClazzDetailOverviewViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'CourseDetailOverviewView' : destinationName;
    DetailViewModel.call(this, di, savedStateHandle, destinationName);
    this.irl_1 = MutableStateFlow(new ClazzDetailOverviewUiState());
    this.jrl_1 = asStateFlow(this.irl_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.krl_1 = Instance(this, tmp$ret$0, null).a5d(this, setClipboardStringUseCase$factory());
    this.lrl_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.mrl_1 = asSharedFlow(this.lrl_1);
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(CopyCourseUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.nrl_1 = Instance(this_0, tmp$ret$2, null).a5d(this, copyCourseUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>' call
        var tmp_3 = this.aqo().moj(strings_getInstance().qmv_1);
        var tmp_4 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.mq6(new FabUiState(false, tmp_3, tmp_4, ClazzDetailOverviewViewModel$onClickEdit$ref(this)));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_5 = this.rqn();
    launch(tmp_5, VOID, VOID, ClazzDetailOverviewViewModel$slambda_0(this, null));
    var tmp_6 = this.wqn().o7f();
    var tmp_7 = this.sqn();
    PermissionFlags_getInstance();
    var tmp_8 = new Long(1, 0);
    PermissionFlags_getInstance();
    var tmp_9 = new Long(2, 0);
    PermissionFlags_getInstance();
    var permissionFlow = shareIn(tmp_6.idk(tmp_7, this.uqm_1, tmp_8, tmp_9, new Long(8, 0)), this.rqn(), Companion_getInstance_12().v1h());
    var tmp_10 = this.rqn();
    launch(tmp_10, VOID, VOID, ClazzDetailOverviewViewModel$slambda_2(this, permissionFlow, null));
  }
  protoOf(ClazzDetailOverviewViewModel).orx = function (code) {
    _get_setClipboardStringUseCase__31i1s1(this).wp1(code);
    this.yqn().bq7(new Snack(this.aqo().moj(strings_getInstance().sn8_1)));
  };
  protoOf(ClazzDetailOverviewViewModel).prx = function (courseBlock) {
    Companion_getInstance_125();
    var tmp = to('entityUid', courseBlock.t7x_1.toString());
    Companion_getInstance_125();
    var navArgs = mapOf([tmp, to('clazzUid', this.uqm_1.toString())]);
    var tmp0_subject = courseBlock.u7x_1;
    if (tmp0_subject === 100) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.irl_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.onClickCourseBlock.<anonymous>' call
          var nextValue = prevValue.yrl(VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.trl_1, courseBlock.t7x_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this.lrl_1.i1h(new RefreshCommand());
    } else {
      if (tmp0_subject === 102) {
        this.cqn_1.rp6('CourseText', navArgs);
      } else {
        if (tmp0_subject === 103) {
          this.cqn_1.rp6('CourseAssignment', navArgs);
        } else {
          if (tmp0_subject === 105) {
            this.cqn_1.rp6('CourseDiscussion', navArgs);
          } else {
            if (tmp0_subject === 104) {
              Companion_getInstance_160();
              Companion_getInstance_125();
              var tmp_0 = to('entityUid', courseBlock.l7y_1.toString());
              Companion_getInstance_125();
              var tmp_1 = to('clazzUid', this.uqm_1.toString());
              Companion_getInstance_125();
              this.cqn_1.rp6('ContentEntry', mapOf([tmp_0, tmp_1, to('courseBlockUid', courseBlock.t7x_1.toString())]));
            }
          }
        }
      }
    }
  };
  protoOf(ClazzDetailOverviewViewModel).qrx = function () {
    Companion_getInstance_125();
    this.cqn_1.rp6('CoursePermissionList', mapOf_0(to('clazzUid', this.uqm_1.toString())));
  };
  protoOf(ClazzDetailOverviewViewModel).rrx = function () {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzDetailOverviewViewModel$onClickCopyCourse$slambda_0(this, null));
  };
  function ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this$0) {
    return function () {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var this_0 = this$0.qrl_1;
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewUiState.displayBlockList$delegate.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element.zcn_1;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w7x_1;
        if (!this$0.trl_1.a1(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.i1(element);
        }
      }
      return destination;
    };
  }
  function ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) {
    clazzAndDetail = clazzAndDetail === VOID ? null : clazzAndDetail;
    scheduleList = scheduleList === VOID ? emptyList() : scheduleList;
    courseBlockList = courseBlockList === VOID ? emptyList() : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? emptyList() : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? false : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? emptySet() : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? false : managePermissionVisible;
    canAddNewCourse = canAddNewCourse === VOID ? false : canAddNewCourse;
    this.orl_1 = clazzAndDetail;
    this.prl_1 = scheduleList;
    this.qrl_1 = courseBlockList;
    this.rrl_1 = blockStatusesForActiveUser;
    this.srl_1 = clazzCodeVisible;
    this.trl_1 = collapsedBlockUids;
    this.url_1 = terminologyStrings;
    this.vrl_1 = managePermissionVisible;
    this.wrl_1 = canAddNewCourse;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.xrl_1 = lazy(tmp_0, ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this));
  }
  protoOf(ClazzDetailOverviewUiState).hrx = function () {
    var tmp0_safe_receiver = this.orl_1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p8k_1;
  };
  protoOf(ClazzDetailOverviewUiState).srx = function () {
    var tmp;
    var tmp0_safe_receiver = this.orl_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p8k_1;
    if (isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z8d_1)) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.orl_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.p8k_1;
      tmp = isDateSet(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.a8e_1);
    }
    return tmp;
  };
  protoOf(ClazzDetailOverviewUiState).trx = function () {
    var tmp0_safe_receiver = this.orl_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s8k_1;
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).urx = function () {
    var tmp0_safe_receiver = this.orl_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t8k_1;
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).vrx = function () {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.qrl_1;
      var tmp;
      if (isInterface(this_0, Collection)) {
        tmp = this_0.c1();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewUiState.<get-hasModules>.<anonymous>' call
        var tmp0_safe_receiver = element.zcn_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u7x_1;
        if (tmp_0 === 100) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  protoOf(ClazzDetailOverviewUiState).wrx = function () {
    var tmp2_safe_receiver = this.url_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.oq8(strings_getInstance().umy_1);
    var tmp = (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs) + ': ' + this.urx() + ', ';
    var tmp0_safe_receiver = this.url_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oq8(strings_getInstance().sml_1);
    return tmp + ((tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs) + ': ' + this.trx());
  };
  protoOf(ClazzDetailOverviewUiState).xrx = function () {
    return this.vrl_1;
  };
  protoOf(ClazzDetailOverviewUiState).yrx = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.xrl_1;
    displayBlockList$factory();
    return this_0.t2();
  };
  protoOf(ClazzDetailOverviewUiState).zrx = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) {
    return new ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse);
  };
  protoOf(ClazzDetailOverviewUiState).yrl = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse, $super) {
    clazzAndDetail = clazzAndDetail === VOID ? this.orl_1 : clazzAndDetail;
    scheduleList = scheduleList === VOID ? this.prl_1 : scheduleList;
    courseBlockList = courseBlockList === VOID ? this.qrl_1 : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? this.rrl_1 : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? this.srl_1 : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? this.trl_1 : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? this.url_1 : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? this.vrl_1 : managePermissionVisible;
    canAddNewCourse = canAddNewCourse === VOID ? this.wrl_1 : canAddNewCourse;
    return $super === VOID ? this.zrx(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) : $super.zrx.call(this, clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse);
  };
  protoOf(ClazzDetailOverviewUiState).toString = function () {
    return 'ClazzDetailOverviewUiState(clazzAndDetail=' + this.orl_1 + ', scheduleList=' + this.prl_1 + ', courseBlockList=' + this.qrl_1 + ', blockStatusesForActiveUser=' + this.rrl_1 + ', clazzCodeVisible=' + this.srl_1 + ', collapsedBlockUids=' + this.trl_1 + ', terminologyStrings=' + this.url_1 + ', managePermissionVisible=' + this.vrl_1 + ', canAddNewCourse=' + this.wrl_1 + ')';
  };
  protoOf(ClazzDetailOverviewUiState).hashCode = function () {
    var result = this.orl_1 == null ? 0 : this.orl_1.hashCode();
    result = imul(result, 31) + hashCode(this.prl_1) | 0;
    result = imul(result, 31) + hashCode(this.qrl_1) | 0;
    result = imul(result, 31) + hashCode(this.rrl_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.srl_1) | 0;
    result = imul(result, 31) + hashCode(this.trl_1) | 0;
    result = imul(result, 31) + (this.url_1 == null ? 0 : this.url_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vrl_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wrl_1) | 0;
    return result;
  };
  protoOf(ClazzDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.orl_1, tmp0_other_with_cast.orl_1))
      return false;
    if (!equals(this.prl_1, tmp0_other_with_cast.prl_1))
      return false;
    if (!equals(this.qrl_1, tmp0_other_with_cast.qrl_1))
      return false;
    if (!equals(this.rrl_1, tmp0_other_with_cast.rrl_1))
      return false;
    if (!(this.srl_1 === tmp0_other_with_cast.srl_1))
      return false;
    if (!equals(this.trl_1, tmp0_other_with_cast.trl_1))
      return false;
    if (!equals(this.url_1, tmp0_other_with_cast.url_1))
      return false;
    if (!(this.vrl_1 === tmp0_other_with_cast.vrl_1))
      return false;
    if (!(this.wrl_1 === tmp0_other_with_cast.wrl_1))
      return false;
    return true;
  };
  function setClipboardStringUseCase$factory() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function copyCourseUseCase$factory() {
    return getPropertyCallableRef('copyCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_copyCourseUseCase__jeltyi(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_0() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function copyCourseUseCase$factory_0() {
    return getPropertyCallableRef('copyCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_copyCourseUseCase__jeltyi(receiver);
    }, null);
  }
  function displayBlockList$factory() {
    return getPropertyCallableRef('displayBlockList', 1, KProperty1, function (receiver) {
      return receiver.yrx();
    }, null);
  }
  function Companion_115() {
    Companion_instance_164 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ary_1 = [null, new ArrayListSerializer($serializer_getInstance_7()), new ArrayListSerializer($serializer_getInstance_8())];
  }
  var Companion_instance_164;
  function Companion_getInstance_132() {
    if (Companion_instance_164 == null)
      new Companion_115();
    return Companion_instance_164;
  }
  function $serializer_59() {
    $serializer_instance_59 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazz.detailoverview.CopyCourseUseCase.CopyCourseResult', this, 3);
    tmp0_serialDesc.t4f('clazz', false);
    tmp0_serialDesc.t4f('courseBlocks', false);
    tmp0_serialDesc.t4f('schedules', false);
    this.bry_1 = tmp0_serialDesc;
  }
  protoOf($serializer_59).q44 = function () {
    return this.bry_1;
  };
  protoOf($serializer_59).k4g = function () {
    var tmp0_cached = Companion_getInstance_132().ary_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_9(), tmp0_cached[1], tmp0_cached[2]];
  };
  protoOf($serializer_59).s44 = function (decoder) {
    var tmp0_desc = this.bry_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.i48(tmp0_desc);
    var tmp8_cached = Companion_getInstance_132().ary_1;
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.u48(tmp0_desc, 0, $serializer_getInstance_9(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.u48(tmp0_desc, 0, $serializer_getInstance_9(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return CopyCourseResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_59).cry = function (encoder, value) {
    var tmp0_desc = this.bry_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_132().ary_1;
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_9(), value.lrx_1);
    tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.mrx_1);
    tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.nrx_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_59).r44 = function (encoder, value) {
    return this.cry(encoder, value instanceof CopyCourseResult ? value : THROW_CCE());
  };
  var $serializer_instance_59;
  function $serializer_getInstance_71() {
    if ($serializer_instance_59 == null)
      new $serializer_59();
    return $serializer_instance_59;
  }
  function CopyCourseResult_init_$Init$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_71().bry_1);
    }
    $this.lrx_1 = clazz;
    $this.mrx_1 = courseBlocks;
    $this.nrx_1 = schedules;
    return $this;
  }
  function CopyCourseResult_init_$Create$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker) {
    return CopyCourseResult_init_$Init$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker, objectCreate(protoOf(CopyCourseResult)));
  }
  function CopyCourseResult(clazz, courseBlocks, schedules) {
    Companion_getInstance_132();
    this.lrx_1 = clazz;
    this.mrx_1 = courseBlocks;
    this.nrx_1 = schedules;
  }
  protoOf(CopyCourseResult).toString = function () {
    return 'CopyCourseResult(clazz=' + this.lrx_1 + ', courseBlocks=' + this.mrx_1 + ', schedules=' + this.nrx_1 + ')';
  };
  protoOf(CopyCourseResult).hashCode = function () {
    var result = this.lrx_1.hashCode();
    result = imul(result, 31) + hashCode(this.mrx_1) | 0;
    result = imul(result, 31) + hashCode(this.nrx_1) | 0;
    return result;
  };
  protoOf(CopyCourseResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CopyCourseResult))
      return false;
    var tmp0_other_with_cast = other instanceof CopyCourseResult ? other : THROW_CCE();
    if (!this.lrx_1.equals(tmp0_other_with_cast.lrx_1))
      return false;
    if (!equals(this.mrx_1, tmp0_other_with_cast.mrx_1))
      return false;
    if (!equals(this.nrx_1, tmp0_other_with_cast.nrx_1))
      return false;
    return true;
  };
  function shallowCopyTo(_this__u8e3s4, $this, target) {
    target.s8d_1 = _this__u8e3s4.s8d_1;
    target.t8d_1 = _this__u8e3s4.t8d_1;
    target.u8d_1 = _this__u8e3s4.u8d_1;
    target.v8d_1 = _this__u8e3s4.v8d_1;
    target.w8d_1 = _this__u8e3s4.w8d_1;
    target.x8d_1 = _this__u8e3s4.x8d_1;
    target.y8d_1 = _this__u8e3s4.y8d_1;
    target.z8d_1 = _this__u8e3s4.z8d_1;
    target.a8e_1 = _this__u8e3s4.a8e_1;
    target.b8e_1 = _this__u8e3s4.b8e_1;
    target.c8e_1 = _this__u8e3s4.c8e_1;
    target.d8e_1 = _this__u8e3s4.d8e_1;
    target.e8e_1 = _this__u8e3s4.e8e_1;
    target.f8e_1 = _this__u8e3s4.f8e_1;
    target.g8e_1 = _this__u8e3s4.g8e_1;
    target.h8e_1 = _this__u8e3s4.h8e_1;
    target.i8e_1 = _this__u8e3s4.i8e_1;
    target.j8e_1 = _this__u8e3s4.j8e_1;
    target.k8e_1 = _this__u8e3s4.k8e_1;
    target.l8e_1 = _this__u8e3s4.l8e_1;
    target.m8e_1 = _this__u8e3s4.m8e_1;
    target.n8e_1 = _this__u8e3s4.n8e_1;
    target.o8e_1 = _this__u8e3s4.o8e_1;
  }
  function CopyCourseUseCase$invoke$lambda($newScheduleUid, $clazz) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.uhe_1 = $newScheduleUid;
      $this$shallowCopy.bhf_1 = $clazz.r8d_1;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$65(_this__u8e3s4, clazz, scheduleListVal, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lry_1 = _this__u8e3s4;
    this.mry_1 = clazz;
    this.nry_1 = scheduleListVal;
  }
  protoOf($invokeCOROUTINE$65).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            this.hd_1 = 1;
            suspendResult = this.lry_1.irx_1.p7d().hcl(this.mry_1.r8d_1, false, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ory_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.lry_1.irx_1.g7f().sft(this.mry_1.r8d_1, false, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.pry_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = this.lry_1.irx_1.o7d().u8c(this.mry_1.r8d_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.qry_1 = suspendResult;
            this.rry_1 = this.qry_1 == null ? new ClazzWithHolidayCalendarAndAndTerminology() : this.qry_1;
            var tmp_0 = this;
            var this_0 = this.ory_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              var tmp_1 = ensureNotNull(item.icn_1);
              var tmp0_elvis_lhs = item.jcn_1;
              var tmp_2 = tmp0_elvis_lhs == null ? new CourseBlockPicture(ensureNotNull(item.icn_1).t7x_1) : tmp0_elvis_lhs;
              var tmp_3 = item.kcn_1;
              var tmp_4 = item.lcn_1;
              var tmp_5 = item.mcn_1;
              var tmp_6 = item.ncn_1;
              var this_1 = this.pry_1;
              var destination_0 = ArrayList_init_$Create$();
              var tmp0_iterator_0 = this_1.w();
              while (tmp0_iterator_0.f()) {
                var element = tmp0_iterator_0.e();
                var tmp_7 = element.qfu_1;
                var tmp0_safe_receiver = item.mcn_1;
                if (tmp_7.equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n7t_1)) {
                  destination_0.i1(element);
                }
              }
              destination.i1(new CourseBlockAndEditEntities(tmp_1, tmp_2, tmp_3, VOID, VOID, VOID, tmp_4, tmp_5, tmp_6, destination_0));
            }

            tmp_0.sry_1 = destination;
            this.try_1 = get_doorPrimaryKeyManager(this.lry_1.irx_1);
            this.hd_1 = 4;
            Companion_getInstance_4();
            suspendResult = this.try_1.o62(6, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.ury_1 = suspendResult;
            this.vry_1 = this.lry_1.jrx_1.joa().vky_1;
            this.hd_1 = 5;
            suspendResult = this.try_1.o62(21, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.wry_1 = suspendResult;
            var tmp_8 = this;
            tmp_8.xry_1 = this.sry_1;
            var tmp_9 = this;
            tmp_9.yry_1 = this.xry_1;
            var tmp_10 = this;
            tmp_10.zry_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.xry_1, 10));
            this.arz_1 = this.yry_1.w();
            this.hd_1 = 6;
            continue $sm;
          case 6:
            if (!this.arz_1.f()) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.brz_1 = this.arz_1.e();
            var tmp_11 = this;
            tmp_11.crz_1 = this.brz_1;
            this.hd_1 = 7;
            suspendResult = this.try_1.o62(124, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.drz_1 = suspendResult;
            this.erz_1 = this.crz_1.uk8_1;
            if (this.erz_1 == null) {
              this.frz_1 = null;
              this.hd_1 = 9;
              continue $sm;
            } else {
              this.hd_1 = 8;
              suspendResult = this.try_1.o62(520, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 8:
            var tmp1_caUid = suspendResult;
            this.frz_1 = this.erz_1.xkd(tmp1_caUid, VOID, VOID, new Long(0, 0), VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, 1, VOID, VOID, VOID, VOID, this.ury_1);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            var copiedAssignment = this.frz_1;
            var tmp4_elvis_lhs = copiedAssignment == null ? null : copiedAssignment.n7t_1;
            var ARGUMENT = this.crz_1.zk8(this.crz_1.nk8_1.hkm(this.drz_1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ury_1, VOID, VOID, VOID, tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs), VOID, VOID, VOID, VOID, VOID, VOID, copiedAssignment);
            this.zry_1.i1(ARGUMENT);
            this.hd_1 = 6;
            continue $sm;
          case 10:
            var courseBlocks = this.zry_1;
            shallowCopyTo(this.mry_1, this.lry_1, this.rry_1);
            var tmp_12 = this.rry_1;
            var tmp1_safe_receiver = this.rry_1.l8g_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.hkn(this.ury_1);
            tmp_12.l8g_1 = tmp2_elvis_lhs == null ? new CoursePicture(this.ury_1) : tmp2_elvis_lhs;
            this.rry_1.r8d_1 = this.ury_1;
            this.rry_1.p8e_1 = this.vry_1;
            this.rry_1.r8d_1 = this.ury_1;
            this.rry_1.p8e_1 = this.vry_1;
            var this_2 = this.nry_1;
            var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var item_0 = tmp0_iterator_1.e();
              destination_1.i1(shallowCopy_3(item_0, CopyCourseUseCase$invoke$lambda(this.wry_1, this.mry_1)));
            }

            var schedules = destination_1;
            return new CopyCourseResult(this.rry_1, courseBlocks, schedules);
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function CopyCourseUseCase(repoOrDb, accountManager) {
    this.irx_1 = repoOrDb;
    this.jrx_1 = accountManager;
  }
  protoOf(CopyCourseUseCase).krx = function (clazz, scheduleListVal, $completion) {
    var tmp = new $invokeCOROUTINE$65(this, clazz, scheduleListVal, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function ClazzEditViewModel$slambda$slambda$slambda$lambda(this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.l8g_1 = new CoursePicture(this$0.iqt_1);
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.orz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).srz = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.srz(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.prz_1.o7d();
            var tmp_1;
            if (!this.orz_1.iqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.qrz_1 = tmp_1;
            if (this.qrz_1 == null) {
              this.rrz_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.qrz_1.u8c(this.orz_1.iqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.rrz_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp1_safe_receiver = this.rrz_1;
            var tmp_2;
            if (tmp1_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var updatedClazz = tmp1_safe_receiver;
              if (tmp1_safe_receiver.l8g_1 == null) {
                var tmp_3 = updatedClazz;
                updatedClazz = shallowCopy_4(tmp_3, ClazzEditViewModel$slambda$slambda$slambda$lambda(this.orz_1));
              }
              tmp_2 = updatedClazz;
            }

            return tmp_2;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).yny = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this.orz_1, completion);
    i.prz_1 = it;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.srz(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.bs0_1 = this$0;
    this.cs0_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).hs0 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.hs0($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.ds0_1 = new ClazzWithHolidayCalendarAndAndTerminology();
            var tmp_1 = this;
            tmp_1.es0_1 = this.ds0_1;
            this.es0_1.r8d_1 = this.bs0_1.ms1_1;
            this.es0_1.s8d_1 = '';
            this.es0_1.x8d_1 = true;
            this.es0_1.z8d_1 = systemTimeInMillis();
            this.es0_1.j8e_1 = getDefaultTimeZoneId();
            var tmp_2 = this.es0_1;
            Companion_getInstance_116();
            var tmp0_safe_receiver = this.cs0_1.ba('schoolUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            tmp_2.c8e_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var tmp_3 = this;
            var this_0 = this.bs0_1.wqn().q7d();
            var tmp_4;
            if (!this.es0_1.e8e_1.equals(new Long(0, 0))) {
              tmp_4 = this_0;
            } else {
              tmp_4 = null;
            }

            tmp_3.fs0_1 = tmp_4;
            if (this.fs0_1 == null) {
              this.gs0_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.fs0_1.ge7(this.es0_1.e8e_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.gs0_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.gs0_1;
            this.es0_1.k8g_1 = ARGUMENT;
            this.es0_1.l8g_1 = new CoursePicture(this.bs0_1.ms1_1);
            this.es0_1.p8e_1 = this.bs0_1.sqn();
            return this.ds0_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).l78 = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_1(this.bs0_1, this.cs0_1, completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.hs0($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ks1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xs1(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.gs2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).ks2 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.ks2(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.hs2_1.n7e();
            var tmp_1;
            if (!this.gs2_1.iqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.is2_1 = tmp_1;
            if (this.is2_1 == null) {
              this.js2_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.is2_1.ahe(this.gs2_1.iqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.js2_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.js2_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).yny = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this.gs2_1, completion);
    i.hs2_1 = it;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ks2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).ts2 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).m78 = function ($completion) {
    return this.ts2($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).l78 = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_5(completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_6(resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.ts2($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ks1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xs1(VOID, VOID, VOID, VOID, VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.cs3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).ks3 = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.ks3(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var this_0 = this.ds3_1.p7d();
            var tmp_1;
            if (!this.cs3_1.iqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.es3_1 = tmp_1;
            if (this.es3_1 == null) {
              this.fs3_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.es3_1.hcl(this.cs3_1.iqt_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.fs3_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.gs3_1 = this.fs3_1;
            this.hs3_1 = this.gs3_1 == null ? emptyList() : this.gs3_1;
            var tmp_2 = this;
            var this_1 = this.ds3_1.g7f();
            var tmp_3;
            if (!this.cs3_1.iqt_1.equals(new Long(0, 0))) {
              tmp_3 = this_1;
            } else {
              tmp_3 = null;
            }

            tmp_2.is3_1 = tmp_3;
            if (this.is3_1 == null) {
              this.js3_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              this.hd_1 = 3;
              suspendResult = this.is3_1.sft(this.cs3_1.iqt_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 3:
            this.js3_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var tmp3_elvis_lhs = this.js3_1;
            var assignmentPeerAllocations = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            var this_2 = this.hs3_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator = this_2.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              var tmp_4 = ensureNotNull(item.icn_1);
              var tmp0_elvis_lhs = item.jcn_1;
              var tmp_5 = tmp0_elvis_lhs == null ? new CourseBlockPicture(ensureNotNull(item.icn_1).t7x_1) : tmp0_elvis_lhs;
              var tmp_6 = item.kcn_1;
              var tmp_7 = item.lcn_1;
              var tmp_8 = item.mcn_1;
              var tmp_9 = item.ncn_1;
              var destination_0 = ArrayList_init_$Create$();
              var tmp0_iterator_0 = assignmentPeerAllocations.w();
              while (tmp0_iterator_0.f()) {
                var element = tmp0_iterator_0.e();
                var tmp_10 = element.qfu_1;
                var tmp0_safe_receiver = item.mcn_1;
                if (tmp_10.equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n7t_1)) {
                  destination_0.i1(element);
                }
              }
              destination.i1(new CourseBlockAndEditEntities(tmp_4, tmp_5, tmp_6, VOID, VOID, VOID, tmp_7, tmp_8, tmp_9, destination_0));
            }

            return destination;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).yny = function (db, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this.cs3_1, completion);
    i.ds3_1 = db;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.ks3(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).ts3 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).m78 = function ($completion) {
    return this.ts3($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).l78 = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_9(completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_10(resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation);
    var l = function ($completion) {
      return i.ts3($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda_1(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ks1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xs1(VOID, VOID, VOID, VOID, VOID, VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_0($returnedSchedule) {
    return function (it) {
      return it.uhe_1.equals($returnedSchedule.uhe_1);
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation) {
    this.cs4_1 = this$0;
    this.ds4_1 = $newSchedules;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).nr0 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.nr0((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.cs4_1.m4r().r45(ListSerializer(Companion_instance_29.n4r()), this.ds4_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda$slambda(this.cs4_1, this.ds4_1, completion);
    i.es4_1 = $this$withContext;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda$slambda_0(this$0, $newSchedules, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.nr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation) {
    this.ns4_1 = this$0;
    this.os4_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.ps4_1.xq9_1;
            var tmp0_elvis_lhs = tmp_1 instanceof Schedule ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.qs4_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.ns4_1.ks1_1.t2().us1_1;
            tmp_3.rs4_1 = replaceOrAppend(tmp_4, this.qs4_1, ClazzEditViewModel$slambda$slambda$slambda$lambda_0(this.qs4_1));
            l$ret$1: do {
              var this_0 = this.ns4_1.ks1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xs1(VOID, VOID, VOID, VOID, VOID, this.rs4_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 1;
            var tmp_5 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_5, ClazzEditViewModel$slambda$slambda$slambda$slambda_0(this.ns4_1, this.rs4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.os4_1.dqj('schedule', ARGUMENT);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).rqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this.ns4_1, this.os4_1, completion);
    i.ps4_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_12(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation) {
    this.as5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.bs5_1.xq9_1;
            var tmp0_elvis_lhs = tmp_1 instanceof CourseBlockAndEditEntities ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.cs5_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.as5_1.ks1_1.t2().vs1_1;
            var tmp1_safe_receiver = this.as5_1.ks1_1.t2().qs1_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.r8d_1;
            tmp_3.ds5_1 = this.as5_1.fs1_1.mpb(tmp_4, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.cs5_1);
            this.hd_1 = 1;
            suspendResult = updateCourseBlockList(this.as5_1, this.ds5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).rqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this.as5_1, completion);
    i.bs5_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_14(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_1($timeZoneId) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.j8e_1 = $timeZoneId;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_15(this$0, resultContinuation) {
    this.ms5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.ns5_1.xq9_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var timeZoneId = tmp_1;
          var tmp1_safe_receiver = this.ms5_1.ks1_1.t2().qs1_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_4(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_1(timeZoneId));
          }
          this.ms5_1.os5(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).rqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this.ms5_1, completion);
    i.ns5_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_16(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_2($newTerminology) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.e8e_1 = $newTerminology.m8g_1;
      $this$shallowCopy.k8g_1 = $newTerminology;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_17(this$0, resultContinuation) {
    this.xs5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.ys5_1.xq9_1;
          var tmp0_elvis_lhs = tmp_0 instanceof CourseTerminology ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newTerminology = tmp_1;
          var tmp1_safe_receiver = this.xs5_1.ks1_1.t2().qs1_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_4(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_2(newTerminology));
          }
          this.xs5_1.os5(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).rqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this.xs5_1, completion);
    i.ys5_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_18(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_3($newDescription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.t8d_1 = $newDescription;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_19(this$0, resultContinuation) {
    this.hs6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.is6_1.xq9_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newDescription = tmp_1;
          var tmp1_safe_receiver = this.hs6_1.ks1_1.t2().qs1_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_4(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_3(newDescription));
          }
          this.hs6_1.os5(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).rqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this.hs6_1, completion);
    i.is6_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_20(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.rs6_1 = this$0;
    this.ss6_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda).us6 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.us6((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_33.n4r();
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_0(this.rs6_1, null);
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_2(this.rs6_1, this.ss6_1, null);
            suspendResult = this.rs6_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEditViewModel$slambda$slambda$lambda(this.rs6_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_123();
            var tmp1_safe_receiver = this_0 == null ? null : this_0.l8g_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s8g_1;
            setIfNoValueSetYet(this.ss6_1, 'initPicUri', tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            return this_0;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda(this.rs6_1, this.ss6_1, completion);
    i.ts6_1 = $this$async;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.us6($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.ds7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_1).fs7 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.fs7((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_instance_29.n4r());
            var tmp_1 = listOf_0('schedule');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_4(this.ds7_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.ds7_1.kqo(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_0(this.ds7_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_1(this.ds7_1, completion);
    i.es7_1 = $this$async;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.fs7($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.os7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_3).qs7 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.qs7((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_getInstance_13().n4r());
            var tmp_1 = listOf_0('courseblocks');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_8(this.os7_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_10(null);
            suspendResult = this.os7_1.kqo(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_1(this.os7_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).v1m = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_3(this.os7_1, completion);
    i.ps7_1 = $this$async;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.qs7($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.zs7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_5).nr0 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.nr0((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.zs7_1.m4r();
          var value = this.zs7_1.ks1_1.t2();
          var this_1 = this_0.t45();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzEditUiState), arrayOf([]), false));
          return this_0.r45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), value);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).v1m = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_5(this.zs7_1, completion);
    i.as8_1 = $this$withContext;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.nr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation) {
    this.js8_1 = this$0;
    this.ks8_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.js8_1.eqo(this.js8_1.zqn(), 'Schedule');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_12(this.js8_1, this.ks8_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_7(this.js8_1, this.ks8_1, completion);
    i.ls8_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_8(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_9(this$0, resultContinuation) {
    this.us8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_9).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.us8_1.eqo(this.us8_1.zqn(), 'courseblock');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_14(this.us8_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_9(this.us8_1, completion);
    i.vs8_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_11(this$0, resultContinuation) {
    this.es9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_11).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.es9_1.eqo(this.es9_1.zqn(), 'timeZone');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_16(this.es9_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_11(this.es9_1, completion);
    i.fs9_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_13(this$0, resultContinuation) {
    this.os9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_13).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.os9_1.eqo(this.os9_1.zqn(), 'terminology');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_18(this.os9_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_13(this.os9_1, completion);
    i.ps9_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_14(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_13(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_15(this$0, resultContinuation) {
    this.ys9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_15).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ys9_1.eqo(this.ys9_1.zqn(), 'clazzDescriptionHtml');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_20(this.ys9_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_15(this.ys9_1, completion);
    i.zs9_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_16(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_15(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda($clazzUid) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.bhf_1 = $clazzUid;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0(it) {
    return it.uhe_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1(it) {
    return it.nk8_1.t7x_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2(it) {
    return it.n7t_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_3(it) {
    return it.nfu_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation) {
    this.jsa_1 = this$0;
    this.ksa_1 = $initEntity;
    this.lsa_1 = $updateImage;
    this.msa_1 = $coursePictureVal;
    this.nsa_1 = $entity;
    this.osa_1 = $initState;
    this.psa_1 = $courseBlockListVal;
    this.qsa_1 = $updatedCourseBlockPictures;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 20;
            if (this.jsa_1.iqt_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_createNewClazzUseCase__mo489e(this.jsa_1).xoy(this.ksa_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.jsa_1.wqn().o7d().v8c(this.ksa_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (this.lsa_1 ? !(this.msa_1 == null) : false) {
              this.msa_1.r8g_1 = systemTimeInMillis();
              this.msa_1.q8g_1 = this.nsa_1.r8d_1;
              this.hd_1 = 4;
              suspendResult = this.jsa_1.uqn().d7f().ge4(this.msa_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.ssa_1 = this.nsa_1.r8d_1;
            var tmp_0 = this;
            var this_0 = this.jsa_1.ks1_1.t2().us1_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(shallowCopy_3(item, ClazzEditViewModel$onClickSave$slambda$slambda$lambda(this.ssa_1)));
            }

            tmp_0.tsa_1 = destination;
            this.hd_1 = 6;
            suspendResult = this.jsa_1.wqn().n7e().xhd(this.tsa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            var tmp_1 = this.jsa_1.wqn().n7e();
            suspendResult = deactivateByUids(tmp_1, findKeysNotInOtherList(this.osa_1.us1_1, this.tsa_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.usa_1 = this.jsa_1.gs1_1.opb(this.psa_1);
            this.hd_1 = 8;
            var tmp_2 = this.jsa_1.wqn().p7d();
            var this_1 = this.usa_1;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var item_0 = tmp0_iterator_0.e();
              destination_0.i1(item_0.nk8_1);
            }

            suspendResult = tmp_2.kcl(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.hd_1 = 9;
            var tmp_3 = this.jsa_1.wqn().p7d();
            suspendResult = deactivateByUids_0(tmp_3, findKeysNotInOtherList(this.osa_1.vs1_1, this.usa_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            var tmp_4 = this;
            var this_2 = this.psa_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element = tmp0_iterator_1.e();
              var tmp0_safe_receiver = element.uk8_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_1.i1(tmp0_safe_receiver);
              }
            }

            tmp_4.vsa_1 = destination_1;
            this.hd_1 = 10;
            suspendResult = this.jsa_1.wqn().q7e().r7s(this.vsa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_5 = this;
            var this_3 = this.osa_1.vs1_1;
            var destination_2 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.w();
            while (tmp0_iterator_2.f()) {
              var element_0 = tmp0_iterator_2.e();
              var tmp0_safe_receiver_0 = element_0.uk8_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_2.i1(tmp0_safe_receiver_0);
              }
            }

            tmp_5.wsa_1 = findKeysNotInOtherList(destination_2, this.vsa_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2);
            var tmp_6 = this;
            var this_4 = this.jsa_1.wqn().q7e();
            var tmp_7;
            if (!this.wsa_1.c1()) {
              tmp_7 = this_4;
            } else {
              tmp_7 = null;
            }

            tmp_6.xsa_1 = tmp_7;
            if (this.xsa_1 == null) {
              this.ysa_1 = null;
              this.hd_1 = 12;
              continue $sm;
            } else {
              this.hd_1 = 11;
              suspendResult = this.xsa_1.s7s(this.wsa_1, false, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 11:
            var tmp_8 = this;
            tmp_8.ysa_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            var tmp_9 = this;
            var this_5 = this.psa_1;
            var destination_3 = ArrayList_init_$Create$();
            var tmp0_iterator_3 = this_5.w();
            while (tmp0_iterator_3.f()) {
              var element_1 = tmp0_iterator_3.e();
              var list = element_1.wk8_1;
              addAll(destination_3, list);
            }

            tmp_9.zsa_1 = destination_3;
            var tmp_10 = this;
            var this_6 = this.osa_1.vs1_1;
            var destination_4 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = this_6.w();
            while (tmp0_iterator_4.f()) {
              var element_2 = tmp0_iterator_4.e();
              var list_0 = element_2.wk8_1;
              addAll(destination_4, list_0);
            }

            tmp_10.asb_1 = destination_4;
            this.hd_1 = 13;
            var tmp_11 = this.jsa_1.wqn().g7f();
            suspendResult = deactivateByUids_1(tmp_11, findKeysNotInOtherList(this.asb_1, this.zsa_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_3), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            this.hd_1 = 14;
            suspendResult = this.jsa_1.wqn().g7f().tft(this.zsa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 14:
            var tmp_12 = this;
            var this_7 = this.psa_1;
            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_5 = this_7.w();
            while (tmp0_iterator_5.f()) {
              var element_3 = tmp0_iterator_5.e();
              var tmp0_safe_receiver_1 = element_3.rk8_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_5.i1(tmp0_safe_receiver_1);
              }
            }

            tmp_12.bsb_1 = destination_5;
            this.csb_1 = this.bsb_1.w();
            this.hd_1 = 15;
            continue $sm;
          case 15:
            if (!this.csb_1.f()) {
              this.hd_1 = 17;
              continue $sm;
            }

            this.dsb_1 = this.csb_1.e();
            var tmp_13 = this;
            tmp_13.esb_1 = this.dsb_1;
            this.hd_1 = 16;
            suspendResult = this.jsa_1.is1_1.sp5(this.esb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 16:
            this.hd_1 = 15;
            continue $sm;
          case 17:
            var tmp_14 = this;
            var this_8 = this.jsa_1.uqn().q7f();
            var tmp_15;
            if (!this.qsa_1.c1()) {
              tmp_15 = this_8;
            } else {
              tmp_15 = null;
            }

            tmp_14.fsb_1 = tmp_15;
            if (this.fsb_1 == null) {
              this.gsb_1 = null;
              this.hd_1 = 19;
              continue $sm;
            } else {
              this.hd_1 = 18;
              suspendResult = this.fsb_1.hd1(this.qsa_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 18:
            var tmp_16 = this;
            tmp_16.gsb_1 = Unit_instance;
            this.hd_1 = 19;
            continue $sm;
          case 19:
            Napier_getInstance().i5e('onClickSave: transaction block done');
            return Unit_instance;
          case 20:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 20) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).yny = function (it, completion) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this.jsa_1, this.ksa_1, this.lsa_1, this.msa_1, this.nsa_1, this.osa_1, this.psa_1, this.qsa_1, completion);
    i.rsa_1 = it;
    return i;
  };
  function ClazzEditViewModel$onClickSave$slambda$slambda_0(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda$lambda($updatedBlock) {
    return function (it) {
      return it.nk8_1.t7x_1.equals($updatedBlock.nk8_1.t7x_1);
    };
  }
  function _get_createNewClazzUseCase__mo489e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ns1_1;
    createNewClazzUseCase$factory_0();
    return this_0.t2();
  }
  function updateCourseBlockList($this, newCourseBlockList, $completion) {
    var tmp = new $updateCourseBlockListCOROUTINE$66($this, newCourseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function hasErrors(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.rs1_1 == null) ? true : !(_this__u8e3s4.ss1_1 == null)) ? true : !(_this__u8e3s4.ts1_1 == null);
  }
  function updateCourseBlock($this, updatedBlock) {
    var tmp = $this.rqn();
    launch(tmp, VOID, VOID, ClazzEditViewModel$updateCourseBlock$slambda_0($this, updatedBlock, null));
  }
  function Companion_116() {
    this.ssb_1 = 'CourseEdit';
    this.tsb_1 = 'Schedule';
    this.usb_1 = 'schedule';
    this.vsb_1 = 'courseblock';
    this.wsb_1 = 'timeZone';
    this.xsb_1 = 'terminology';
    this.ysb_1 = 'courseblocks';
    this.zsb_1 = 'clazzDescriptionHtml';
  }
  var Companion_instance_165;
  function Companion_getInstance_133() {
    return Companion_instance_165;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_10(function_0) {
    this.asc_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_10).t1d = function (value, $completion) {
    return this.asc_1(value, $completion);
  };
  function ClazzEditViewModel$slambda(this$0, resultContinuation) {
    this.jsc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda).msc = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (!this.jsc_1.iqt_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              var tmp_0 = this.ksc_1.o7f();
              var tmp_1 = this.jsc_1.sqn();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.jdk(tmp_1, this.jsc_1.iqt_1, new Long(2, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_2 = this.ksc_1.p7f();
              var tmp_3 = this.jsc_1.sqn();
              PermissionFlags_getInstance();
              suspendResult = tmp_2.ti0(tmp_3, new Long(512, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.lsc_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.lsc_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.lsc_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda).yny = function (it, completion) {
    var i = new ClazzEditViewModel$slambda(this.jsc_1, completion);
    i.ksc_1 = it;
    return i;
  };
  function ClazzEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.msc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.vsc_1 = $savedStateHandle;
    this.wsc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            var tmp_0 = async(this.xsc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_0(this.wsc_1, this.vsc_1, null));
            var tmp_1 = async(this.xsc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_2(this.wsc_1, null));
            suspendResult = awaitAll([tmp_0, tmp_1, async(this.xsc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_4(this.wsc_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_125();
            if (this.vsc_1.ba('initState') == null) {
              var tmp_2 = this;
              Companion_getInstance_125();
              tmp_2.ysc_1 = 'initState';
              this.hd_1 = 2;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzEditViewModel$slambda$slambda_6(this.wsc_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            var ARGUMENT = suspendResult;
            this.vsc_1.dqj(this.ysc_1, ARGUMENT);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            launch(this.xsc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_8(this.wsc_1, this.vsc_1, null));
            launch(this.xsc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_10(this.wsc_1, null));
            launch(this.xsc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_12(this.wsc_1, null));
            launch(this.xsc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_14(this.wsc_1, null));
            launch(this.xsc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_16(this.wsc_1, null));
            l$ret$1: do {
              var this_0 = this.wsc_1.ks1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xs1(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.wsc_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_4 = Companion_getInstance_97().uq6_1;
                var tmp_5 = this.wsc_1.aqo().moj(strings_getInstance().en3_1);
                var nextValue_0 = prevValue_0.mq6(VOID, tmp_4, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_5, VOID, ClazzEditViewModel$onClickSave$ref(this.wsc_1)));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzEditViewModel$slambda_1(this.vsc_1, this.wsc_1, completion);
    i.xsc_1 = $this$launchIfHasPermission;
    return i;
  };
  function ClazzEditViewModel$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlockList$slambda(this$0, $newCourseBlockList, resultContinuation) {
    this.hsd_1 = this$0;
    this.isd_1 = $newCourseBlockList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).nr0 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).he = function (p1, $completion) {
    return this.nr0((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.hsd_1.m4r().r45(ListSerializer(Companion_getInstance_13().n4r()), this.isd_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).v1m = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$updateCourseBlockList$slambda(this.hsd_1, this.isd_1, completion);
    i.jsd_1 = $this$withContext;
    return i;
  };
  function ClazzEditViewModel$updateCourseBlockList$slambda_0(this$0, $newCourseBlockList, resultContinuation) {
    var i = new ClazzEditViewModel$updateCourseBlockList$slambda(this$0, $newCourseBlockList, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.nr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.ssd_1 = $commitDelay;
    this.tsd_1 = $entity;
    this.usd_1 = $this;
    this.vsd_1 = $key;
    this.wsd_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.ssd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.tsd_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.usd_1.gqo(this.usd_1.aqn_1, this.vsd_1, this.wsd_1, this.tsd_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onEntityChanged$slambda(this.ssd_1, this.tsd_1, this.usd_1, this.vsd_1, this.wsd_1, completion);
    i.xsd_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onCheckedAttendanceChanged$lambda($checked) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp_0;
      if ($checked) {
        Companion_getInstance_4();
        tmp_0 = new Long(1, 0);
      } else {
        tmp_0 = new Long(0, 0);
      }
      tmp.b8e_1 = tmp_0;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$lambda($initEntity) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_safe_receiver = $this$shallowCopy.s8d_1;
      var tmp_0;
      if (tmp0_safe_receiver == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.text.trim' call
        tmp_0 = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
      }
      tmp.s8d_1 = tmp_0;
      var tmp_1 = $this$shallowCopy;
      var tmp_2 = Companion_getInstance_6().fmh($initEntity.z8d_1);
      // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
      var tmp0_elvis_lhs = $initEntity.j8e_1;
      var tmp$ret$1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
      tmp_1.z8d_1 = toLocalMidnight(tmp_2, tmp$ret$1).emh();
      var tmp_3;
      var tmp_4 = $this$shallowCopy.a8e_1;
      Companion_getInstance_2();
      if (!tmp_4.equals(new Long(-1, 2147483647))) {
        var tmp_5 = $this$shallowCopy;
        var tmp_6 = Companion_getInstance_6().fmh($initEntity.a8e_1);
        // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
        var tmp0_elvis_lhs_0 = $initEntity.j8e_1;
        var tmp$ret$2 = tmp0_elvis_lhs_0 == null ? 'UTC' : tmp0_elvis_lhs_0;
        tmp_5.a8e_1 = toLocalEndOfDay(tmp_6, tmp$ret$2).emh();
        tmp_3 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ks1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xs1(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation) {
    this.gse_1 = this$0;
    this.hse_1 = $entity;
    this.ise_1 = $initEntity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 12;
            this.hd_1 = 1;
            Companion_getInstance_125();
            suspendResult = this.gse_1.fqo(this.gse_1.aqn_1, 'initState', Companion_getInstance_134().n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jse_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.jse_1 == null) {
              return Unit_instance;
            } else {
              tmp_1 = this.jse_1;
            }

            tmp_0.kse_1 = tmp_1;
            Napier_getInstance().i5e('onClickSave: start transaction');
            this.lse_1 = this.gse_1.ks1_1.t2().vs1_1;
            this.mse_1 = this.hse_1.l8g_1;
            var tmp_2 = this;
            var tmp_3;
            if (!(this.mse_1 == null)) {
              Companion_getInstance_123();
              var tmp_4 = this.gse_1.aqn_1.ba('initPicUri');
              var tmp1_safe_receiver = this.hse_1.l8g_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s8g_1;
              tmp_3 = !(tmp_4 === (tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs));
            } else {
              tmp_3 = false;
            }

            tmp_2.nse_1 = tmp_3;
            var tmp_5 = this;
            var this_0 = this.lse_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var tmp0_safe_receiver = element.ok8_1;
              var imageUriNow = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y7y_1;
              var tmp$ret$0;
              l$ret$1: do {
                var tmp0_iterator_0 = this.kse_1.vs1_1.w();
                while (tmp0_iterator_0.f()) {
                  var element_0 = tmp0_iterator_0.e();
                  var tmp0_safe_receiver_0 = element_0.ok8_1;
                  var tmp_6 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.w7y_1;
                  var tmp1_safe_receiver_0 = element.ok8_1;
                  if (equals(tmp_6, tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.w7y_1)) {
                    tmp$ret$0 = element_0;
                    break l$ret$1;
                  }
                }
                tmp$ret$0 = null;
              }
               while (false);
              var tmp1_safe_receiver_1 = tmp$ret$0;
              var tmp2_safe_receiver = tmp1_safe_receiver_1 == null ? null : tmp1_safe_receiver_1.ok8_1;
              var initImageUri = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.y7y_1;
              var tmp3_safe_receiver = element.ok8_1;
              var tmp_7;
              if (tmp3_safe_receiver == null) {
                tmp_7 = null;
              } else {
                var tmp_8;
                if (!(imageUriNow == initImageUri)) {
                  tmp_8 = tmp3_safe_receiver;
                } else {
                  tmp_8 = null;
                }
                tmp_7 = tmp_8;
              }
              var tmp0_safe_receiver_1 = tmp_7;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_1);
              }
            }

            tmp_5.ose_1 = destination;
            this.hd_1 = 2;
            var tmp_9 = this.gse_1.uqn();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzEditViewModel$onClickSave$slambda$slambda_0(this.gse_1, this.ise_1, this.nse_1, this.mse_1, this.hse_1, this.kse_1, this.lse_1, this.ose_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Napier_getInstance().i5e('onClickSave: transaction done');
            var tmp_10 = this;
            tmp_10.pse_1 = this.lse_1;
            this.qse_1 = this.pse_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.qse_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.rse_1 = this.qse_1.e();
            var tmp_11 = this;
            tmp_11.sse_1 = this.rse_1;
            this.tse_1 = this.sse_1.pk8_1;
            if (this.tse_1 == null) {
              this.use_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              var tmp_12 = this;
              tmp_12.vse_1 = this.tse_1;
              var tmp_13 = this;
              tmp_13.wse_1 = this.vse_1;
              this.hd_1 = 4;
              var tmp$ret$2;
              l$ret$3: do {
                var tmp0_iterator_1 = this.kse_1.vs1_1.w();
                while (tmp0_iterator_1.f()) {
                  var element_1 = tmp0_iterator_1.e();
                  var tmp0_safe_receiver_2 = element_1.ok8_1;
                  var tmp_14 = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.w7y_1;
                  var tmp1_safe_receiver_2 = this.sse_1.ok8_1;
                  if (equals(tmp_14, tmp1_safe_receiver_2 == null ? null : tmp1_safe_receiver_2.w7y_1)) {
                    tmp$ret$2 = element_1;
                    break l$ret$3;
                  }
                }
                tmp$ret$2 = null;
              }
               while (false);
              var tmp0_safe_receiver_3 = tmp$ret$2;
              var tmp1_safe_receiver_3 = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.ok8_1;
              suspendResult = this.gse_1.hs1_1.lpb(this.wse_1, null, this.sse_1.qk8_1, tmp1_safe_receiver_3 == null ? null : tmp1_safe_receiver_3.y7y_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.use_1 = this.vse_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.hd_1 = 3;
            continue $sm;
          case 6:
            var tmp_15 = this;
            var this_1 = this.gse_1.js1_1;
            var tmp_16;
            if (this.nse_1) {
              tmp_16 = this_1;
            } else {
              tmp_16 = null;
            }

            tmp_15.xse_1 = tmp_16;
            if (this.xse_1 == null) {
              this.yse_1 = null;
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 7;
              var tmp_17 = this.hse_1.r8d_1;
              var tmp3_safe_receiver_0 = this.mse_1;
              suspendResult = this.xse_1.bos(tmp_17, 125, tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.s8g_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 7:
            var tmp_18 = this;
            tmp_18.yse_1 = Unit_instance;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var tmp_19 = this;
            tmp_19.zse_1 = this.ose_1;
            this.asf_1 = this.zse_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.asf_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.bsf_1 = this.asf_1.e();
            var tmp_20 = this;
            tmp_20.csf_1 = this.bsf_1;
            this.hd_1 = 10;
            var tmp_21 = this.csf_1.w7y_1;
            suspendResult = this.gse_1.js1_1.bos(tmp_21, 6677, this.csf_1.y7y_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            this.hd_1 = 9;
            continue $sm;
          case 11:
            Napier_getInstance().i5e('onClickSave: done');
            this.gse_1.kqt('Course', this.hse_1.r8d_1, this.hse_1);
            return Unit_instance;
          case 12:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 12) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).l78 = function (completion) {
    return new ClazzEditViewModel$onClickSave$slambda(this.gse_1, this.hse_1, this.ise_1, completion);
  };
  function ClazzEditViewModel$onClickSave$slambda_0(this$0, $entity, $initEntity, resultContinuation) {
    var i = new ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$onCourseBlockMoved$slambda(this$0, $newList, resultContinuation) {
    this.nsf_1 = this$0;
    this.osf_1 = $newList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = updateCourseBlockList(this.nsf_1, this.osf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onCourseBlockMoved$slambda(this.nsf_1, this.osf_1, completion);
    i.psf_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$onCourseBlockMoved$slambda_0(this$0, $newList, resultContinuation) {
    var i = new ClazzEditViewModel$onCourseBlockMoved$slambda(this$0, $newList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda(this$0, $updatedBlock, resultContinuation) {
    this.ysf_1 = this$0;
    this.zsf_1 = $updatedBlock;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ysf_1.ks1_1.t2().vs1_1;
            suspendResult = updateCourseBlockList(this.ysf_1, replace_0(tmp_0, this.zsf_1, ClazzEditViewModel$updateCourseBlock$slambda$lambda(this.zsf_1)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$updateCourseBlock$slambda(this.ysf_1, this.zsf_1, completion);
    i.asg_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$updateCourseBlock$slambda_0(this$0, $updatedBlock, resultContinuation) {
    var i = new ClazzEditViewModel$updateCourseBlock$slambda(this$0, $updatedBlock, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this$0, $block, resultContinuation) {
    this.jsg_1 = this$0;
    this.ksg_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.jsg_1.ks1_1.t2().vs1_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (!element.nk8_1.t7x_1.equals(this.ksg_1.nk8_1.t7x_1)) {
                destination.i1(element);
              }
            }

            suspendResult = updateCourseBlockList(this.jsg_1, destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this.jsg_1, this.ksg_1, completion);
    i.lsg_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this$0, $block, resultContinuation) {
    var i = new ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this$0, $block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $updateCourseBlockListCOROUTINE$66(_this__u8e3s4, newCourseBlockList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.psb_1 = _this__u8e3s4;
    this.qsb_1 = newCourseBlockList;
  }
  protoOf($updateCourseBlockListCOROUTINE$66).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            l$ret$1: do {
              var this_0 = this.psb_1.ks1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xs1(VOID, VOID, VOID, VOID, VOID, VOID, this.qsb_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.rsb_1 = this.psb_1.aqn_1;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, ClazzEditViewModel$updateCourseBlockList$slambda_0(this.psb_1, this.qsb_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.rsb_1.dqj('courseblocks', ARGUMENT);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzEditViewModel(di, savedStateHandle, addOrUpdateCourseBlockUseCase, updateCourseBlocksOnReorderOrCommitUseCase, saveContentEntryUseCase, importContentUseCase, enqueueSavePictureUseCase) {
    addOrUpdateCourseBlockUseCase = addOrUpdateCourseBlockUseCase === VOID ? new AddOrUpdateCourseBlockUseCase() : addOrUpdateCourseBlockUseCase;
    updateCourseBlocksOnReorderOrCommitUseCase = updateCourseBlocksOnReorderOrCommitUseCase === VOID ? new UpdateCourseBlocksOnReorderOrCommitUseCase() : updateCourseBlocksOnReorderOrCommitUseCase;
    var tmp;
    if (saveContentEntryUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.d58(tmp$ret$0, 1);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = tmp_3.d58(tmp$ret$2, null).tk2_1;
      // Inline function 'org.kodein.di.instance' call
      var tmp_6 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var tmp$ret$5 = tmp_6.d58(tmp$ret$4, null);
      tmp = new SaveContentEntryUseCase(tmp_2, tmp_5, tmp$ret$5);
    } else {
      tmp = saveContentEntryUseCase;
    }
    saveContentEntryUseCase = tmp;
    var tmp_8;
    if (importContentUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_9 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_10 = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0_0 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
      tmp_8 = tmp_9.d58(tmp$ret$0_0, null);
    } else {
      tmp_8 = importContentUseCase;
    }
    importContentUseCase = tmp_8;
    var tmp_11;
    if (enqueueSavePictureUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_12 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$0_1 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      tmp_11 = tmp_12.d58(tmp$ret$0_1, null);
    } else {
      tmp_11 = enqueueSavePictureUseCase;
    }
    enqueueSavePictureUseCase = tmp_11;
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseEdit');
    this.fs1_1 = addOrUpdateCourseBlockUseCase;
    this.gs1_1 = updateCourseBlocksOnReorderOrCommitUseCase;
    this.hs1_1 = saveContentEntryUseCase;
    this.is1_1 = importContentUseCase;
    this.js1_1 = enqueueSavePictureUseCase;
    this.ks1_1 = MutableStateFlow(new ClazzEditUiState());
    this.ls1_1 = asStateFlow(this.ks1_1);
    var tmp_14 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_15;
    if (tmp1_elvis_lhs == null) {
      var tmp_16 = get_doorPrimaryKeyManager(this.uqn());
      Companion_getInstance_4();
      tmp_15 = tmp_16.n62(6);
    } else {
      tmp_15 = tmp1_elvis_lhs;
    }
    tmp_14.ms1_1 = tmp_15;
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.ns1_1 = Instance(this_0, tmp$ret$10, null).a5d(this, createNewClazzUseCase$factory());
    var tmp_19 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('clazzAction');
    var tmp_20;
    if (tmp0_safe_receiver_0 == null) {
      tmp_20 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.clazzAction.<anonymous>' call
      tmp_20 = valueOf_0(tmp0_safe_receiver_0);
    }
    var tmp1_elvis_lhs_0 = tmp_20;
    tmp_19.os1_1 = tmp1_elvis_lhs_0 == null ? ClazzAction_EDIT_getInstance() : tmp1_elvis_lhs_0;
    var title = this.kqu(strings_getInstance().gnj_1, this.os1_1.equals(ClazzAction_COPY_getInstance()) ? strings_getInstance().znq_1 : strings_getInstance().inj_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_97().tq6_1;
        var nextValue = new AppUiState(VOID, tmp0_loadingState, title, VOID, true);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_21 = ClazzEditViewModel$slambda_0(this, null);
    this.mqo(tmp_21, VOID, VOID, ClazzEditViewModel$slambda_2(savedStateHandle, this, null));
  }
  protoOf(ClazzEditViewModel).os5 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ks1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onEntityChanged.<anonymous>' call
        var tmp2_safe_receiver = prevValue.qs1_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.a8e_1;
        var tmp6_clazzEndDateError = this.lqu(tmp, entity == null ? null : entity.a8e_1, prevValue.ss1_1);
        var tmp0_safe_receiver = prevValue.qs1_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z8d_1;
        var tmp7_clazzStartDateError = this.lqu(tmp_0, entity == null ? null : entity.z8d_1, prevValue.rs1_1);
        var tmp4_safe_receiver = prevValue.qs1_1;
        var tmp_1 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.s8d_1;
        var tmp8_clazzNameError = this.lqu(tmp_1, entity == null ? null : entity.s8d_1, prevValue.ts1_1);
        var nextValue = prevValue.xs1(VOID, entity, tmp7_clazzStartDateError, tmp6_clazzEndDateError, tmp8_clazzNameError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_33.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.rqn();
    tmp_2.hqt_1 = launch(tmp_3, VOID, VOID, ClazzEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEditViewModel).msg = function (checked) {
    var tmp0_safe_receiver = this.ks1_1.t2().qs1_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy_4(tmp0_safe_receiver, ClazzEditViewModel$onCheckedAttendanceChanged$lambda(checked));
    }
    this.os5(tmp);
  };
  protoOf(ClazzEditViewModel).nsg = function () {
    this.iqo('ScheduleEdit', 'Schedule', null, Companion_instance_29.n4r());
  };
  protoOf(ClazzEditViewModel).osg = function (schedule) {
    this.iqo('ScheduleEdit', 'Schedule', schedule, Companion_instance_29.n4r());
  };
  protoOf(ClazzEditViewModel).psg = function (schedule) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.ks1_1.t2().us1_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
      if (!element.uhe_1.equals(schedule.uhe_1)) {
        destination.i1(element);
      }
    }
    var newSchedules = destination;
    this.aqn_1.dqj('schedule', this.m4r().r45(ListSerializer(Companion_instance_29.n4r()), newSchedules));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.ks1_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
        var nextValue = prevValue.xs1(VOID, VOID, VOID, VOID, VOID, newSchedules);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzEditViewModel).qsg = function (blockType) {
    if (blockType === 104) {
      Companion_getInstance_169();
      var tmp = Companion_getInstance_13().n4r();
      Companion_getInstance_116();
      var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().toString());
      Companion_getInstance_116();
      var tmp_1 = to('clazzUid', this.ms1_1.toString());
      Companion_getInstance_174();
      var tmp_2 = to('blockType', (104).toString());
      this.iqo('ContentEntries', 'courseblock', null, tmp, mapOf([tmp_0, tmp_1, tmp_2, to('goToOnContentEntryDone', (1).toString())]));
      return Unit_instance;
    }
    var tmp_3;
    var tmp_4;
    var tmp_5;
    if (blockType === 105) {
      tmp_5 = true;
    } else {
      tmp_5 = blockType === 102;
    }
    if (tmp_5) {
      tmp_4 = true;
    } else {
      tmp_4 = blockType === 100;
    }
    if (tmp_4) {
      Companion_getInstance_174();
      tmp_3 = to('CourseBlockEdit', 'courseblock');
    } else {
      if (blockType === 103) {
        tmp_3 = to('CourseAssignmentEdit', 'courseblock');
      } else {
        return Unit_instance;
      }
    }
    var tmp1_container = tmp_3;
    var viewName = tmp1_container.y6();
    var keyName = tmp1_container.z6();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onAddCourseBlock.<anonymous>' call
    Companion_getInstance_174();
    this_0.s('blockType', blockType.toString());
    Companion_getInstance_116();
    this_0.s('clazzUid', this.ms1_1.toString());
    if (blockType === 103) {
      var tmp0_safe_receiver = this.ks1_1.t2().qs1_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k8g_1;
      if (tmp1_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.also' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onAddCourseBlock.<anonymous>.<anonymous>' call
        this_0.s('terminology', this.m4r().r45(Companion_instance_34.n4r(), tmp1_safe_receiver));
      }
    }
    var tmp2_args = this_0.f3();
    var tmp3_serializer = Companion_getInstance_13().n4r();
    this.iqo(viewName, keyName, null, tmp3_serializer, tmp2_args);
  };
  protoOf(ClazzEditViewModel).asa = function () {
    var tmp0_elvis_lhs = this.ks1_1.t2().qs1_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var initEntity = tmp;
    if (this.dqo().equals(Companion_getInstance_97().tq6_1)) {
      Napier_getInstance().i5e('onClickSave: indeterminate');
      return Unit_instance;
    }
    if (initEntity.z8d_1.equals(new Long(0, 0))) {
      Napier_getInstance().i5e('onClickSave: clazzstarttime = 0');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.ks1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.xs1(VOID, VOID, this.aqo().moj(strings_getInstance().vmn_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (initEntity.a8e_1.c7(initEntity.z8d_1) <= 0) {
      Napier_getInstance().i5e('onClickSave: endbeforestart');
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.ks1_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.xs1(VOID, VOID, VOID, this.aqo().moj(strings_getInstance().mnl_1));
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_2 = initEntity.s8d_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_2 == null ? true : isBlank(this_2)) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.ks1_1;
        while (true) {
          var prevValue_1 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue_1 = prevValue_1.xs1(VOID, VOID, VOID, VOID, this.aqo().moj(strings_getInstance().wnl_1));
          if (this_3.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (hasErrors(this.ks1_1.t2(), this)) {
      Napier_getInstance().i5e('onClickSave: hasErrors');
      return Unit_instance;
    }
    var entity = shallowCopy_4(initEntity, ClazzEditViewModel$onClickSave$lambda(initEntity));
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.ks1_1;
      while (true) {
        var prevValue_2 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
        var nextValue_2 = prevValue_2.xs1(VOID, entity);
        if (this_4.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_0 = ClazzEditViewModel$onClickSave$lambda_0(this);
    this.nqu(tmp_0, ClazzEditViewModel$onClickSave$slambda_0(this, entity, initEntity, null));
  };
  protoOf(ClazzEditViewModel).rsg = function (from, to) {
    // Inline function 'kotlin.apply' call
    var this_0 = toMutableList(this.ks1_1.t2().vs1_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onCourseBlockMoved.<anonymous>' call
    this_0.c2(to, this_0.s1(from));
    var reorderedList = toList(this_0);
    var newList = this.gs1_1.npb(reorderedList, to);
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onCourseBlockMoved$slambda_0(this, newList, null));
  };
  protoOf(ClazzEditViewModel).ssg = function () {
    Companion_getInstance_116();
    var tmp = to('result_key', 'timeZone');
    Companion_getInstance_116();
    this.cqn_1.rp6('TimeZoneList', mapOf([tmp, to('result_viewname', this.bqn_1)]));
  };
  protoOf(ClazzEditViewModel).tsg = function () {
  };
  protoOf(ClazzEditViewModel).usg = function () {
    this.iqo('CourseTerminologyList', 'terminology', null, Companion_instance_34.n4r());
  };
  protoOf(ClazzEditViewModel).vsg = function (block) {
    updateCourseBlock(this, block.zk8(block.nk8_1.hkm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true)));
  };
  protoOf(ClazzEditViewModel).wsg = function (block) {
    updateCourseBlock(this, block.zk8(block.nk8_1.hkm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false)));
  };
  protoOf(ClazzEditViewModel).xsg = function (block) {
    updateCourseBlock(this, block.zk8(block.nk8_1.hkm(VOID, VOID, block.nk8_1.v7x_1 + 1 | 0)));
  };
  protoOf(ClazzEditViewModel).ysg = function (block) {
    updateCourseBlock(this, block.zk8(block.nk8_1.hkm(VOID, VOID, block.nk8_1.v7x_1 - 1 | 0)));
  };
  protoOf(ClazzEditViewModel).zsg = function (block) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this, block, null));
  };
  protoOf(ClazzEditViewModel).ash = function (block) {
    var tmp0_subject = block.nk8_1.u7x_1;
    var tmp;
    var tmp_0;
    var tmp_1;
    if (tmp0_subject === 104) {
      tmp_1 = true;
    } else {
      tmp_1 = tmp0_subject === 105;
    }
    if (tmp_1) {
      tmp_0 = true;
    } else {
      tmp_0 = tmp0_subject === 102;
    }
    if (tmp_0) {
      tmp = true;
    } else {
      tmp = tmp0_subject === 100;
    }
    if (tmp) {
      Companion_getInstance_174();
      var tmp1_nextViewName = 'CourseBlockEdit';
      var tmp2_key = 'courseblock';
      var tmp3_serializer = Companion_getInstance_13().n4r();
      this.iqo(tmp1_nextViewName, tmp2_key, block, tmp3_serializer);
    } else {
      if (tmp0_subject === 103) {
        var tmp4_nextViewName = 'CourseAssignmentEdit';
        var tmp5_key = 'courseblock';
        var tmp6_serializer = Companion_getInstance_13().n4r();
        // Inline function 'kotlin.collections.buildMap' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'kotlin.collections.buildMapInternal' call
        // Inline function 'kotlin.apply' call
        var this_0 = LinkedHashMap_init_$Create$();
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickEditCourseBlock.<anonymous>' call
        Companion_getInstance_116();
        this_0.s('clazzUid', this.ms1_1.toString());
        var tmp0_safe_receiver = this.ks1_1.t2().qs1_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k8g_1;
        if (tmp1_safe_receiver == null)
          null;
        else {
          // Inline function 'kotlin.also' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickEditCourseBlock.<anonymous>.<anonymous>' call
          this_0.s('terminology', this.m4r().r45(Companion_instance_34.n4r(), tmp1_safe_receiver));
        }
        var tmp7_args = this_0.f3();
        this.iqo(tmp4_nextViewName, tmp5_key, block, tmp6_serializer, tmp7_args);
      }
    }
  };
  function CourseBlockUiState(block) {
    this.bsh_1 = block;
  }
  protoOf(CourseBlockUiState).csh = function () {
    var tmp;
    var tmp_0 = this.bsh_1.nk8_1.u7x_1;
    if (!(tmp_0 === 100)) {
      tmp = this.bsh_1.nk8_1.v7x_1 < 3;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockUiState).dsh = function () {
    return this.bsh_1.nk8_1.v7x_1 > 0;
  };
  protoOf(CourseBlockUiState).esh = function () {
    return !this.bsh_1.nk8_1.k7y_1;
  };
  protoOf(CourseBlockUiState).fsh = function () {
    return this.bsh_1.nk8_1.k7y_1;
  };
  function Companion_117() {
    Companion_instance_166 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.dsf_1 = [null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_8()), new ArrayListSerializer($serializer_getInstance_7()), null];
    this.esf_1 = 3;
  }
  protoOf(Companion_117).n4r = function () {
    return $serializer_getInstance_72();
  };
  var Companion_instance_166;
  function Companion_getInstance_134() {
    if (Companion_instance_166 == null)
      new Companion_117();
    return Companion_instance_166;
  }
  function $serializer_60() {
    $serializer_instance_60 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditUiState', this, 8);
    tmp0_serialDesc.t4f('fieldsEnabled', true);
    tmp0_serialDesc.t4f('entity', true);
    tmp0_serialDesc.t4f('clazzStartDateError', true);
    tmp0_serialDesc.t4f('clazzEndDateError', true);
    tmp0_serialDesc.t4f('clazzNameError', true);
    tmp0_serialDesc.t4f('clazzSchedules', true);
    tmp0_serialDesc.t4f('courseBlockList', true);
    tmp0_serialDesc.t4f('timeZone', true);
    this.gsh_1 = tmp0_serialDesc;
  }
  protoOf($serializer_60).q44 = function () {
    return this.gsh_1;
  };
  protoOf($serializer_60).k4g = function () {
    var tmp0_cached = Companion_getInstance_134().dsf_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), get_nullable($serializer_getInstance_9()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), tmp0_cached[5], tmp0_cached[6], StringSerializer_getInstance()];
  };
  protoOf($serializer_60).s44 = function (decoder) {
    var tmp0_desc = this.gsh_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_input = decoder.i48(tmp0_desc);
    var tmp13_cached = Companion_getInstance_134().dsf_1;
    if (tmp12_input.x48()) {
      tmp4_local0 = tmp12_input.k48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.w48(tmp0_desc, 1, $serializer_getInstance_9(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.u48(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.u48(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.s48(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.k48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.w48(tmp0_desc, 1, $serializer_getInstance_9(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.u48(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.u48(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.s48(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.j48(tmp0_desc);
    return ClazzEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, null);
  };
  protoOf($serializer_60).hsh = function (encoder, value) {
    var tmp0_desc = this.gsh_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_134().dsf_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.ps1_1 === false)) {
      tmp1_output.o49(tmp0_desc, 0, value.ps1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.qs1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, $serializer_getInstance_9(), value.qs1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.rs1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.rs1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.ss1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.ss1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.ts1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.ts1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !equals(value.us1_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 5, tmp2_cached[5], value.us1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !equals(value.vs1_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 6, tmp2_cached[6], value.vs1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.ws1_1 === 'UTC')) {
      tmp1_output.w49(tmp0_desc, 7, value.ws1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_60).r44 = function (encoder, value) {
    return this.hsh(encoder, value instanceof ClazzEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_60;
  function $serializer_getInstance_72() {
    if ($serializer_instance_60 == null)
      new $serializer_60();
    return $serializer_instance_60;
  }
  function ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_72().gsh_1);
    }
    if (0 === (seen1 & 1))
      $this.ps1_1 = false;
    else
      $this.ps1_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.qs1_1 = null;
    else
      $this.qs1_1 = entity;
    if (0 === (seen1 & 4))
      $this.rs1_1 = null;
    else
      $this.rs1_1 = clazzStartDateError;
    if (0 === (seen1 & 8))
      $this.ss1_1 = null;
    else
      $this.ss1_1 = clazzEndDateError;
    if (0 === (seen1 & 16))
      $this.ts1_1 = null;
    else
      $this.ts1_1 = clazzNameError;
    if (0 === (seen1 & 32))
      $this.us1_1 = emptyList();
    else
      $this.us1_1 = clazzSchedules;
    if (0 === (seen1 & 64))
      $this.vs1_1 = emptyList();
    else
      $this.vs1_1 = courseBlockList;
    if (0 === (seen1 & 128))
      $this.ws1_1 = 'UTC';
    else
      $this.ws1_1 = timeZone;
    return $this;
  }
  function ClazzEditUiState_init_$Create$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker) {
    return ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, objectCreate(protoOf(ClazzEditUiState)));
  }
  function ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    Companion_getInstance_134();
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    entity = entity === VOID ? null : entity;
    clazzStartDateError = clazzStartDateError === VOID ? null : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? null : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? null : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? emptyList() : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? emptyList() : courseBlockList;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.ps1_1 = fieldsEnabled;
    this.qs1_1 = entity;
    this.rs1_1 = clazzStartDateError;
    this.ss1_1 = clazzEndDateError;
    this.ts1_1 = clazzNameError;
    this.us1_1 = clazzSchedules;
    this.vs1_1 = courseBlockList;
    this.ws1_1 = timeZone;
  }
  protoOf(ClazzEditUiState).ish = function () {
    var tmp;
    var tmp0_safe_receiver = this.qs1_1;
    var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b8e_1;
    Companion_getInstance_4();
    if (equals(tmp_0, new Long(1, 0))) {
      Companion_getInstance_4();
      var tmp_1 = new Long(1, 0);
      Companion_getInstance_4();
      tmp = tmp_1.equals(new Long(1, 0));
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzEditUiState).jsh = function (courseBlockAndEditEntities) {
    return new CourseBlockUiState(courseBlockAndEditEntities);
  };
  protoOf(ClazzEditUiState).ksh = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    return new ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).xs1 = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.ps1_1 : fieldsEnabled;
    entity = entity === VOID ? this.qs1_1 : entity;
    clazzStartDateError = clazzStartDateError === VOID ? this.rs1_1 : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? this.ss1_1 : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? this.ts1_1 : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? this.us1_1 : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? this.vs1_1 : courseBlockList;
    timeZone = timeZone === VOID ? this.ws1_1 : timeZone;
    return $super === VOID ? this.ksh(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) : $super.ksh.call(this, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).toString = function () {
    return 'ClazzEditUiState(fieldsEnabled=' + this.ps1_1 + ', entity=' + this.qs1_1 + ', clazzStartDateError=' + this.rs1_1 + ', clazzEndDateError=' + this.ss1_1 + ', clazzNameError=' + this.ts1_1 + ', clazzSchedules=' + this.us1_1 + ', courseBlockList=' + this.vs1_1 + ', timeZone=' + this.ws1_1 + ')';
  };
  protoOf(ClazzEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.ps1_1);
    result = imul(result, 31) + (this.qs1_1 == null ? 0 : this.qs1_1.hashCode()) | 0;
    result = imul(result, 31) + (this.rs1_1 == null ? 0 : getStringHashCode(this.rs1_1)) | 0;
    result = imul(result, 31) + (this.ss1_1 == null ? 0 : getStringHashCode(this.ss1_1)) | 0;
    result = imul(result, 31) + (this.ts1_1 == null ? 0 : getStringHashCode(this.ts1_1)) | 0;
    result = imul(result, 31) + hashCode(this.us1_1) | 0;
    result = imul(result, 31) + hashCode(this.vs1_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ws1_1) | 0;
    return result;
  };
  protoOf(ClazzEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEditUiState ? other : THROW_CCE();
    if (!(this.ps1_1 === tmp0_other_with_cast.ps1_1))
      return false;
    if (!equals(this.qs1_1, tmp0_other_with_cast.qs1_1))
      return false;
    if (!(this.rs1_1 == tmp0_other_with_cast.rs1_1))
      return false;
    if (!(this.ss1_1 == tmp0_other_with_cast.ss1_1))
      return false;
    if (!(this.ts1_1 == tmp0_other_with_cast.ts1_1))
      return false;
    if (!equals(this.us1_1, tmp0_other_with_cast.us1_1))
      return false;
    if (!equals(this.vs1_1, tmp0_other_with_cast.vs1_1))
      return false;
    if (!(this.ws1_1 === tmp0_other_with_cast.ws1_1))
      return false;
    return true;
  };
  function createNewClazzUseCase$factory() {
    return getPropertyCallableRef('createNewClazzUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewClazzUseCase__mo489e(receiver);
    }, null);
  }
  function createNewClazzUseCase$factory_0() {
    return getPropertyCallableRef('createNewClazzUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewClazzUseCase__mo489e(receiver);
    }, null);
  }
  function get_COMPLETABLE_BLOCK_TYPES() {
    _init_properties_BlockStatusExt_kt__pb774u();
    return COMPLETABLE_BLOCK_TYPES;
  }
  var COMPLETABLE_BLOCK_TYPES;
  function aggregateIfModule(_this__u8e3s4, blockUid, blocks) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = blocks.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        if (element.t7x_1.equals(blockUid)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return null;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var block = tmp;
    var tmp_0;
    var tmp_1 = block.u7x_1;
    if (tmp_1 === 100) {
      var tmp$ret$2;
      $l$block_0: {
        // Inline function 'kotlin.collections.count' call
        var tmp_2;
        if (isInterface(blocks, Collection)) {
          tmp_2 = blocks.c1();
        } else {
          tmp_2 = false;
        }
        if (tmp_2) {
          tmp$ret$2 = 0;
          break $l$block_0;
        }
        var count = 0;
        var tmp0_iterator_0 = blocks.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
          if (element_0.w7x_1.equals(blockUid)) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$2 = count;
      }
      var moduleBlockCount = tmp$ret$2;
      if (moduleBlockCount === 0)
        return null;
      // Inline function 'kotlin.collections.associateBy' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator_1 = blocks.w();
      while (tmp0_iterator_1.f()) {
        var element_1 = tmp0_iterator_1.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        if (element_1.w7x_1.equals(blockUid)) {
          destination.i1(element_1);
        }
      }
      var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination, 10)), 16);
      // Inline function 'kotlin.collections.associateByTo' call
      var destination_0 = LinkedHashMap_init_$Create$_0(capacity);
      var tmp0_iterator_2 = destination.w();
      while (tmp0_iterator_2.f()) {
        var element_2 = tmp0_iterator_2.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        var tmp$ret$7 = element_2.t7x_1;
        destination_0.s(tmp$ret$7, element_2);
      }
      var moduleBlockUids = destination_0;
      var numBlocksWithScoreResult = 0;
      var numBlocksWithScore = 0;
      var numModsComplete = 0;
      var numBlocksSuccessSet = 0;
      var numBlocksSuccess = 0;
      var numBlocksFailed = 0;
      var totalPointsScored = 0.0;
      var maxPointsInModule = 0.0;
      var numCompleteableBlocksInModule = 0;
      // Inline function 'kotlin.collections.forEach' call
      var tmp0_iterator_3 = _this__u8e3s4.w();
      while (tmp0_iterator_3.f()) {
        var element_3 = tmp0_iterator_3.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        if (moduleBlockUids.o2().a1(element_3.xax_1)) {
          var blockForStatus = moduleBlockUids.q(element_3.xax_1);
          if ((blockForStatus == null ? null : isCompleteable(blockForStatus)) === true) {
            numCompleteableBlocksInModule = numCompleteableBlocksInModule + 1 | 0;
          }
          var tmp3_safe_receiver = blockForStatus == null ? null : blockForStatus.e7y_1;
          if (tmp3_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>.<anonymous>' call
            maxPointsInModule = maxPointsInModule + tmp3_safe_receiver;
            numBlocksWithScore = numBlocksWithScore + 1 | 0;
          }
          var tmp4_safe_receiver = element_3.bay_1;
          if (tmp4_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>.<anonymous>' call
            var tmp_3 = totalPointsScored;
            var tmp1_elvis_lhs = blockForStatus == null ? null : blockForStatus.e7y_1;
            totalPointsScored = tmp_3 + tmp4_safe_receiver * (tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs);
            numBlocksWithScoreResult = numBlocksWithScoreResult + 1 | 0;
          }
          if (element_3.zax_1) {
            numModsComplete = numModsComplete + 1 | 0;
          }
          var tmp6_safe_receiver = element_3.aay_1;
          if (tmp6_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>.<anonymous>' call
            numBlocksSuccessSet = numBlocksSuccessSet + 1 | 0;
            if (tmp6_safe_receiver) {
              numBlocksSuccess = numBlocksSuccess + 1 | 0;
            } else {
              numBlocksFailed = numBlocksFailed + 1 | 0;
            }
          }
        }
      }
      var isModuleComplete = numCompleteableBlocksInModule > 0 ? numCompleteableBlocksInModule === numModsComplete : false;
      var tmp1_safe_receiver = firstOrNull(_this__u8e3s4);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.wax_1;
      var tmp3_sPersonUid = tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs;
      var tmp_4;
      if (!(maxPointsInModule === 0.0)) {
        tmp_4 = totalPointsScored / maxPointsInModule;
      } else {
        tmp_4 = null;
      }
      var tmp4_sScoreScaled = tmp_4;
      var tmp5_sIsSuccess = (isModuleComplete ? numBlocksSuccess === numBlocksSuccessSet : false) ? true : (isModuleComplete ? numBlocksFailed > 0 : false) ? false : null;
      tmp_0 = new BlockStatus(tmp3_sPersonUid, blockUid, VOID, isModuleComplete, tmp5_sIsSuccess, tmp4_sScoreScaled);
    } else {
      var tmp$ret$14;
      $l$block_1: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_4 = _this__u8e3s4.w();
        while (tmp0_iterator_4.f()) {
          var element_4 = tmp0_iterator_4.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
          if (element_4.xax_1.equals(blockUid)) {
            tmp$ret$14 = element_4;
            break $l$block_1;
          }
        }
        tmp$ret$14 = null;
      }
      tmp_0 = tmp$ret$14;
    }
    return tmp_0;
  }
  function displayMarkFor(_this__u8e3s4, maxPoints) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var tmp0_safe_receiver = markFor(_this__u8e3s4, maxPoints);
    return tmp0_safe_receiver == null ? null : toDisplayString(tmp0_safe_receiver);
  }
  function isCompleteable(_this__u8e3s4) {
    _init_properties_BlockStatusExt_kt__pb774u();
    return get_COMPLETABLE_BLOCK_TYPES().a1(_this__u8e3s4.u7x_1);
  }
  function markFor(_this__u8e3s4, maxPoints) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var scaledMarkVal = _this__u8e3s4.bay_1;
    var tmp;
    if (!(scaledMarkVal == null) ? !(maxPoints == null) : false) {
      tmp = scaledMarkVal * maxPoints;
    } else {
      tmp = null;
    }
    return tmp;
  }
  var properties_initialized_BlockStatusExt_kt_h05ldo;
  function _init_properties_BlockStatusExt_kt__pb774u() {
    if (!properties_initialized_BlockStatusExt_kt_h05ldo) {
      properties_initialized_BlockStatusExt_kt_h05ldo = true;
      COMPLETABLE_BLOCK_TYPES = listOf([104, 103]);
    }
  }
  function $loadCOROUTINE$67(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tsh_1 = _this__u8e3s4;
    this.ush_1 = params;
  }
  protoOf($loadCOROUTINE$67).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.tsh_1.j6c();
            this.hd_1 = 1;
            suspendResult = this.tsh_1.bsi_1.p54(this.ush_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vsh_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.tsh_1.csi_1.j7e();
            var tmp_1 = this.vsh_1;
            var tmp0_safe_receiver = tmp_1 instanceof Page ? tmp_1 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c54_1;
            var tmp_2;
            if (tmp1_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = tmp1_safe_receiver.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_safe_receiver_0 = element.a96_1;
                var tmp0_safe_receiver_1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.f96_1;
                if (tmp0_safe_receiver_1 == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver_1);
                }
              }
              tmp_2 = destination;
            }

            var tmp2_elvis_lhs = tmp_2;
            suspendResult = tmp_0.nje(this.tsh_1.dsi_1, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs, this.tsh_1.esi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var blockResults = suspendResult;
            var tmp3_subject = this.vsh_1;
            var tmp_3;
            if (tmp3_subject instanceof Page) {
              var tmp_4 = this.vsh_1;
              var studentListResultCasted = tmp_4 instanceof Page ? tmp_4 : THROW_CCE();
              var this_0 = studentListResultCasted.c54_1;
              var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
              var tmp0_iterator_0 = this_0.w();
              while (tmp0_iterator_0.f()) {
                var item = tmp0_iterator_0.e();
                var destination_1 = ArrayList_init_$Create$();
                var tmp0_iterator_1 = blockResults.w();
                while (tmp0_iterator_1.f()) {
                  var element_0 = tmp0_iterator_1.e();
                  var tmp_5 = element_0.wax_1;
                  var tmp0_safe_receiver_2 = item.a96_1;
                  if (tmp_5.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.f96_1)) {
                    destination_1.i1(element_0);
                  }
                }
                destination_0.i1(new StudentAndBlockStatuses(item, destination_1));
              }
              tmp_3 = new Page(destination_0, studentListResultCasted.d54_1, studentListResultCasted.e54_1, studentListResultCasted.f54_1, studentListResultCasted.g54_1);
            } else {
              if (tmp3_subject instanceof Error_0) {
                tmp_3 = new Error_0(this.vsh_1.b54_1);
              } else {
                if (tmp3_subject instanceof Invalid) {
                  tmp_3 = new Invalid();
                } else {
                  throw IllegalStateException_init_$Create$("Cant get here really, but compiler doesn't know that");
                }
              }
            }

            var tmp_6 = tmp_3;
            return tmp_6 instanceof LoadResult ? tmp_6 : THROW_CCE();
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $loadHttpCOROUTINE$68(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.nsi_1 = _this__u8e3s4;
    this.osi_1 = params;
  }
  protoOf($loadHttpCOROUTINE$68).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = this.nsi_1.bsi_1;
            tmp_0.psi_1 = isInterface(tmp_1, PagingSourceWithHttpLoader) ? tmp_1 : null;
            if (this.psi_1 == null) {
              this.qsi_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.psi_1.y6e(this.osi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.qsi_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp1_elvis_lhs = this.qsi_1;
            return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzGradebookPagingSource(studentListPagingSource, db, clazzUid, accountPersonUid) {
    DelegatedInvalidationPagingSource.call(this, studentListPagingSource);
    this.bsi_1 = studentListPagingSource;
    this.csi_1 = db;
    this.dsi_1 = clazzUid;
    this.esi_1 = accountPersonUid;
  }
  protoOf(ClazzGradebookPagingSource).rsi = function (params, $completion) {
    var tmp = new $loadCOROUTINE$67(this, params, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookPagingSource).p54 = function (params, $completion) {
    return this.rsi(params, $completion);
  };
  protoOf(ClazzGradebookPagingSource).x6e = function (params, $completion) {
    var tmp = new $loadHttpCOROUTINE$68(this, params, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookPagingSource).y6e = function (params, $completion) {
    return this.x6e(params, $completion);
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.asj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).csj = function (courseBlockList, $completion) {
    var tmp = this.dsj(courseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.csj((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.asj_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ksk(this.bsj_1, this.asj_1.fsk_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).dsj = function (courseBlockList, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this.asj_1, completion);
    i.bsj_1 = courseBlockList;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (courseBlockList, $completion) {
      return i.csj(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.tsk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).brf = function (it, $completion) {
    var tmp = this.crf(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.brf((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.tsk_1.eqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mq6(VOID, VOID, this.usk_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).crf = function (it, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this.tsk_1, completion);
    i.usk_1 = it;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.brf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.dsl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.dsl_1.wqn().p7d().ocl(this.dsl_1.esk_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this.dsl_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_11(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda(this.dsl_1, completion);
    i.esl_1 = $this$launch;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.nsl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.nsl_1.wqn().o7d().b8d(this.nsl_1.esk_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this.nsl_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_11(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda_1(this.nsl_1, completion);
    i.osl_1 = $this$launch;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.xsl_1 = $this_launch;
    this.ysl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.xsl_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_0(this.ysl_1, null));
          launch(this.xsl_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_2(this.ysl_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).l78 = function (completion) {
    return new ClazzGradebookViewModel$slambda$slambda(this.xsl_1, this.ysl_1, completion);
  };
  function ClazzGradebookViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_118() {
    this.zsl_1 = 'Gradebook';
  }
  var Companion_instance_167;
  function Companion_getInstance_135() {
    return Companion_instance_167;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_11(function_0) {
    this.asm_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_11).t1d = function (value, $completion) {
    return this.asm_1(value, $completion);
  };
  function ClazzGradebookViewModel$studentPagingSource$lambda(this$0) {
    return function () {
      var tmp = this$0.wqn().t7d();
      return new ClazzGradebookPagingSource(tmp.k93(this$0.esk_1, 1000, 1, '%', 0, this$0.sqn(), systemTimeInMillis()), this$0.uqn(), this$0.esk_1, this$0.sqn());
    };
  }
  function ClazzGradebookViewModel$slambda(this$0, resultContinuation) {
    this.jsm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.jsm_1.vqv_1, ClazzGradebookViewModel$slambda$slambda_0(this.ksm_1, this.jsm_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda(this.jsm_1, completion);
    i.ksm_1 = $this$launch;
    return i;
  };
  function ClazzGradebookViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzGradebookUiState(), 'Gradebook');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.esk_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.fsk_1 = ClazzGradebookViewModel$studentPagingSource$lambda(this);
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, ClazzGradebookViewModel$slambda_0(this, null));
  }
  protoOf(ClazzGradebookViewModel).pqw = function (searchText) {
  };
  protoOf(ClazzGradebookViewModel).qqw = function () {
  };
  function ClazzGradebookUiState$_init_$lambda_aseg4q() {
    return new EmptyPagingSource();
  }
  function ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale) {
    courseBlocks = courseBlocks === VOID ? emptyList() : courseBlocks;
    var tmp;
    if (results === VOID) {
      tmp = ClazzGradebookUiState$_init_$lambda_aseg4q;
    } else {
      tmp = results;
    }
    results = tmp;
    isFullScreen = isFullScreen === VOID ? false : isFullScreen;
    scale = scale === VOID ? 1.0 : scale;
    this.gsk_1 = courseBlocks;
    this.hsk_1 = results;
    this.isk_1 = isFullScreen;
    this.jsk_1 = scale;
  }
  protoOf(ClazzGradebookUiState).lsm = function (courseBlocks, results, isFullScreen, scale) {
    return new ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).ksk = function (courseBlocks, results, isFullScreen, scale, $super) {
    courseBlocks = courseBlocks === VOID ? this.gsk_1 : courseBlocks;
    results = results === VOID ? this.hsk_1 : results;
    isFullScreen = isFullScreen === VOID ? this.isk_1 : isFullScreen;
    scale = scale === VOID ? this.jsk_1 : scale;
    return $super === VOID ? this.lsm(courseBlocks, results, isFullScreen, scale) : $super.lsm.call(this, courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).toString = function () {
    return 'ClazzGradebookUiState(courseBlocks=' + this.gsk_1 + ', results=' + this.hsk_1 + ', isFullScreen=' + this.isk_1 + ', scale=' + this.jsk_1 + ')';
  };
  protoOf(ClazzGradebookUiState).hashCode = function () {
    var result = hashCode(this.gsk_1);
    result = imul(result, 31) + hashCode(this.hsk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isk_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.jsk_1) | 0;
    return result;
  };
  protoOf(ClazzGradebookUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzGradebookUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzGradebookUiState ? other : THROW_CCE();
    if (!equals(this.gsk_1, tmp0_other_with_cast.gsk_1))
      return false;
    if (!equals(this.hsk_1, tmp0_other_with_cast.hsk_1))
      return false;
    if (!(this.isk_1 === tmp0_other_with_cast.isk_1))
      return false;
    if (!equals(this.jsk_1, tmp0_other_with_cast.jsk_1))
      return false;
    return true;
  };
  function get_thumbnailUri(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.icp_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z7y_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.kcp_1;
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.gax_1;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    return tmp;
  }
  function maxScoreForBlock(_this__u8e3s4, block) {
    var blockVal = block.hcp_1;
    var tmp;
    var tmp_0 = blockVal == null ? null : blockVal.u7x_1;
    if (tmp_0 === 100) {
      var tmp$ret$0;
      $l$block: {
        // Inline function 'kotlin.collections.count' call
        var tmp_1;
        if (isInterface(_this__u8e3s4, Collection)) {
          tmp_1 = _this__u8e3s4.c1();
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp$ret$0 = 0;
          break $l$block;
        }
        var count = 0;
        var tmp0_iterator = _this__u8e3s4.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.maxScoreForBlock.<anonymous>' call
          var tmp_2;
          var tmp0_safe_receiver = element.hcp_1;
          if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w7x_1, blockVal.t7x_1)) {
            var tmp1_safe_receiver = element.hcp_1;
            tmp_2 = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.e7y_1) == null);
          } else {
            tmp_2 = false;
          }
          if (tmp_2) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$0 = count;
      }
      var numBlocksWithScore = tmp$ret$0;
      var tmp_3;
      if (numBlocksWithScore === 0) {
        tmp_3 = null;
      } else {
        // Inline function 'kotlin.collections.sumOf' call
        var sum = 0.0;
        var tmp0_iterator_0 = _this__u8e3s4.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          var tmp_4 = sum;
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.maxScoreForBlock.<anonymous>' call
          var tmp0_safe_receiver_0 = element_0.hcp_1;
          var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.e7y_1;
          var tmp_5;
          if (tmp1_safe_receiver_0 == null) {
            tmp_5 = null;
          } else {
            // Inline function 'kotlin.takeIf' call
            // Inline function 'kotlin.contracts.contract' call
            var tmp_6;
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.maxScoreForBlock.<anonymous>.<anonymous>' call
            var tmp0_safe_receiver_1 = element_0.hcp_1;
            if (equals(tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.w7x_1, blockVal.t7x_1)) {
              tmp_6 = tmp1_safe_receiver_0;
            } else {
              tmp_6 = null;
            }
            tmp_5 = tmp_6;
          }
          var tmp2_safe_receiver = tmp_5;
          var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver;
          sum = tmp_4 + (tmp3_elvis_lhs == null ? 0.0 : tmp3_elvis_lhs);
        }
        tmp_3 = sum;
      }
      tmp = tmp_3;
    } else {
      tmp = blockVal == null ? null : blockVal.e7y_1;
    }
    return tmp;
  }
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.usm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).wsm = function (inviteAndClazz, $completion) {
    var tmp = this.xsm(inviteAndClazz, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wsm((p1 == null ? true : p1 instanceof ClazzInviteAndClazz) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.usm_1.eqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              var tmp0_safe_receiver = this.vsm_1;
              if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1) == null)) {
                tmp_0 = Companion_getInstance_97().uq6_1;
              } else {
                tmp_0 = Companion_getInstance_97().tq6_1;
              }
              var nextValue = prevValue.mq6(VOID, tmp_0);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.usm_1.tsn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_0 = this.vsm_1;
              var nextValue_0 = prevValue_0.aso(this.vsm_1, !((tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.p9n_1) == null));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).xsm = function (inviteAndClazz, completion) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this.usm_1, completion);
    i.vsm_1 = inviteAndClazz;
    return i;
  };
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (inviteAndClazz, $completion) {
      return i.wsm(inviteAndClazz, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.jso_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.jso_1.wqn().e7g().k9m(this.jso_1.wsn_1);
            var tmp_1 = ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda_0(this.jso_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_12(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).l78 = function (completion) {
    return new ClazzInviteRedeemViewModel$lambda$slambda$slambda(this.jso_1, completion);
  };
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_clazzInviteRedeemUseCase__c3cagh($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vsn_1;
    clazzInviteRedeemUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_119() {
    this.kso_1 = 'ClazzInviteRedeem';
  }
  var Companion_instance_168;
  function Companion_getInstance_136() {
    return Companion_instance_168;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_12(function_0) {
    this.lso_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_12).t1d = function (value, $completion) {
    return this.lso_1(value, $completion);
  };
  function ClazzInviteRedeemViewModel$lambda$slambda(this$0, resultContinuation) {
    this.uso_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.uso_1.tsn_1, ClazzInviteRedeemViewModel$lambda$slambda$slambda_0(this.uso_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda(this.uso_1, completion);
    i.vso_1 = $this$launch;
    return i;
  };
  function ClazzInviteRedeemViewModel$lambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteredeem.ClazzInviteRedeemViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.rqn();
      launch(tmp, VOID, VOID, ClazzInviteRedeemViewModel$lambda$slambda_0(this$0, null));
      return Unit_instance;
    };
  }
  function ClazzInviteRedeemViewModel$processDecision$slambda(this$0, $isAccepting, resultContinuation) {
    this.esp_1 = this$0;
    this.fsp_1 = $isAccepting;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            l$ret$1: do {
              var this_0 = this.esp_1.tsn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.aso(VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_clazzInviteRedeemUseCase__c3cagh(this.esp_1).ppg(this.esp_1.wsn_1, this.fsp_1, this.esp_1.qqn().joa().vky_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            this.esp_1.yqn().bq7(new Snack(result.qpg_1));
            Companion_getInstance_140();
            this.esp_1.cqn_1.lq9('CourseListHome', emptyMap(), new UstadGoOptions(VOID, VOID, true));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              l$ret$3: do {
                var this_1 = this.esp_1.tsn_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var tmp0_errorText = stringResourceOrMessage(e, this.esp_1.aqo());
                  var nextValue_0 = prevValue_0.aso(VOID, true, tmp0_errorText);
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzInviteRedeemViewModel$processDecision$slambda(this.esp_1, this.fsp_1, completion);
    i.gsp_1 = $this$launch;
    return i;
  };
  function ClazzInviteRedeemViewModel$processDecision$slambda_0(this$0, $isAccepting, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$processDecision$slambda(this$0, $isAccepting, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'ClazzInviteRedeem');
    this.tsn_1 = MutableStateFlow(new ClazzInviteRedeemUiState());
    this.usn_1 = asStateFlow(this.tsn_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ClazzInviteRedeemUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.vsn_1 = Instance(this_0, tmp$ret$0, null).a5d(this, clazzInviteRedeemUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_125();
    var tmp0_elvis_lhs = savedStateHandle.ba('inviteCode');
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('no invite code');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    tmp_1.wsn_1 = tmp_2;
    Companion_getInstance_125();
    var tmp_3 = mapOf_0(to('inviteCode', this.wsn_1));
    this.pqo(false, tmp_3, ClazzInviteRedeemViewModel$lambda(this));
  }
  protoOf(ClazzInviteRedeemViewModel).hsp = function (isAccepting) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.rqn();
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteredeem.ClazzInviteRedeemViewModel.processDecision.<anonymous>' call
    if (this.tsn_1.t2().ysn_1) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      launch(tmp0_safe_receiver, VOID, VOID, ClazzInviteRedeemViewModel$processDecision$slambda_0(this, isAccepting, null));
    }
  };
  function ClazzInviteRedeemUiState(clazzInvite, enabled, errorText) {
    clazzInvite = clazzInvite === VOID ? null : clazzInvite;
    enabled = enabled === VOID ? false : enabled;
    errorText = errorText === VOID ? null : errorText;
    this.xsn_1 = clazzInvite;
    this.ysn_1 = enabled;
    this.zsn_1 = errorText;
  }
  protoOf(ClazzInviteRedeemUiState).isp = function () {
    var tmp0_safe_receiver = this.xsn_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j9n_1;
    return tmp === 0;
  };
  protoOf(ClazzInviteRedeemUiState).jsp = function () {
    var tmp;
    if (this.ysn_1) {
      var tmp0_safe_receiver = this.xsn_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1;
      var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j9n_1;
      tmp = tmp_0 === 0;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzInviteRedeemUiState).ksp = function () {
    var tmp;
    var tmp0_safe_receiver = this.xsn_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1) == null)) {
      var tmp1_safe_receiver = this.xsn_1.p9n_1;
      var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j9n_1;
      tmp = !(tmp_0 === 0);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzInviteRedeemUiState).lsp = function (clazzInvite, enabled, errorText) {
    return new ClazzInviteRedeemUiState(clazzInvite, enabled, errorText);
  };
  protoOf(ClazzInviteRedeemUiState).aso = function (clazzInvite, enabled, errorText, $super) {
    clazzInvite = clazzInvite === VOID ? this.xsn_1 : clazzInvite;
    enabled = enabled === VOID ? this.ysn_1 : enabled;
    errorText = errorText === VOID ? this.zsn_1 : errorText;
    return $super === VOID ? this.lsp(clazzInvite, enabled, errorText) : $super.lsp.call(this, clazzInvite, enabled, errorText);
  };
  protoOf(ClazzInviteRedeemUiState).toString = function () {
    return 'ClazzInviteRedeemUiState(clazzInvite=' + this.xsn_1 + ', enabled=' + this.ysn_1 + ', errorText=' + this.zsn_1 + ')';
  };
  protoOf(ClazzInviteRedeemUiState).hashCode = function () {
    var result = this.xsn_1 == null ? 0 : this.xsn_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.ysn_1) | 0;
    result = imul(result, 31) + (this.zsn_1 == null ? 0 : getStringHashCode(this.zsn_1)) | 0;
    return result;
  };
  protoOf(ClazzInviteRedeemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzInviteRedeemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzInviteRedeemUiState ? other : THROW_CCE();
    if (!equals(this.xsn_1, tmp0_other_with_cast.xsn_1))
      return false;
    if (!(this.ysn_1 === tmp0_other_with_cast.ysn_1))
      return false;
    if (!(this.zsn_1 == tmp0_other_with_cast.zsn_1))
      return false;
    return true;
  };
  function clazzInviteRedeemUseCase$factory() {
    return getPropertyCallableRef('clazzInviteRedeemUseCase', 1, KProperty1, function (receiver) {
      return _get_clazzInviteRedeemUseCase__c3cagh(receiver);
    }, null);
  }
  function clazzInviteRedeemUseCase$factory_0() {
    return getPropertyCallableRef('clazzInviteRedeemUseCase', 1, KProperty1, function (receiver) {
      return _get_clazzInviteRedeemUseCase__c3cagh(receiver);
    }, null);
  }
  function _get_parseInviteUseCase__fcfumo($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hsq_1;
    parseInviteUseCase$factory_0();
    return this_0.t2();
  }
  function _get_sendClazzInvitesUseCase__utu0z8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.isq_1;
    sendClazzInvitesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_hideKeyboardUseCase__8r7d6l($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nsq_1;
    hideKeyboardUseCase$factory_0();
    return this_0.t2();
  }
  function sendContactsToServer($this, contacts, $completion) {
    var tmp = new $sendContactsToServerCOROUTINE$69($this, contacts, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_120() {
    this.zsq_1 = 'invite_via_contact';
    this.asr_1 = 'person_role';
    this.bsr_1 = 'clazz_uid';
  }
  var Companion_instance_169;
  function Companion_getInstance_137() {
    return Companion_instance_169;
  }
  function ClazzInviteViaContactViewModel$onClickSend$ref($boundThis) {
    var l = function () {
      $boundThis.csr();
      return Unit_instance;
    };
    l.callableName = 'onClickSend';
    return l;
  }
  function ClazzInviteViaContactViewModel$onClickSend$slambda(this$0, resultContinuation) {
    this.lsr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteViaContactViewModel$onClickSend$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteViaContactViewModel$onClickSend$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteViaContactViewModel$onClickSend$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp0_safe_receiver = _get_hideKeyboardUseCase__8r7d6l(this.lsr_1);
            if (tmp0_safe_receiver == null)
              null;
            else {
              tmp0_safe_receiver.ype();
            }

            this.nsr_1 = this.lsr_1.lsq_1.t2().rsr_1;
            if (this.nsr_1.c1()) {
              this.osr_1 = this.lsr_1.lsq_1.t2().ssr_1;
              var this_0 = this.osr_1;
              if (!(this_0 == null ? true : isBlank(this_0))) {
                this.psr_1 = _get_parseInviteUseCase__fcfumo(this.lsr_1).up9(this.osr_1);
                this.hd_1 = 4;
                suspendResult = sendContactsToServer(this.lsr_1, this.psr_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 3;
                continue $sm;
              }
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            suspendResult = sendContactsToServer(this.lsr_1, this.nsr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            var noContactFoundMessage = this.lsr_1.aqo().moj(strings_getInstance().hnr_1);
            l$ret$1: do {
              var this_1 = this.lsr_1.lsq_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.tsr(noContactFoundMessage);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.lsr_1.usr(noContactFoundMessage);
            return Unit_instance;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzInviteViaContactViewModel$onClickSend$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzInviteViaContactViewModel$onClickSend$slambda(this.lsr_1, completion);
    i.msr_1 = $this$launch;
    return i;
  };
  function ClazzInviteViaContactViewModel$onClickSend$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteViaContactViewModel$onClickSend$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $sendContactsToServerCOROUTINE$69(_this__u8e3s4, contacts, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wsq_1 = _this__u8e3s4;
    this.xsq_1 = contacts;
  }
  protoOf($sendContactsToServerCOROUTINE$69).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.xsq_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (element.wsr_1) {
                destination.i1(element);
              }
            }

            tmp_0.ysq_1 = destination;
            if (this.ysq_1.c1()) {
              var noValidContactFoundMessage = this.wsq_1.aqo().moj(strings_getInstance().gnr_1);
              l$ret$1: do {
                var this_1 = this.wsq_1.lsq_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.tsr(noValidContactFoundMessage);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.wsq_1.usr(noValidContactFoundMessage);
              return Unit_instance;
            }

            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_1 = _get_sendClazzInvitesUseCase__utu0z8(this.wsq_1);
            var this_2 = this.ysq_1;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator_0 = this_2.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(item.vsr_1);
            }

            suspendResult = tmp_1.qph(new SendClazzInvitesRequest(destination_0, this.wsq_1.jsq_1, this.wsq_1.ksq_1, this.wsq_1.qqn().uo9().onu_1.f96_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wsq_1.yqn().bq7(new Snack(this.wsq_1.aqo().moj(strings_getInstance().hns_1)));
            Companion_getInstance_204();
            this.wsq_1.cqn_1.mq9('People', true);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Error) {
              var e = this.kd_1;
              var tmp_3 = this.wsq_1.yqn();
              var tmp_4 = this.wsq_1.aqo().moj(strings_getInstance().qmi_1);
              var tmp0_elvis_lhs = e.message;
              tmp_3.bq7(new Snack(tmp_4 + ': ' + (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function ClazzInviteViaContactViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'invite_via_contact');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ParseInviteUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.hsq_1 = Instance(this, tmp$ret$0, null).a5d(this, parseInviteUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SendClazzInvitesUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.isq_1 = Instance(this_0, tmp$ret$2, null).a5d(this, sendClazzInvitesUseCase$factory());
    var tmp_3 = this;
    var tmp0_safe_receiver = savedStateHandle.ba('clazz_uid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.jsq_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_4 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('person_role');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_4.ksq_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    this.lsq_1 = MutableStateFlow(new ClazzInviteViaContactUiState());
    this.msq_1 = asStateFlow(this.lsq_1);
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(HideKeyboardUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.nsq_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, hideKeyboardUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, this.aqo().moj(strings_getInstance().cnr_1), VOID, true);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.<anonymous>' call
        var tmp_7 = this.aqo().moj(strings_getInstance().zml_1);
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_7, VOID, ClazzInviteViaContactViewModel$onClickSend$ref(this)));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzInviteViaContactViewModel).csr = function () {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzInviteViaContactViewModel$onClickSend$slambda_0(this, null));
  };
  protoOf(ClazzInviteViaContactViewModel).usr = function (error) {
    this.yqn().bq7(new Snack(error));
  };
  protoOf(ClazzInviteViaContactViewModel).ysr = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.lsq_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onClickChipSubmit.<anonymous>' call
        var nextValue = prevValue.tsr(VOID, plus(prevValue.rsr_1, _get_parseInviteUseCase__fcfumo(this).up9(text)));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    return last(tmp$ret$1.rsr_1);
  };
  protoOf(ClazzInviteViaContactViewModel).zsr = function (removedChipTexts) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.lsq_1.t2().rsr_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onChipsRemoved.<anonymous>' call
      if (!removedChipTexts.a1(element.vsr_1)) {
        destination.i1(element);
      }
    }
    var newChips = destination;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.lsq_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onChipsRemoved.<anonymous>' call
        var nextValue = prevValue.tsr(VOID, newChips);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzInviteViaContactViewModel).ass = function (newValue) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.lsq_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onTextFieldValueChanged.<anonymous>' call
        var nextValue = prevValue.tsr(VOID, VOID, newValue);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  function ClazzInviteViaContactUiState(contactError, chips, textFieldValue) {
    contactError = contactError === VOID ? null : contactError;
    chips = chips === VOID ? emptyList() : chips;
    textFieldValue = textFieldValue === VOID ? null : textFieldValue;
    this.qsr_1 = contactError;
    this.rsr_1 = chips;
    this.ssr_1 = textFieldValue;
  }
  protoOf(ClazzInviteViaContactUiState).bss = function (contactError, chips, textFieldValue) {
    return new ClazzInviteViaContactUiState(contactError, chips, textFieldValue);
  };
  protoOf(ClazzInviteViaContactUiState).tsr = function (contactError, chips, textFieldValue, $super) {
    contactError = contactError === VOID ? this.qsr_1 : contactError;
    chips = chips === VOID ? this.rsr_1 : chips;
    textFieldValue = textFieldValue === VOID ? this.ssr_1 : textFieldValue;
    return $super === VOID ? this.bss(contactError, chips, textFieldValue) : $super.bss.call(this, contactError, chips, textFieldValue);
  };
  protoOf(ClazzInviteViaContactUiState).toString = function () {
    return 'ClazzInviteViaContactUiState(contactError=' + this.qsr_1 + ', chips=' + this.rsr_1 + ', textFieldValue=' + this.ssr_1 + ')';
  };
  protoOf(ClazzInviteViaContactUiState).hashCode = function () {
    var result = this.qsr_1 == null ? 0 : getStringHashCode(this.qsr_1);
    result = imul(result, 31) + hashCode(this.rsr_1) | 0;
    result = imul(result, 31) + (this.ssr_1 == null ? 0 : getStringHashCode(this.ssr_1)) | 0;
    return result;
  };
  protoOf(ClazzInviteViaContactUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzInviteViaContactUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzInviteViaContactUiState ? other : THROW_CCE();
    if (!(this.qsr_1 == tmp0_other_with_cast.qsr_1))
      return false;
    if (!equals(this.rsr_1, tmp0_other_with_cast.rsr_1))
      return false;
    if (!(this.ssr_1 == tmp0_other_with_cast.ssr_1))
      return false;
    return true;
  };
  function InviteViaContactChip(text, isValid, inviteType) {
    this.vsr_1 = text;
    this.wsr_1 = isValid;
    this.xsr_1 = inviteType;
  }
  protoOf(InviteViaContactChip).toString = function () {
    return 'InviteViaContactChip(text=' + this.vsr_1 + ', isValid=' + this.wsr_1 + ', inviteType=' + this.xsr_1 + ')';
  };
  protoOf(InviteViaContactChip).hashCode = function () {
    var result = getStringHashCode(this.vsr_1);
    result = imul(result, 31) + getBooleanHashCode(this.wsr_1) | 0;
    result = imul(result, 31) + this.xsr_1 | 0;
    return result;
  };
  protoOf(InviteViaContactChip).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof InviteViaContactChip))
      return false;
    var tmp0_other_with_cast = other instanceof InviteViaContactChip ? other : THROW_CCE();
    if (!(this.vsr_1 === tmp0_other_with_cast.vsr_1))
      return false;
    if (!(this.wsr_1 === tmp0_other_with_cast.wsr_1))
      return false;
    if (!(this.xsr_1 === tmp0_other_with_cast.xsr_1))
      return false;
    return true;
  };
  function parseInviteUseCase$factory() {
    return getPropertyCallableRef('parseInviteUseCase', 1, KProperty1, function (receiver) {
      return _get_parseInviteUseCase__fcfumo(receiver);
    }, null);
  }
  function sendClazzInvitesUseCase$factory() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8(receiver);
    }, null);
  }
  function hideKeyboardUseCase$factory() {
    return getPropertyCallableRef('hideKeyboardUseCase', 1, KProperty1, function (receiver) {
      return _get_hideKeyboardUseCase__8r7d6l(receiver);
    }, null);
  }
  function parseInviteUseCase$factory_0() {
    return getPropertyCallableRef('parseInviteUseCase', 1, KProperty1, function (receiver) {
      return _get_parseInviteUseCase__fcfumo(receiver);
    }, null);
  }
  function sendClazzInvitesUseCase$factory_0() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8(receiver);
    }, null);
  }
  function hideKeyboardUseCase$factory_0() {
    return getPropertyCallableRef('hideKeyboardUseCase', 1, KProperty1, function (receiver) {
      return _get_hideKeyboardUseCase__8r7d6l(receiver);
    }, null);
  }
  function _get_makeLinkUseCase__qbv742($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zss_1;
    makeLinkUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setClipboardStringUseCase__31i1s1_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bst_1;
    setClipboardStringUseCase$factory_2();
    return this_0.t2();
  }
  function _get_shareTextUseCase__god44g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cst_1;
    shareTextUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_121() {
    this.est_1 = 'InviteWithLink';
  }
  var Companion_instance_170;
  function Companion_getInstance_138() {
    return Companion_instance_170;
  }
  function ClazzInviteViaLinkViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'InviteWithLink');
    this.xss_1 = MutableStateFlow(new ClazzInviteViaLinkUiState());
    this.yss_1 = asStateFlow(this.xss_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.zss_1 = Instance(this_0, tmp$ret$0, null).a5d(this, makeLinkUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_125();
    var tmp0_elvis_lhs = savedStateHandle.ba('inviteCode');
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('no invite code');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    tmp_1.ast_1 = tmp_2;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.bst_1 = Instance(this, tmp$ret$2, null).a5d(this, setClipboardStringUseCase$factory_1());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(ShareTextUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.cst_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, shareTextUseCase$factory());
    var tmp_7 = this;
    var tmp_8 = _get_makeLinkUseCase__qbv742(this);
    Companion_getInstance_125();
    tmp_7.dst_1 = tmp_8.upi('JoinWithCode', mapOf_0(to('inviteCode', this.ast_1)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.ClazzInviteViaLinkViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().xn8_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.xss_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.ClazzInviteViaLinkViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.hst(this.dst_1, !(_get_shareTextUseCase__god44g(this) == null));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzInviteViaLinkViewModel).ist = function () {
    _get_setClipboardStringUseCase__31i1s1_0(this).wp1(this.dst_1);
    this.yqn().bq7(new Snack(this.aqo().moj(strings_getInstance().sn8_1)));
  };
  function ClazzInviteViaLinkUiState(inviteLink, showShareLinkButton) {
    inviteLink = inviteLink === VOID ? null : inviteLink;
    showShareLinkButton = showShareLinkButton === VOID ? false : showShareLinkButton;
    this.fst_1 = inviteLink;
    this.gst_1 = showShareLinkButton;
  }
  protoOf(ClazzInviteViaLinkUiState).hst = function (inviteLink, showShareLinkButton) {
    return new ClazzInviteViaLinkUiState(inviteLink, showShareLinkButton);
  };
  protoOf(ClazzInviteViaLinkUiState).toString = function () {
    return 'ClazzInviteViaLinkUiState(inviteLink=' + this.fst_1 + ', showShareLinkButton=' + this.gst_1 + ')';
  };
  protoOf(ClazzInviteViaLinkUiState).hashCode = function () {
    var result = this.fst_1 == null ? 0 : getStringHashCode(this.fst_1);
    result = imul(result, 31) + getBooleanHashCode(this.gst_1) | 0;
    return result;
  };
  protoOf(ClazzInviteViaLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzInviteViaLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzInviteViaLinkUiState ? other : THROW_CCE();
    if (!(this.fst_1 == tmp0_other_with_cast.fst_1))
      return false;
    if (!(this.gst_1 === tmp0_other_with_cast.gst_1))
      return false;
    return true;
  };
  function makeLinkUseCase$factory() {
    return getPropertyCallableRef('makeLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_makeLinkUseCase__qbv742(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_1() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_0(receiver);
    }, null);
  }
  function shareTextUseCase$factory() {
    return getPropertyCallableRef('shareTextUseCase', 1, KProperty1, function (receiver) {
      return _get_shareTextUseCase__god44g(receiver);
    }, null);
  }
  function makeLinkUseCase$factory_0() {
    return getPropertyCallableRef('makeLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_makeLinkUseCase__qbv742(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_2() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_0(receiver);
    }, null);
  }
  function shareTextUseCase$factory_0() {
    return getPropertyCallableRef('shareTextUseCase', 1, KProperty1, function (receiver) {
      return _get_shareTextUseCase__god44g(receiver);
    }, null);
  }
  function _get_requestEnrolmentUseCase__62wq8f($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gsu_1;
    requestEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_122() {
    this.hsu_1 = 'JoinWithCode';
  }
  var Companion_instance_171;
  function Companion_getInstance_139() {
    return Companion_instance_171;
  }
  function JoinWithCodeViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, VOID, this$0.aqo().moj(strings_getInstance().hnj_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function JoinWithCodeViewModel$onClickJoin$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.esu_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onClickJoin.<anonymous>.<anonymous>' call
          var nextValue = prevValue.lsu(VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation) {
    this.usu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_requestEnrolmentUseCase__62wq8f(this.usu_1);
            var tmp_1 = this.usu_1.esu_1.t2().jsu_1;
            var tmp_2 = this.usu_1.qqn().uo9().onu_1;
            suspendResult = tmp_0.vp1(tmp_1, tmp_2, 1000, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.usu_1.yqn().bq7(new Snack(this.usu_1.aqo().moj(strings_getInstance().hnn_1)));
            if (!(this.usu_1.bqo() == null)) {
              this.usu_1.lqt(null);
            } else {
              Companion_getInstance_140();
              this.usu_1.cqn_1.lq9('CourseListHome', emptyMap(), new UstadGoOptions(VOID, VOID, true));
            }

            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              var e = this.kd_1;
              var tmp_4;
              if (e instanceof IllegalArgumentException) {
                tmp_4 = strings_getInstance().nno_1;
              } else {
                if (e instanceof AlreadyHasPendingRequestException) {
                  tmp_4 = strings_getInstance().gnn_1;
                } else {
                  if (e instanceof AlreadyEnroledInClassException) {
                    tmp_4 = strings_getInstance().tna_1;
                  } else {
                    tmp_4 = strings_getInstance().qmi_1;
                  }
                }
              }
              var errorMessage = tmp_4;
              l$ret$1: do {
                var this_0 = this.usu_1.esu_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_5 = this.usu_1.aqo().moj(errorMessage);
                  var tmp0_safe_receiver = e.message;
                  var tmp_6;
                  if (tmp0_safe_receiver == null) {
                    tmp_6 = null;
                  } else {
                    tmp_6 = ' :' + tmp0_safe_receiver;
                  }
                  var tmp1_elvis_lhs = tmp_6;
                  var nextValue = prevValue.lsu(tmp_5 + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).l78 = function (completion) {
    return new JoinWithCodeViewModel$onClickJoin$slambda(this.usu_1, completion);
  };
  function JoinWithCodeViewModel$onClickJoin$slambda_0(this$0, resultContinuation) {
    var i = new JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function JoinWithCodeViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'JoinWithCode');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_elvis_lhs = savedStateHandle.ba('inviteCode');
    tmp.esu_1 = MutableStateFlow(new JoinWithCodeUiState(VOID, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs));
    this.fsu_1 = asStateFlow(this.esu_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.gsu_1 = Instance(this_0, tmp$ret$0, null).a5d(this, requestEnrolmentUseCase$factory());
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_1 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>' call
    Companion_getInstance_125();
    this.nqo(this_1, 'inviteCode');
    var tmp_2 = this_1.f3();
    this.qqo(VOID, tmp_2, JoinWithCodeViewModel$lambda(this));
  }
  protoOf(JoinWithCodeViewModel).vsu = function (codeVal) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.esu_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onCodeValueChange.<anonymous>' call
        var nextValue = prevValue.lsu(null, codeVal);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(JoinWithCodeViewModel).wsu = function () {
    var tmp = JoinWithCodeViewModel$onClickJoin$lambda(this);
    this.nqu(tmp, JoinWithCodeViewModel$onClickJoin$slambda_0(this, null));
  };
  function JoinWithCodeUiState(codeError, code, fieldsEnabled) {
    codeError = codeError === VOID ? null : codeError;
    code = code === VOID ? '' : code;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.isu_1 = codeError;
    this.jsu_1 = code;
    this.ksu_1 = fieldsEnabled;
  }
  protoOf(JoinWithCodeUiState).xsu = function (codeError, code, fieldsEnabled) {
    return new JoinWithCodeUiState(codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).lsu = function (codeError, code, fieldsEnabled, $super) {
    codeError = codeError === VOID ? this.isu_1 : codeError;
    code = code === VOID ? this.jsu_1 : code;
    fieldsEnabled = fieldsEnabled === VOID ? this.ksu_1 : fieldsEnabled;
    return $super === VOID ? this.xsu(codeError, code, fieldsEnabled) : $super.xsu.call(this, codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).toString = function () {
    return 'JoinWithCodeUiState(codeError=' + this.isu_1 + ', code=' + this.jsu_1 + ', fieldsEnabled=' + this.ksu_1 + ')';
  };
  protoOf(JoinWithCodeUiState).hashCode = function () {
    var result = this.isu_1 == null ? 0 : getStringHashCode(this.isu_1);
    result = imul(result, 31) + getStringHashCode(this.jsu_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ksu_1) | 0;
    return result;
  };
  protoOf(JoinWithCodeUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof JoinWithCodeUiState))
      return false;
    var tmp0_other_with_cast = other instanceof JoinWithCodeUiState ? other : THROW_CCE();
    if (!(this.isu_1 == tmp0_other_with_cast.isu_1))
      return false;
    if (!(this.jsu_1 === tmp0_other_with_cast.jsu_1))
      return false;
    if (!(this.ksu_1 === tmp0_other_with_cast.ksu_1))
      return false;
    return true;
  };
  function requestEnrolmentUseCase$factory() {
    return getPropertyCallableRef('requestEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_requestEnrolmentUseCase__62wq8f(receiver);
    }, null);
  }
  function requestEnrolmentUseCase$factory_0() {
    return getPropertyCallableRef('requestEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_requestEnrolmentUseCase__62wq8f(receiver);
    }, null);
  }
  function ClazzListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.gsv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda).lqf = function (hasPermission, $completion) {
    var tmp = this.mqf(hasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.gsv_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_newClazzListOptionVisible = this.hsv_1 ? this.gsv_1.aqw().equals(ListViewMode_PICKER_getInstance()) : false;
              var nextValue = prevValue.tsv(tmp0_newClazzListOptionVisible, VOID, VOID, VOID, VOID, VOID, this.hsv_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).mqf = function (hasPermission, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this.gsv_1, completion);
    i.hsv_1 = hasPermission;
    return i;
  };
  function ClazzListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermission, $completion) {
      return i.lqf(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.csw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.csw_1.wqn().p7f();
            var tmp_1 = this.csw_1.qqn().joa().vky_1;
            PermissionFlags_getInstance();
            var tmp_2 = distinctUntilChanged(tmp_0.ui0(tmp_1, new Long(512, 0)));
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_0(this.csw_1, null);
            suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_13(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda).l78 = function (completion) {
    return new ClazzListViewModel$slambda$slambda(this.csw_1, completion);
  };
  function ClazzListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.lsw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).nsw = function (it, $completion) {
    var tmp = this.osw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.nsw((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.lsw_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.tsv(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.msw_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).osw = function (it, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this.lsw_1, completion);
    i.msw_1 = it;
    return i;
  };
  function ClazzListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.nsw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.xsw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.xsw_1.wqn().n7f();
            var tmp_1 = this.xsw_1.sqn();
            var tmp_2 = tmp_0.tex(tmp_1, 1);
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_2(this.xsw_1, null);
            suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_13(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ClazzListViewModel$slambda$slambda_1(this.xsw_1, completion);
  };
  function ClazzListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_123() {
    Companion_instance_172 = this;
    this.ysw_1 = 'CourseList';
    this.zsw_1 = 'CourseListHome';
    this.asx_1 = listOf(['CourseList', 'CourseListHome']);
    this.bsx_1 = 'excludeAlreadySelectedClazzList';
  }
  var Companion_instance_172;
  function Companion_getInstance_140() {
    if (Companion_instance_172 == null)
      new Companion_123();
    return Companion_instance_172;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_13(function_0) {
    this.csx_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_13).t1d = function (value, $completion) {
    return this.csx_1(value, $completion);
  };
  function ClazzListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().o7d().w8c(toQueryLikeParam(this$0.eqn_1.t2().eq6_1.tq5_1), this$0.qqn().joa().vky_1, this$0.dsy_1, this$0.vqv_1.t2().lsv_1.tqc_1, this$0.vqv_1.t2().nsv_1, systemTimeInMillis(), this$0.esy_1);
    };
  }
  function ClazzListViewModel$slambda(this$0, resultContinuation) {
    this.osy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.osy_1.vqv_1, ClazzListViewModel$slambda$slambda_0(this.osy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzListViewModel$slambda(this.osy_1, completion);
    i.psy_1 = $this$launch;
    return i;
  };
  function ClazzListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda_1(this$0, resultContinuation) {
    this.ysy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.ysy_1.vqv_1, ClazzListViewModel$slambda$slambda_2(this.ysy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzListViewModel$slambda_1(this.ysy_1, completion);
    i.zsy_1 = $this$launch;
    return i;
  };
  function ClazzListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this$0, $enrolmentRequest, resultContinuation) {
    this.isz_1 = this$0;
    this.jsz_1 = $enrolmentRequest;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.isz_1.wqn().n7f();
            var tmp_1 = this.jsz_1.key_1;
            suspendResult = tmp_0.uex(tmp_1, 4, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.isz_1.yqn().bq7(new Snack(this.isz_1.aqo().moj(strings_getInstance().inn_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this.isz_1, this.jsz_1, completion);
    i.ksz_1 = $this$launch;
    return i;
  };
  function ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this$0, $enrolmentRequest, resultContinuation) {
    var i = new ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this$0, $enrolmentRequest, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_140();
    destinationName = destinationName === VOID ? 'CourseList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('excludeAlreadySelectedClazzList');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : split(tmp0_safe_receiver, [',']);
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = tmp1_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.isNotEmpty' call
        if (charSequenceLength(element) > 0) {
          destination.i1(element);
        }
      }
      tmp_0 = destination;
    }
    var tmp2_safe_receiver = tmp_0;
    var tmp_1;
    if (tmp2_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_safe_receiver, 10));
      var tmp0_iterator_0 = tmp2_safe_receiver.w();
      while (tmp0_iterator_0.f()) {
        var item = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var tmp$ret$4 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
        var tmp$ret$5 = toLong_0(tmp$ret$4);
        destination_0.i1(tmp$ret$5);
      }
      tmp_1 = destination_0;
    }
    var tmp3_elvis_lhs = tmp_1;
    var tmp_2;
    if (tmp3_elvis_lhs == null) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_2 = emptyList();
    } else {
      tmp_2 = tmp3_elvis_lhs;
    }
    tmp.dsy_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('filterByPermission');
    var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_4;
    if (tmp1_elvis_lhs == null) {
      PermissionFlags_getInstance();
      tmp_4 = new Long(1, 0);
    } else {
      tmp_4 = tmp1_elvis_lhs;
    }
    tmp_3.esy_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.fsy_1 = ClazzListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        var tmp0_searchState = this.eqx();
        var tmp1_title = this.mqx(strings_getInstance().tni_1, strings_getInstance().tni_1);
        var tmp2_fabState = this.hqx(!this.sqn().equals(new Long(0, 0)), strings_getInstance().uni_1);
        var nextValue = prevValue.mq6(tmp2_fabState, VOID, tmp1_title, true, VOID, VOID, VOID, tmp0_searchState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.vqv_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element_0 = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$11 = this.aqo().moj(get_dayStringResource(element_0));
          result.s(element_0, tmp$ret$11);
        }
        var tmp1_clazzList = this.fsy_1;
        var nextValue_0 = prevValue_0.tsv(VOID, tmp1_clazzList, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.rqn();
    launch(tmp_6, VOID, VOID, ClazzListViewModel$slambda_0(this, null));
    var tmp_7 = this.rqn();
    launch(tmp_7, VOID, VOID, ClazzListViewModel$slambda_2(this, null));
  }
  protoOf(ClazzListViewModel).pqw = function (searchText) {
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).qqw = function () {
    this.jqx('CourseEdit');
  };
  protoOf(ClazzListViewModel).lsz = function () {
    Companion_getInstance_116();
    Companion_getInstance_4();
    this.cqn_1.rp6('JoinWithCode', mapOf_0(to('argCodeTable', (6).toString())));
  };
  protoOf(ClazzListViewModel).msz = function (entry) {
    this.lqx('Course', entry.r8d_1, entry);
  };
  protoOf(ClazzListViewModel).nsz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.tsv(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).osz = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.tsv(VOID, VOID, VOID, VOID, VOID, filterOption.pq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).psz = function (enrolmentRequest) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this, enrolmentRequest, null));
  };
  function Companion_124() {
    Companion_instance_173 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().pmk_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().pmk_1;
    var tmp_3 = new SortOrderOption(tmp_2, 2, false);
    var tmp_4 = strings_getInstance().lml_1;
    var tmp_5 = new SortOrderOption(tmp_4, 3, true);
    var tmp_6 = strings_getInstance().lml_1;
    tmp.qsz_1 = listOf([tmp_1, tmp_3, tmp_5, new SortOrderOption(tmp_6, 4, false)]);
  }
  var Companion_instance_173;
  function Companion_getInstance_141() {
    if (Companion_instance_173 == null)
      new Companion_124();
    return Companion_instance_173;
  }
  function ClazzListUiState$_init_$lambda_r0y0x0() {
    return new EmptyPagingSource();
  }
  function ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    Companion_getInstance_141();
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? true : newClazzListOptionVisible;
    var tmp;
    if (clazzList === VOID) {
      tmp = ClazzListUiState$_init_$lambda_r0y0x0;
    } else {
      tmp = clazzList;
    }
    clazzList = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_141().qsz_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? first_0(sortOptions) : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_0;
    if (selectedChipId === VOID) {
      tmp_0 = 5;
    } else {
      tmp_0 = selectedChipId;
    }
    selectedChipId = tmp_0;
    canAddNewCourse = canAddNewCourse === VOID ? false : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? emptyList() : pendingEnrolments;
    var tmp_1;
    if (filterOptions === VOID) {
      var tmp_2 = strings_getInstance().jnj_1;
      tmp_1 = listOf([new MessageIdOption2(tmp_2, 5), new MessageIdOption2(strings_getInstance().wmz_1, 0)]);
    } else {
      tmp_1 = filterOptions;
    }
    filterOptions = tmp_1;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    this.isv_1 = newClazzListOptionVisible;
    this.jsv_1 = clazzList;
    this.ksv_1 = sortOptions;
    this.lsv_1 = activeSortOrderOption;
    this.msv_1 = fieldsEnabled;
    this.nsv_1 = selectedChipId;
    this.osv_1 = canAddNewCourse;
    this.psv_1 = pendingEnrolments;
    this.qsv_1 = filterOptions;
    this.rsv_1 = dayOfWeekStrings;
    this.ssv_1 = localDateTimeNow;
  }
  protoOf(ClazzListUiState).rsz = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    return new ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).tsv = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow, $super) {
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? this.isv_1 : newClazzListOptionVisible;
    clazzList = clazzList === VOID ? this.jsv_1 : clazzList;
    sortOptions = sortOptions === VOID ? this.ksv_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.lsv_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.msv_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.nsv_1 : selectedChipId;
    canAddNewCourse = canAddNewCourse === VOID ? this.osv_1 : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? this.psv_1 : pendingEnrolments;
    filterOptions = filterOptions === VOID ? this.qsv_1 : filterOptions;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.rsv_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.ssv_1 : localDateTimeNow;
    return $super === VOID ? this.rsz(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) : $super.rsz.call(this, newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).toString = function () {
    return 'ClazzListUiState(newClazzListOptionVisible=' + this.isv_1 + ', clazzList=' + this.jsv_1 + ', sortOptions=' + this.ksv_1 + ', activeSortOrderOption=' + this.lsv_1 + ', fieldsEnabled=' + this.msv_1 + ', selectedChipId=' + this.nsv_1 + ', canAddNewCourse=' + this.osv_1 + ', pendingEnrolments=' + this.psv_1 + ', filterOptions=' + this.qsv_1 + ', dayOfWeekStrings=' + this.rsv_1 + ', localDateTimeNow=' + this.ssv_1 + ')';
  };
  protoOf(ClazzListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.isv_1);
    result = imul(result, 31) + hashCode(this.jsv_1) | 0;
    result = imul(result, 31) + hashCode(this.ksv_1) | 0;
    result = imul(result, 31) + this.lsv_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.msv_1) | 0;
    result = imul(result, 31) + this.nsv_1 | 0;
    result = imul(result, 31) + getBooleanHashCode(this.osv_1) | 0;
    result = imul(result, 31) + hashCode(this.psv_1) | 0;
    result = imul(result, 31) + hashCode(this.qsv_1) | 0;
    result = imul(result, 31) + hashCode(this.rsv_1) | 0;
    result = imul(result, 31) + this.ssv_1.hashCode() | 0;
    return result;
  };
  protoOf(ClazzListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzListUiState ? other : THROW_CCE();
    if (!(this.isv_1 === tmp0_other_with_cast.isv_1))
      return false;
    if (!equals(this.jsv_1, tmp0_other_with_cast.jsv_1))
      return false;
    if (!equals(this.ksv_1, tmp0_other_with_cast.ksv_1))
      return false;
    if (!this.lsv_1.equals(tmp0_other_with_cast.lsv_1))
      return false;
    if (!(this.msv_1 === tmp0_other_with_cast.msv_1))
      return false;
    if (!(this.nsv_1 === tmp0_other_with_cast.nsv_1))
      return false;
    if (!(this.osv_1 === tmp0_other_with_cast.osv_1))
      return false;
    if (!equals(this.psv_1, tmp0_other_with_cast.psv_1))
      return false;
    if (!equals(this.qsv_1, tmp0_other_with_cast.qsv_1))
      return false;
    if (!equals(this.rsv_1, tmp0_other_with_cast.rsv_1))
      return false;
    if (!this.ssv_1.equals(tmp0_other_with_cast.ssv_1))
      return false;
    return true;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).ct0 = function (entity, permissions, $completion) {
    var tmp = this.dt0(entity, permissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof CoursePermission) ? p1 : THROW_CCE();
    return this.ct0(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.at0_1;
          var tmp_0;
          if (this.bt0_1.hdn_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return new Pair(tmp_0, this.bt0_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).dt0 = function (entity, permissions, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.at0_1 = entity;
    i.bt0_1 = permissions;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissions, $completion) {
      return i.ct0(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.mt0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).tt0 = function (it, $completion) {
    var tmp = this.ut0(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.tt0(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.ot0_1 = this.nt0_1;
            this.pt0_1 = this.ot0_1.y6();
            this.qt0_1 = this.ot0_1.z6();
            this.rt0_1 = this.qt0_1;
            this.st0_1 = this.rt0_1.z6();
            l$ret$1: do {
              var this_0 = this.mt0_1.rt1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.pt0_1 == null)) {
                  tmp_0 = CoursePermissionConstants_getInstance().arg_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.wt1(this.pt0_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.mt0_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mq6(prevValue_0.xq5_1.sq6(this.st0_1));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.pt0_1 == null)) {
              this.hd_1 = 1;
              suspendResult = getTitleForCoursePermission(this.mt0_1, this.pt0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var title = suspendResult;
            l$ret$5: do {
              var this_2 = this.mt0_1.eqn_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.mq6(VOID, VOID, title);
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).ut0 = function (it, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.mt0_1, completion);
    i.nt0_1 = it;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.tt0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.ft2_1 = $entityFlow;
    this.gt2_1 = $permissionFlow;
    this.ht2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.ft2_1, this.gt2_1, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            suspendResult = collectLatest(tmp_0, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.ht2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda(this.ft2_1, this.gt2_1, this.ht2_1, completion);
    i.it2_1 = $this$launch;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda_0($entityFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.rt2_1 = $this_launch;
    this.st2_1 = $entityFlow;
    this.tt2_1 = $permissionFlow;
    this.ut2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.rt2_1, VOID, VOID, CoursePermissionDetailViewModel$slambda$slambda$slambda_0(this.st2_1, this.tt2_1, this.ut2_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new CoursePermissionDetailViewModel$slambda$slambda(this.rt2_1, this.st2_1, this.tt2_1, this.ut2_1, completion);
  };
  function CoursePermissionDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function onClickEdit_0($this) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.onClickEdit.<anonymous>' call
    Companion_getInstance_125();
    var tmp0_safe_receiver = $this.rt1_1.t2().ut1_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zdk_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    this_0.s('entityUid', tmp2_elvis_lhs == null ? '0' : tmp2_elvis_lhs);
    Companion_getInstance_125();
    $this.nqo(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    $this.cqn_1.rp6('CoursePermissionEdit', tmp$ret$2);
  }
  function Companion_125() {
    this.vt2_1 = 'CoursePermissionDetail';
  }
  var Companion_instance_174;
  function Companion_getInstance_142() {
    return Companion_instance_174;
  }
  function CoursePermissionDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit_0($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function CoursePermissionDetailViewModel$slambda(this$0, $entityFlow, $permissionFlow, resultContinuation) {
    this.et3_1 = this$0;
    this.ft3_1 = $entityFlow;
    this.gt3_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.et3_1.rt1_1, CoursePermissionDetailViewModel$slambda$slambda_0(this.ht3_1, this.ft3_1, this.gt3_1, this.et3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionDetailViewModel$slambda(this.et3_1, this.ft3_1, this.gt3_1, completion);
    i.ht3_1 = $this$launch;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda_0(this$0, $entityFlow, $permissionFlow, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda(this$0, $entityFlow, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CoursePermissionDetail');
    this.rt1_1 = MutableStateFlow(new CoursePermissionDetailUiState());
    this.st1_1 = asStateFlow(this.rt1_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.tt1_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var entityFlow = this.wqn().o7f().p7s(this.uqm_1, this.tt1_1);
    var tmp_0 = this.wqn().o7f();
    var tmp_1 = this.sqn();
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = tmp_0.gdk(tmp_1, this.tt1_1, tmp_2, new Long(2, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.<anonymous>' call
        var tmp_3 = this.aqo().moj(strings_getInstance().qmv_1);
        var tmp_4 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.mq6(new FabUiState(VOID, tmp_3, tmp_4, CoursePermissionDetailViewModel$onClickEdit$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_5 = this.rqn();
    launch(tmp_5, VOID, VOID, CoursePermissionDetailViewModel$slambda_0(this, entityFlow, permissionFlow, null));
  }
  function CoursePermissionDetailUiState(coursePermission, permissionLabels) {
    coursePermission = coursePermission === VOID ? null : coursePermission;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.ut1_1 = coursePermission;
    this.vt1_1 = permissionLabels;
  }
  protoOf(CoursePermissionDetailUiState).wt1 = function (coursePermission, permissionLabels) {
    return new CoursePermissionDetailUiState(coursePermission, permissionLabels);
  };
  protoOf(CoursePermissionDetailUiState).toString = function () {
    return 'CoursePermissionDetailUiState(coursePermission=' + this.ut1_1 + ', permissionLabels=' + this.vt1_1 + ')';
  };
  protoOf(CoursePermissionDetailUiState).hashCode = function () {
    var result = this.ut1_1 == null ? 0 : this.ut1_1.hashCode();
    result = imul(result, 31) + hashCode(this.vt1_1) | 0;
    return result;
  };
  protoOf(CoursePermissionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionDetailUiState ? other : THROW_CCE();
    if (!equals(this.ut1_1, tmp0_other_with_cast.ut1_1))
      return false;
    if (!equals(this.vt1_1, tmp0_other_with_cast.vt1_1))
      return false;
    return true;
  };
  function CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.qt3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda).st3 = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.st3(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.rt3_1.o7f().cdk(this.qt3_1.iqt_1, this.qt3_1.st4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).yny = function (db, completion) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this.qt3_1, completion);
    i.rt3_1 = db;
    return i;
  };
  function CoursePermissionEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.st3(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.bt5_1 = this$0;
    this.ct5_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).sdq = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.sdq($completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = get_doorPrimaryKeyManager(this.bt5_1.uqn());
            Companion_getInstance_5();
            suspendResult = tmp_0.o62(10012, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            Companion_getInstance_125();
            var tmp0_safe_receiver = this.ct5_1.ba('clazzUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var tmp2_safe_receiver = this.ct5_1.ba('grantToRole');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toInt(tmp2_safe_receiver);
            var tmp_2 = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;
            Companion_getInstance_125();
            var tmp4_safe_receiver = this.ct5_1.ba('personUid');
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
            return new CoursePermission(ARGUMENT, VOID, tmp_1, tmp_2, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new CoursePermissionEditViewModel$slambda$slambda_1(this.bt5_1, this.ct5_1, completion);
  };
  function CoursePermissionEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.sdq($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.qt4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gt5(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.pt5_1 = this$0;
    this.qt5_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.pt5_1.wqn().o7f().ddk(this.qt5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).yny = function (it, completion) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this.pt5_1, this.qt5_1, completion);
    i.rt5_1 = it;
    return i;
  };
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_126() {
    this.st5_1 = 'CoursePermissionEdit';
    this.tt5_1 = 'grantToRole';
  }
  var Companion_instance_175;
  function Companion_getInstance_143() {
    return Companion_instance_175;
  }
  function CoursePermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.ct6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda).msc = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.dt6_1.o7f();
            var tmp_1 = this.ct6_1.sqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.ct6_1.st4_1, new Long(2, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda).yny = function (it, completion) {
    var i = new CoursePermissionEditViewModel$slambda(this.ct6_1, completion);
    i.dt6_1 = it;
    return i;
  };
  function CoursePermissionEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.msc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.qt4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gt5(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.mt6_1 = this$0;
    this.nt6_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_getInstance_5().n4r();
            var tmp_1 = CoursePermissionEditViewModel$slambda$slambda_0(this.mt6_1, null);
            var tmp_2 = CoursePermissionEditViewModel$slambda$slambda_2(this.mt6_1, this.nt6_1, null);
            suspendResult = this.mt6_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, CoursePermissionEditViewModel$slambda$lambda(this.mt6_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.pt6_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = getTitleForCoursePermission(this.mt6_1, this.pt6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$1: do {
              var this_0 = this.mt6_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.mt6_1.aqo().moj(strings_getInstance().en3_1);
                var nextValue = prevValue.mq6(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, CoursePermissionEditViewModel$onClickSave$ref(this.mt6_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.mt6_1.qt4_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.gt5(VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new CoursePermissionEditViewModel$slambda_1(this.mt6_1, this.nt6_1, completion);
    i.ot6_1 = $this$launchIfHasPermission;
    return i;
  };
  function CoursePermissionEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.qt4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gt5(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.yt6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.yt6_1.qt4_1.t2().dt5_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.zt6_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = this.yt6_1.wqn();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, CoursePermissionEditViewModel$onClickSave$slambda$slambda_0(this.yt6_1, this.zt6_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_116();
            var popUpToOnFinish = this.yt6_1.aqn_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.yt6_1.cqn_1.mq9(popUpToOnFinish, false);
            } else {
              this.yt6_1.kqt('CoursePermissionDetail', this.zt6_1.zdk_1, this.zt6_1);
            }

            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).l78 = function (completion) {
    return new CoursePermissionEditViewModel$onClickSave$slambda(this.yt6_1, completion);
  };
  function CoursePermissionEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CoursePermissionEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CoursePermissionEdit');
    this.qt4_1 = MutableStateFlow(new CoursePermissionEditUiState());
    this.rt4_1 = asStateFlow(this.qt4_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.st4_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.qt4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.gt5(VOID, VOID, CoursePermissionConstants_getInstance().arg_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, VOID, VOID, true);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = CoursePermissionEditViewModel$slambda_0(this, null);
    var tmp_1 = CoursePermissionEditViewModel$lambda(this);
    this.mqo(tmp_0, VOID, tmp_1, CoursePermissionEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(CoursePermissionEditViewModel).at7 = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.qt4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onTogglePermission.<anonymous>' call
        var entityVal = prevValue.dt5_1;
        var tmp;
        if (!(entityVal == null)) {
          tmp = prevValue.gt5(entityVal.ckn(VOID, VOID, VOID, VOID, VOID, VOID, toggleFlag(entityVal.fdl_1, flag)));
        } else {
          tmp = prevValue;
        }
        var nextValue = tmp;
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(CoursePermissionEditViewModel).asa = function () {
    var tmp = CoursePermissionEditViewModel$onClickSave$lambda(this);
    this.nqu(tmp, CoursePermissionEditViewModel$onClickSave$slambda_0(this, null));
  };
  function CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels) {
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.dt5_1 = entity;
    this.et5_1 = fieldsEnabled;
    this.ft5_1 = permissionLabels;
  }
  protoOf(CoursePermissionEditUiState).bt7 = function (entity, fieldsEnabled, permissionLabels) {
    return new CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).gt5 = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.dt5_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.et5_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.ft5_1 : permissionLabels;
    return $super === VOID ? this.bt7(entity, fieldsEnabled, permissionLabels) : $super.bt7.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).toString = function () {
    return 'CoursePermissionEditUiState(entity=' + this.dt5_1 + ', fieldsEnabled=' + this.et5_1 + ', permissionLabels=' + this.ft5_1 + ')';
  };
  protoOf(CoursePermissionEditUiState).hashCode = function () {
    var result = this.dt5_1 == null ? 0 : this.dt5_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.et5_1) | 0;
    result = imul(result, 31) + hashCode(this.ft5_1) | 0;
    return result;
  };
  protoOf(CoursePermissionEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionEditUiState ? other : THROW_CCE();
    if (!equals(this.dt5_1, tmp0_other_with_cast.dt5_1))
      return false;
    if (!(this.et5_1 === tmp0_other_with_cast.et5_1))
      return false;
    if (!equals(this.ft5_1, tmp0_other_with_cast.ft5_1))
      return false;
    return true;
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.kt7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).mt7 = function (it, $completion) {
    var tmp = this.nt7(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.mt7(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.lt7_1;
          var hasViewPermission = tmp0_container.y6();
          var hasEditPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.kt7_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp1_permissionLabels = CoursePermissionConstants_getInstance().arg_1;
              var this_1 = this.kt7_1.pt8_1;
              var tmp_0;
              if (hasViewPermission) {
                tmp_0 = this_1;
              } else {
                tmp_0 = null;
              }
              var tmp0_elvis_lhs = tmp_0;
              var tmp_1;
              if (tmp0_elvis_lhs == null) {
                tmp_1 = CoursePermissionListViewModel$slambda$slambda$slambda$lambda;
              } else {
                tmp_1 = tmp0_elvis_lhs;
              }
              var tmp2_permissionsList = tmp_1;
              var nextValue = prevValue.ut8(tmp2_permissionsList, tmp1_permissionLabels, VOID, hasEditPermission);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.kt7_1.eqn_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var nextValue_0 = prevValue_0.mq6(prevValue_0.xq5_1.sq6(hasEditPermission));
              if (this_2.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).nt7 = function (it, completion) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this.kt7_1, completion);
    i.lt7_1 = it;
    return i;
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mt7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.dt9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.dt9_1.wqn().o7f();
            var tmp_1 = this.dt9_1.sqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.dt9_1.ot8_1, tmp_2, new Long(2, 0)));
            var tmp_4 = CoursePermissionListViewModel$slambda$slambda$slambda_0(this.dt9_1, null);
            suspendResult = tmp_3.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_14(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).l78 = function (completion) {
    return new CoursePermissionListViewModel$slambda$slambda(this.dt9_1, completion);
  };
  function CoursePermissionListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_127() {
    this.et9_1 = 'CoursePermissionList';
    this.ft9_1 = 'permissionResult';
  }
  var Companion_instance_176;
  function Companion_getInstance_144() {
    return Companion_instance_176;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_14(function_0) {
    this.gt9_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_14).t1d = function (value, $completion) {
    return this.gt9_1(value, $completion);
  };
  function CoursePermissionListViewModel$pagingSource$lambda(this$0) {
    return function () {
      return this$0.wqn().o7f().bdk(this$0.ot8_1, false);
    };
  }
  function CoursePermissionListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.qqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CoursePermissionListViewModel$slambda(this$0, resultContinuation) {
    this.pt9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.pt9_1.vqv_1, CoursePermissionListViewModel$slambda$slambda_0(this.pt9_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionListViewModel$slambda(this.pt9_1, completion);
    i.qt9_1 = $this$launch;
    return i;
  };
  function CoursePermissionListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$onClickDeleteEntry$slambda(this$0, $coursePermission, resultContinuation) {
    this.zt9_1 = this$0;
    this.ata_1 = $coursePermission;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.zt9_1.wqn().o7f().eca(this.ata_1.zdk_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionListViewModel$onClickDeleteEntry$slambda(this.zt9_1, this.ata_1, completion);
    i.bta_1 = $this$launch;
    return i;
  };
  function CoursePermissionListViewModel$onClickDeleteEntry$slambda_0(this$0, $coursePermission, resultContinuation) {
    var i = new CoursePermissionListViewModel$onClickDeleteEntry$slambda(this$0, $coursePermission, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CoursePermissionListUiState(), 'CoursePermissionList');
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.ot8_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.pt8_1 = CoursePermissionListViewModel$pagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.<anonymous>' call
        var tmp3_title = this.aqo().moj(strings_getInstance().in1_1);
        var tmp0_text = this.aqo().moj(strings_getInstance().in1_1);
        var tmp1_icon = FabIcon_ADD_getInstance();
        var tmp2_onClick = CoursePermissionListViewModel$onClickAdd$ref(this);
        var tmp4_fabState = new FabUiState(false, tmp0_text, tmp1_icon, tmp2_onClick);
        var nextValue = prevValue.mq6(tmp4_fabState, VOID, tmp3_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, CoursePermissionListViewModel$slambda_0(this, null));
  }
  protoOf(CoursePermissionListViewModel).pqw = function (searchText) {
  };
  protoOf(CoursePermissionListViewModel).qqw = function () {
    Companion_getInstance_116();
    var tmp = to('clazzUid', this.ot8_1.toString());
    Companion_getInstance_116();
    var goToOnPersonSelectedArg = appendQueryArgs('CoursePermissionEdit', mapOf([tmp, to('popUpToOnFinish', this.bqn_1)]));
    Companion_getInstance_204();
    var tmp_0 = Companion_getInstance_5().n4r();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.onClickAdd.<anonymous>' call
    Companion_getInstance_116();
    this_0.s('listMode', ListViewMode_PICKER_getInstance().zqj_1);
    this_0.s('goToOnPersonSelected', goToOnPersonSelectedArg);
    var tmp$ret$2 = this_0.f3();
    this.iqo('People', 'permissionResult', null, tmp_0, tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).cta = function (coursePermission) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.onClickEntry.<anonymous>' call
    Companion_getInstance_125();
    this_0.s('entityUid', coursePermission.zdk_1.toString());
    Companion_getInstance_125();
    this.nqo(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    this.cqn_1.rp6('CoursePermissionDetail', tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).dta = function (coursePermission) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, CoursePermissionListViewModel$onClickDeleteEntry$slambda_0(this, coursePermission, null));
  };
  function CoursePermissionListUiState$_init_$lambda_czupre() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    var tmp;
    if (permissionsList === VOID) {
      tmp = CoursePermissionListUiState$_init_$lambda_czupre;
    } else {
      tmp = permissionsList;
    }
    permissionsList = tmp;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? false : showDeleteOption;
    this.qt8_1 = permissionsList;
    this.rt8_1 = permissionLabels;
    this.st8_1 = courseTerminology;
    this.tt8_1 = showDeleteOption;
  }
  protoOf(CoursePermissionListUiState).eta = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    return new CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).ut8 = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption, $super) {
    permissionsList = permissionsList === VOID ? this.qt8_1 : permissionsList;
    permissionLabels = permissionLabels === VOID ? this.rt8_1 : permissionLabels;
    courseTerminology = courseTerminology === VOID ? this.st8_1 : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? this.tt8_1 : showDeleteOption;
    return $super === VOID ? this.eta(permissionsList, permissionLabels, courseTerminology, showDeleteOption) : $super.eta.call(this, permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).toString = function () {
    return 'CoursePermissionListUiState(permissionsList=' + this.qt8_1 + ', permissionLabels=' + this.rt8_1 + ', courseTerminology=' + this.st8_1 + ', showDeleteOption=' + this.tt8_1 + ')';
  };
  protoOf(CoursePermissionListUiState).hashCode = function () {
    var result = hashCode(this.qt8_1);
    result = imul(result, 31) + hashCode(this.rt8_1) | 0;
    result = imul(result, 31) + (this.st8_1 == null ? 0 : hashCode(this.st8_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tt8_1) | 0;
    return result;
  };
  protoOf(CoursePermissionListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionListUiState ? other : THROW_CCE();
    if (!equals(this.qt8_1, tmp0_other_with_cast.qt8_1))
      return false;
    if (!equals(this.rt8_1, tmp0_other_with_cast.rt8_1))
      return false;
    if (!equals(this.st8_1, tmp0_other_with_cast.st8_1))
      return false;
    if (!(this.tt8_1 === tmp0_other_with_cast.tt8_1))
      return false;
    return true;
  };
  function avatarName(_this__u8e3s4) {
    var tmp;
    var tmp_0 = _this__u8e3s4.r7v_1;
    Companion_getInstance_1();
    if (tmp_0.c7(toLong(10000)) >= 0) {
      tmp = _this__u8e3s4.s7v_1;
    } else {
      tmp = _this__u8e3s4.r7v_1.toString();
    }
    return tmp;
  }
  function avatarColorName(_this__u8e3s4) {
    var tmp;
    var tmp_0 = _this__u8e3s4.r7v_1;
    Companion_getInstance_1();
    if (tmp_0.c7(toLong(10000)) >= 0) {
      tmp = _this__u8e3s4.s7v_1;
    } else {
      tmp = _this__u8e3s4.r7v_1.rc(16).toString();
    }
    return tmp;
  }
  var TextLimitType_LIMIT_WORDS_instance;
  var TextLimitType_LIMIT_CHARS_instance;
  function values_2() {
    return [TextLimitType_LIMIT_WORDS_getInstance(), TextLimitType_LIMIT_CHARS_getInstance()];
  }
  var TextLimitType_entriesInitialized;
  function TextLimitType_initEntries() {
    if (TextLimitType_entriesInitialized)
      return Unit_instance;
    TextLimitType_entriesInitialized = true;
    var tmp = strings_getInstance().yng_1;
    TextLimitType_LIMIT_WORDS_instance = new TextLimitType('LIMIT_WORDS', 0, tmp, 1);
    var tmp_0 = strings_getInstance().zng_1;
    TextLimitType_LIMIT_CHARS_instance = new TextLimitType('LIMIT_CHARS', 1, tmp_0, 2);
  }
  var MarkingType_TEACHER_instance;
  var MarkingType_PEERS_instance;
  function Companion_128() {
  }
  protoOf(Companion_128).nkb = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var indexedObject = values_3();
      var inductionVariable = 0;
      var last = indexedObject.length;
      while (inductionVariable < last) {
        var element = indexedObject[inductionVariable];
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.Companion.valueOf.<anonymous>' call
        if (element.hta_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? first_2(values_3()) : tmp0_elvis_lhs;
  };
  var Companion_instance_177;
  function Companion_getInstance_145() {
    return Companion_instance_177;
  }
  function values_3() {
    return [MarkingType_TEACHER_getInstance(), MarkingType_PEERS_getInstance()];
  }
  function get_entries_1() {
    if ($ENTRIES_1 == null)
      $ENTRIES_1 = enumEntries(values_3());
    return $ENTRIES_1;
  }
  var MarkingType_entriesInitialized;
  function MarkingType_initEntries() {
    if (MarkingType_entriesInitialized)
      return Unit_instance;
    MarkingType_entriesInitialized = true;
    MarkingType_TEACHER_instance = new MarkingType('TEACHER', 0, 1);
    MarkingType_PEERS_instance = new MarkingType('PEERS', 1, 2);
  }
  var $ENTRIES_1;
  function TextLimitType(name, ordinal, stringResource, value) {
    Enum.call(this, name, ordinal);
    this.kta_1 = stringResource;
    this.lta_1 = value;
  }
  function MarkingType(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.hta_1 = value;
  }
  function TextLimitType_LIMIT_WORDS_getInstance() {
    TextLimitType_initEntries();
    return TextLimitType_LIMIT_WORDS_instance;
  }
  function TextLimitType_LIMIT_CHARS_getInstance() {
    TextLimitType_initEntries();
    return TextLimitType_LIMIT_CHARS_instance;
  }
  function MarkingType_TEACHER_getInstance() {
    MarkingType_initEntries();
    return MarkingType_TEACHER_instance;
  }
  function MarkingType_PEERS_getInstance() {
    MarkingType_initEntries();
    return MarkingType_PEERS_instance;
  }
  function ClazzAssignmentViewModelConstants() {
    ClazzAssignmentViewModelConstants_instance = this;
    var tmp = this;
    Companion_getInstance_1();
    var tmp_0 = to(1, strings_getInstance().mn6_1);
    Companion_getInstance_1();
    var tmp_1 = to(2, strings_getInstance().ln6_1);
    Companion_getInstance_1();
    tmp.mta_1 = mapOf([tmp_0, tmp_1, to(0, strings_getInstance().nn6_1)]);
  }
  var ClazzAssignmentViewModelConstants_instance;
  function ClazzAssignmentViewModelConstants_getInstance() {
    if (ClazzAssignmentViewModelConstants_instance == null)
      new ClazzAssignmentViewModelConstants();
    return ClazzAssignmentViewModelConstants_instance;
  }
  function get_isFromSubmitterGroup(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4.lad_1.c7(new Long(0, 0)) > 0) {
      var tmp_0 = _this__u8e3s4.lad_1;
      Companion_getInstance_1();
      tmp = tmp_0.c7(toLong(10000)) < 0;
    } else {
      tmp = false;
    }
    return tmp;
  }
  function asBlobOpenItem(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.fcb_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.dcb_1;
    var tmp_0 = tmp1_elvis_lhs == null ? 'application/octet-stream' : tmp1_elvis_lhs;
    var tmp2_elvis_lhs = _this__u8e3s4.ecb_1;
    return new OpenBlobItem(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs, toLong(_this__u8e3s4.gcb_1));
  }
  function submissionStatusFor(markList, submissionList) {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!markList.c1()) {
      Companion_getInstance_1();
      tmp = 2;
    } else {
      // Inline function 'kotlin.collections.isNotEmpty' call
      if (!submissionList.c1()) {
        Companion_getInstance_1();
        tmp = 1;
      } else {
        Companion_getInstance_1();
        tmp = 0;
      }
    }
    return tmp;
  }
  function latestUniqueMarksByMarker(_this__u8e3s4) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>' call
      // Inline function 'kotlin.collections.maxOf' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination_0 = ArrayList_init_$Create$();
      var tmp0_iterator_0 = _this__u8e3s4.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element_0.rbw_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_1;
        var tmp1_safe_receiver = element.rbw_1;
        if (equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ibw_1)) {
          destination_0.i1(element_0);
        }
      }
      var iterator = destination_0.w();
      if (!iterator.f())
        throw NoSuchElementException_init_$Create$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver_0 = iterator.e().rbw_1;
      var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.obw_1;
      var maxValue = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
      while (iterator.f()) {
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver_1 = iterator.e().rbw_1;
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.obw_1;
        var v = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        if (compareTo(maxValue, v) < 0) {
          maxValue = v;
        }
      }
      var mostRecentTsForSubmitterUid = maxValue;
      var tmp0_safe_receiver_2 = element.rbw_1;
      if (equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.obw_1, mostRecentTsForSubmitterUid)) {
        destination.i1(element);
      }
    }
    return destination;
  }
  function hasUpdatedMarks(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      // Inline function 'kotlin.collections.groupingBy' call
      var tmp$ret$0 = new _no_name_provided__qut3iv_6(_this__u8e3s4);
      var this_0 = eachCount(tmp$ret$0);
      if (this_0.c1()) {
        tmp$ret$1 = false;
        break $l$block_0;
      }
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator = this_0.q2().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.hasUpdatedMarks.<anonymous>' call
        if (element.t2() > 1) {
          tmp$ret$1 = true;
          break $l$block_0;
        }
      }
      tmp$ret$1 = false;
    }
    return tmp$ret$1;
  }
  function averageMark(_this__u8e3s4) {
    var latestUnique = latestUniqueMarksByMarker(_this__u8e3s4);
    if (latestUnique.c1())
      return null;
    // Inline function 'kotlin.apply' call
    var this_0 = new AverageCourseAssignmentMark();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>' call
    var tmp = this_0;
    // Inline function 'kotlin.collections.sumOf' call
    var sum = 0.0;
    var tmp0_iterator = latestUnique.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      var tmp_0 = sum;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver = element.rbw_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lbw_1;
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;
      sum = tmp_0 + (tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);
    }
    tmp.wkc_1 = sum / latestUnique.u();
    var tmp_1 = this_0;
    // Inline function 'kotlin.collections.sumOf' call
    var sum_0 = 0.0;
    var tmp0_iterator_0 = latestUnique.w();
    while (tmp0_iterator_0.f()) {
      var element_0 = tmp0_iterator_0.e();
      var tmp_2 = sum_0;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver_0 = element_0.rbw_1;
      var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.nbw_1;
      var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0;
      sum_0 = tmp_2 + (tmp2_elvis_lhs_0 == null ? 0.0 : tmp2_elvis_lhs_0);
    }
    var tmp$ret$3 = sum_0;
    tmp_1.xkc_1 = roundToInt(tmp$ret$3 / latestUnique.u());
    return this_0;
  }
  function _no_name_provided__qut3iv_6($this) {
    this.nta_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_6).o = function () {
    return this.nta_1.w();
  };
  protoOf(_no_name_provided__qut3iv_6).ota = function (element) {
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.hasUpdatedMarks.<anonymous>' call
    var tmp0_safe_receiver = element.rbw_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_1;
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  };
  protoOf(_no_name_provided__qut3iv_6).p = function (element) {
    return this.ota(element instanceof CourseAssignmentMarkAndMarkerName ? element : THROW_CCE());
  };
  function combineWithSubmissionFiles(_this__u8e3s4, submissionFiles) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.combineWithSubmissionFiles.<anonymous>' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination_0 = ArrayList_init_$Create$();
      var tmp0_iterator_0 = submissionFiles.w();
      while (tmp0_iterator_0.f()) {
        var element = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.combineWithSubmissionFiles.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element.wcb_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zca_1, item.kc2_1)) {
          destination_0.i1(element);
        }
      }
      var tmp$ret$3 = new SubmissionAndFiles(item, destination_0);
      destination.i1(tmp$ret$3);
    }
    return destination;
  }
  function UstadAssignmentSubmissionHeaderUiState(block, assignmentMark, assignmentStatus) {
    block = block === VOID ? null : block;
    assignmentMark = assignmentMark === VOID ? null : assignmentMark;
    assignmentStatus = assignmentStatus === VOID ? null : assignmentStatus;
    this.pta_1 = block;
    this.qta_1 = assignmentMark;
    this.rta_1 = assignmentStatus;
  }
  protoOf(UstadAssignmentSubmissionHeaderUiState).toString = function () {
    return 'UstadAssignmentSubmissionHeaderUiState(block=' + this.pta_1 + ', assignmentMark=' + this.qta_1 + ', assignmentStatus=' + this.rta_1 + ')';
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).hashCode = function () {
    var result = this.pta_1 == null ? 0 : this.pta_1.hashCode();
    result = imul(result, 31) + (this.qta_1 == null ? 0 : this.qta_1.hashCode()) | 0;
    result = imul(result, 31) + (this.rta_1 == null ? 0 : this.rta_1) | 0;
    return result;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadAssignmentSubmissionHeaderUiState))
      return false;
    var tmp0_other_with_cast = other instanceof UstadAssignmentSubmissionHeaderUiState ? other : THROW_CCE();
    if (!equals(this.pta_1, tmp0_other_with_cast.pta_1))
      return false;
    if (!equals(this.qta_1, tmp0_other_with_cast.qta_1))
      return false;
    if (!(this.rta_1 == tmp0_other_with_cast.rta_1))
      return false;
    return true;
  };
  function UstadCourseAssignmentMarkListItemUiState(mark, localDateTimeNow, dayOfWeekStrings) {
    mark = mark === VOID ? new CourseAssignmentMarkAndMarkerName() : mark;
    this.sta_1 = mark;
    this.tta_1 = localDateTimeNow;
    this.uta_1 = dayOfWeekStrings;
  }
  protoOf(UstadCourseAssignmentMarkListItemUiState).vta = function () {
    var tmp0_safe_receiver = this.sta_1.rbw_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_1;
    var tmp;
    if (tmp1_elvis_lhs == null) {
      Companion_getInstance_2();
      tmp = new Long(-1, 2147483647);
    } else {
      tmp = tmp1_elvis_lhs;
    }
    var markerSubmitterUid = tmp;
    var tmp_0;
    Companion_getInstance_1();
    if (markerSubmitterUid.c7(toLong(10000)) < 0) {
      tmp_0 = markerSubmitterUid.mb();
    } else {
      tmp_0 = 0;
    }
    return tmp_0;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).wta = function () {
    var tmp0_elvis_lhs = this.sta_1.sbw_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = this.sta_1.tbw_1;
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).xta = function () {
    return !(this.vta() === 0);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).yta = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.sta_1.rbw_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.UstadCourseAssignmentMarkListItemUiState.<get-camPenaltyVisible>.<anonymous>' call
    var it = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nbw_1;
    return !(it == null) ? !(it === 0.0) : false;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).toString = function () {
    return 'UstadCourseAssignmentMarkListItemUiState(mark=' + this.sta_1 + ', localDateTimeNow=' + this.tta_1 + ', dayOfWeekStrings=' + this.uta_1 + ')';
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).hashCode = function () {
    var result = this.sta_1.hashCode();
    result = imul(result, 31) + this.tta_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.uta_1) | 0;
    return result;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadCourseAssignmentMarkListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof UstadCourseAssignmentMarkListItemUiState ? other : THROW_CCE();
    if (!this.sta_1.equals(tmp0_other_with_cast.sta_1))
      return false;
    if (!this.tta_1.equals(tmp0_other_with_cast.tta_1))
      return false;
    if (!equals(this.uta_1, tmp0_other_with_cast.uta_1))
      return false;
    return true;
  };
  function Companion_129() {
    this.zta_1 = 'CourseAssignment';
  }
  var Companion_instance_178;
  function Companion_getInstance_146() {
    return Companion_instance_178;
  }
  function ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation) {
    this.itb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailViewModel$slambda).ltb = function (clazzAssignment, permissionPair, $completion) {
    var tmp = this.mtb(clazzAssignment, permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof ClazzAssignment) ? p1 : THROW_CCE();
    return this.ltb(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.ktb_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasLearnerRecordPermission = tmp0_container.z6();
          var tmp_0;
          if (hasCourseViewPermission) {
            var tmp_1;
            var tmp1_safe_receiver = this.jtb_1;
            var tmp_2 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a7u_1;
            if (tmp_2 === 2) {
              tmp_1 = true;
            } else {
              tmp_1 = hasLearnerRecordPermission;
            }
            var hasSubmissionsTab = tmp_1;
            Companion_getInstance_125();
            var tmp_3 = to('entityUid', this.itb_1.uqm_1.toString());
            Companion_getInstance_125();
            var tabArgs = mapOf([tmp_3, to('clazzUid', this.itb_1.ktc_1.toString())]);
            var tabs = mutableListOf([new TabItem('CourseAssignmentDetailOverviewView', tabArgs, this.itb_1.aqo().moj(strings_getInstance().un5_1))]);
            if (hasSubmissionsTab) {
              var tmp_4;
              var tmp_5;
              if (!hasLearnerRecordPermission) {
                var tmp2_safe_receiver = this.jtb_1;
                var tmp_6 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.a7u_1;
                tmp_5 = tmp_6 === 2;
              } else {
                tmp_5 = false;
              }
              if (tmp_5) {
                tmp_4 = this.itb_1.aqo().moj(strings_getInstance().ong_1);
              } else {
                tmp_4 = this.itb_1.aqo().moj(strings_getInstance().dnh_1);
              }
              var tabName = tmp_4;
              tabs.i1(new TabItem('CourseAssignmentSubmissionsTab', tabArgs, tabName));
            }
            tmp_0 = new ClazzAssignmentDetailUiState(toList(tabs));
          } else {
            tmp_0 = new ClazzAssignmentDetailUiState(emptyList());
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).mtb = function (clazzAssignment, permissionPair, completion) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this.itb_1, completion);
    i.jtb_1 = clazzAssignment;
    i.ktb_1 = permissionPair;
    return i;
  };
  function ClazzAssignmentDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation);
    var l = function (clazzAssignment, permissionPair, $completion) {
      return i.ltb(clazzAssignment, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.ktc_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var assignmentFlow = this.wqn().q7e().p7s(this.uqm_1, this.ktc_1);
    var tmp_0 = this.wqn().o7f();
    var tmp_1 = this.qqn().joa().vky_1;
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = distinctUntilChanged(tmp_0.gdk(tmp_1, this.ktc_1, tmp_2, new Long(128, 0)));
    var tmp_3 = this;
    tmp_3.jtc_1 = combine(assignmentFlow, permissionFlow, ClazzAssignmentDetailViewModel$slambda_0(this, null));
  }
  function ClazzAssignmentDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.ltc_1 = tabs;
  }
  protoOf(ClazzAssignmentDetailUiState).toString = function () {
    return 'ClazzAssignmentDetailUiState(tabs=' + this.ltc_1 + ')';
  };
  protoOf(ClazzAssignmentDetailUiState).hashCode = function () {
    return hashCode(this.ltc_1);
  };
  protoOf(ClazzAssignmentDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailUiState ? other : THROW_CCE();
    if (!equals(this.ltc_1, tmp0_other_with_cast.ltc_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.utc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).wtc = function (it, $completion) {
    var tmp = this.xtc(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wtc((p1 == null ? true : p1 instanceof AssignmentProgressSummary) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.utc_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.dtd(this.vtc_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).xtc = function (it, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this.utc_1, completion);
    i.vtc_1 = it;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.wtc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mtd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.mtd_1.wqn().q7e().k7s(this.mtd_1.ote_1, this.mtd_1.pte_1, this.mtd_1.sqn(), this.mtd_1.aqo().moj(strings_getInstance().ynf_1));
            var tmp_1 = ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this.mtd_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this.mtd_1, completion);
    i.ntd_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation) {
    this.zte_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.zte_1.wqn().q7d().fe7(this.zte_1.ote_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.zte_1.vqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.dtd(VOID, VOID, VOID, VOID, terminology);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this.zte_1, completion);
    i.atf_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1($this_launch, this$0, resultContinuation) {
    this.jtf_1 = $this_launch;
    this.ktf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.jtf_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this.ktf_1, null));
          launchSetTitleFromClazzUid(this.ktf_1, this.ktf_1.pte_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this.ktf_1));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1(this.jtf_1, this.ktf_1, completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2($this_launch, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_130() {
    this.ltf_1 = 'CourseAssignmentSubmissionsTab';
  }
  var Companion_instance_179;
  function Companion_getInstance_147() {
    return Companion_instance_179;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_15(function_0) {
    this.mtf_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_15).t1d = function (value, $completion) {
    return this.mtf_1(value, $completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().q7e().l7s(this$0.ote_1, this$0.pte_1, this$0.sqn(), this$0.aqo().moj(strings_getInstance().ynf_1), toQueryLikeParam(this$0.eqn_1.t2().eq6_1.tq5_1), this$0.vqv_1.t2().btd_1.tqc_1);
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation) {
    this.vtf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            launch(this.wtf_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this.vtf_1, null));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.vtf_1.vqv_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2(this.wtf_1, this.vtf_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this.vtf_1, completion);
    i.wtf_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel(di, savedStateHandle) {
    var tmp = new ClazzAssignmentDetailSubmissionsTabUiState();
    UstadListViewModel.call(this, di, savedStateHandle, tmp, 'CourseAssignment');
    var tmp_0 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.ote_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_2;
    if (tmp1_elvis_lhs_0 == null) {
      throw IllegalArgumentException_init_$Create$('No ClazzUid provided');
    } else {
      tmp_2 = tmp1_elvis_lhs_0;
    }
    tmp_1.pte_1 = tmp_2;
    var tmp_3 = this;
    tmp_3.qte_1 = ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue = prevValue.dtd(VOID, this.qte_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.eqx());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_4 = this.rqn();
    launch(tmp_4, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this, null));
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).xtf = function (assignmentSubmitter) {
    var tmp = to('assignmentUid', this.ote_1.toString());
    var tmp_0 = to('submitterUid', assignmentSubmitter.r7v_1.toString());
    Companion_getInstance_125();
    this.cqn_1.rp6('CourseAssignmentSubmitter', mapOf([tmp, tmp_0, to('clazzUid', this.pte_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).ytf = function (sortOrderOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.onChangeSortOption.<anonymous>' call
        var nextValue = prevValue.dtd(VOID, VOID, VOID, sortOrderOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).pqw = function (searchText) {
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).qqw = function () {
  };
  function Companion_131() {
    Companion_instance_180 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().pmk_1;
    var tmp_1 = new SortOrderOption(tmp_0, 5, true);
    var tmp_2 = strings_getInstance().pmk_1;
    tmp.ztf_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 6, false)]);
  }
  var Companion_instance_180;
  function Companion_getInstance_148() {
    if (Companion_instance_180 == null)
      new Companion_131();
    return Companion_instance_180;
  }
  function ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    Companion_getInstance_148();
    progressSummary = progressSummary === VOID ? null : progressSummary;
    var tmp;
    if (assignmentSubmitterList === VOID) {
      tmp = ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q;
    } else {
      tmp = assignmentSubmitterList;
    }
    assignmentSubmitterList = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_148().ztf_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    this.ytc_1 = progressSummary;
    this.ztc_1 = assignmentSubmitterList;
    this.atd_1 = sortOptions;
    this.btd_1 = sortOption;
    this.ctd_1 = courseTerminology;
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).atg = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    return new ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).dtd = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology, $super) {
    progressSummary = progressSummary === VOID ? this.ytc_1 : progressSummary;
    assignmentSubmitterList = assignmentSubmitterList === VOID ? this.ztc_1 : assignmentSubmitterList;
    sortOptions = sortOptions === VOID ? this.atd_1 : sortOptions;
    sortOption = sortOption === VOID ? this.btd_1 : sortOption;
    courseTerminology = courseTerminology === VOID ? this.ctd_1 : courseTerminology;
    return $super === VOID ? this.atg(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) : $super.atg.call(this, progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).toString = function () {
    return 'ClazzAssignmentDetailSubmissionsTabUiState(progressSummary=' + this.ytc_1 + ', assignmentSubmitterList=' + this.ztc_1 + ', sortOptions=' + this.atd_1 + ', sortOption=' + this.btd_1 + ', courseTerminology=' + this.ctd_1 + ')';
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).hashCode = function () {
    var result = this.ytc_1 == null ? 0 : hashCode(this.ytc_1);
    result = imul(result, 31) + hashCode(this.ztc_1) | 0;
    result = imul(result, 31) + hashCode(this.atd_1) | 0;
    result = imul(result, 31) + this.btd_1.hashCode() | 0;
    result = imul(result, 31) + (this.ctd_1 == null ? 0 : hashCode(this.ctd_1)) | 0;
    return result;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailSubmissionsTabUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailSubmissionsTabUiState ? other : THROW_CCE();
    if (!equals(this.ytc_1, tmp0_other_with_cast.ytc_1))
      return false;
    if (!equals(this.ztc_1, tmp0_other_with_cast.ztc_1))
      return false;
    if (!equals(this.atd_1, tmp0_other_with_cast.atd_1))
      return false;
    if (!this.btd_1.equals(tmp0_other_with_cast.btd_1))
      return false;
    if (!equals(this.ctd_1, tmp0_other_with_cast.ctd_1))
      return false;
    return true;
  };
  function _AssignmentSubmitterSummaryUiState___init__impl__s3rgxm(person) {
    return person;
  }
  function _AssignmentSubmitterSummaryUiState___get_person__impl__o629k2($this) {
    return $this;
  }
  function _AssignmentSubmitterSummaryUiState___get_fileSubmissionStatusIconVisible__impl__so25h0($this) {
    var tmp = _AssignmentSubmitterSummaryUiState___get_person__impl__o629k2($this).v7v_1;
    Companion_getInstance_1();
    return !(tmp === 0);
  }
  function _AssignmentSubmitterSummaryUiState___get_latestPrivateCommentVisible__impl__bdq0p0($this) {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = _AssignmentSubmitterSummaryUiState___get_person__impl__o629k2($this).u7v_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  }
  function AssignmentSubmitterSummaryUiState__toString_impl_fdil8u($this) {
    return 'AssignmentSubmitterSummaryUiState(person=' + $this + ')';
  }
  function AssignmentSubmitterSummaryUiState__hashCode_impl_6dnbk1($this) {
    return $this.hashCode();
  }
  function AssignmentSubmitterSummaryUiState__equals_impl_zhk063($this, other) {
    if (!(other instanceof AssignmentSubmitterSummaryUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AssignmentSubmitterSummaryUiState ? other.btg_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function AssignmentSubmitterSummaryUiState(person) {
    this.btg_1 = person;
  }
  protoOf(AssignmentSubmitterSummaryUiState).toString = function () {
    return AssignmentSubmitterSummaryUiState__toString_impl_fdil8u(this.btg_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).hashCode = function () {
    return AssignmentSubmitterSummaryUiState__hashCode_impl_6dnbk1(this.btg_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).equals = function (other) {
    return AssignmentSubmitterSummaryUiState__equals_impl_zhk063(this.btg_1, other);
  };
  function get_listItemUiState(_this__u8e3s4) {
    return _AssignmentSubmitterSummaryUiState___init__impl__s3rgxm(_this__u8e3s4);
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ktg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).qqa = function (it, $completion) {
    var tmp = this.rqa(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.ltg_1.xq9_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newSubmissionHtml = tmp_1;
          this.ktg_1.dti(newSubmissionHtml);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).rqa = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this.ktg_1, completion);
    i.ltg_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.qqa(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mti_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).oti = function (assignmentData, $completion) {
    var tmp = this.pti(assignmentData, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.oti((p1 == null ? true : p1 instanceof ClazzAssignmentCourseBlockAndSubmitterUid) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.mti_1.jth_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.nti_1;
              var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u7y_1;
              Companion_getInstance_1();
              var isEnrolledButNotInGroup = equals(tmp_0, new Long(-1, -1));
              var tmp1_safe_receiver = this.nti_1;
              var tmp9_assignment = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q7y_1;
              var tmp2_safe_receiver = this.nti_1;
              var tmp10_courseBlock = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.r7y_1;
              var tmp3_safe_receiver = this.nti_1;
              var tmp11_courseBlockPicture = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.s7y_1;
              var tmp5_safe_receiver = this.nti_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.u7y_1;
              var tmp12_submitterUid = tmp6_elvis_lhs == null ? new Long(0, 0) : tmp6_elvis_lhs;
              var tmp4_safe_receiver = this.nti_1;
              var tmp13_courseGroupSet = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.t7y_1;
              var tmp_1;
              if (isEnrolledButNotInGroup) {
                tmp_1 = this.mti_1.aqo().moj(strings_getInstance().nnk_1);
              } else {
                tmp_1 = null;
              }
              var tmp14_unassignedError = tmp_1;
              var tmp7_safe_receiver = this.nti_1;
              var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.v7y_1;
              var tmp15_showModerateOptions = tmp8_elvis_lhs == null ? false : tmp8_elvis_lhs;
              var nextValue = prevValue.rtj(tmp9_assignment, tmp10_courseBlock, tmp11_courseBlockPicture, tmp13_courseGroupSet, tmp12_submitterUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp14_unassignedError, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp15_showModerateOptions);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).pti = function (assignmentData, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.mti_1, completion);
    i.nti_1 = assignmentData;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (assignmentData, $completion) {
      return i.oti(assignmentData, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).ctk = function (submissions, submissionFiles, $completion) {
    var tmp = this.dtk(submissions, submissionFiles, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.ctk(tmp, (!(p2 == null) ? isInterface(p2, List) : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return combineWithSubmissionFiles(this.atk_1, this.btk_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).dtk = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.atk_1 = submissions;
    i.btk_1 = submissionFiles;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (submissions, submissionFiles, $completion) {
      return i.ctk(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.mtk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).otk = function (it, $completion) {
    var tmp = this.ptk(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.otk((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.mtk_1.jth_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ntk_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ptk = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.mtk_1, completion);
    i.ntk_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.otk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.ytk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).atl = function (it, $completion) {
    var tmp = this.btl(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.atl((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ytk_1.jth_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ztk_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).btl = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.ytk_1, completion);
    i.ztk_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.atl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.ktl_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).otl = function (value, $completion) {
    var tmp = this.ptl(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.otl(p1 instanceof ClazzAssignmentDetailoverviewSubmissionUiState ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.mtl_1 = this.ktl_1;
            var tmp_1 = this;
            tmp_1.ntl_1 = this.ltl_1;
            this.hd_1 = 1;
            var tmp0_safe_receiver = this.ntl_1.qtl_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kc2_1;
            suspendResult = this.mtl_1.t1d(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).ptl = function (value, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.ktl_1, completion);
    i.ltl_1 = value;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.otl(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$70(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ztl_1 = _this__u8e3s4;
    this.atm_1 = collector;
  }
  protoOf($collectCOROUTINE$70).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.btm_1 = this.atm_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.btm_1, null);
            suspendResult = this.ztl_1.ctm_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ltm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).ntm = function (it, $completion) {
    var tmp = this.otm(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ntm((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ltm_1.jth_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.rtj(VOID, VOID, VOID, VOID, VOID, this.mtm_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).otm = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.ltm_1, completion);
    i.mtm_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ntm(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_7($this) {
    this.ctm_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_7).ptm = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$70(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_7).a1c = function (collector, $completion) {
    return this.ptm(collector, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.ytm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).atn = function (submissionUid, $completion) {
    var tmp = this.btn(submissionUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.atn(p1 instanceof Long ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.ytm_1.uqn().s7e().aca(this.ztm_1));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.ytm_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).btn = function (submissionUid, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.ytm_1, completion);
    i.ztm_1 = submissionUid;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (submissionUid, $completion) {
      return i.atn(submissionUid, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation) {
    this.ktn_1 = $entityFlow;
    this.ltn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.ltn_1, null);
            suspendResult = this.ktn_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            throwKotlinNothingValueException();
            break;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1(this.ktn_1, this.ltn_1, completion);
    i.mtn_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2($entityFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.vtn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.xtn_1 = this.vtn_1.wqn().r7e().vc1(this.vtn_1.sqn(), this.vtn_1.uqm_1);
            this.ytn_1 = this.vtn_1.wqn().s7e().bca(this.vtn_1.sqn(), this.vtn_1.uqm_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.xtn_1, this.ytn_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.vtn_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this.vtn_1, completion);
    i.wtn_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.hto_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.hto_1.wqn().t7e().pbv(this.hto_1.sqn(), this.hto_1.uqm_1);
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.hto_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this.hto_1, completion);
    i.ito_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.rto_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.rto_1.lth_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_7(this_0));
            suspendResult = collectLatest(tmp_0, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.rto_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this.rto_1, completion);
    i.sto_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation) {
    this.btp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.btp_1.eqo(this.btp_1.xqn(), 'submissionHtml');
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this.btp_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this.btp_1, completion);
    i.ctp_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1($this_launch, this$0, $entityFlow, resultContinuation) {
    this.ltp_1 = $this_launch;
    this.mtp_1 = this$0;
    this.ntp_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.ltp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2(this.ntp_1, this.mtp_1, null));
          launchSetTitleFromClazzUid(this.mtp_1, this.mtp_1.uth_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this.mtp_1));
          launch(this.ltp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this.mtp_1, null));
          launch(this.ltp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this.mtp_1, null));
          launch(this.ltp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this.mtp_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1(this.ltp_1, this.mtp_1, this.ntp_1, completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2($this_launch, this$0, $entityFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1($this_launch, this$0, $entityFlow, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this$0, $file, resultContinuation) {
    this.wtp_1 = this$0;
    this.xtp_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.wtp_1.wqn().s7e();
            var tmp0_safe_receiver = this.xtp_1.wcb_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yca_1;
            suspendResult = tmp_0.eca(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).yny = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this.wtp_1, this.xtp_1, completion);
    i.ytp_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this$0, $file, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this$0, $file, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.jth_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.openSubmissionFileAsBlob.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_saveAndUploadUseCase__bjy5rj($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vth_1;
    saveAndUploadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelTransferJobUseCase__o6e2y4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wth_1;
    cancelTransferJobUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xth_1;
    openBlobUiUseCase$factory_0();
    return this_0.t2();
  }
  function _get_ustadAccountManager__el9prc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zth_1;
    ustadAccountManager$factory_0();
    return this_0.t2();
  }
  function _get_showSocialWarningUseCase__ft8jc6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ati_1;
    showSocialWarningUseCase$factory_0();
    return this_0.t2();
  }
  function _get_dismissSocialWarningUseCase__st8mv5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bti_1;
    dismissSocialWarningUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cti_1;
    openExternalLinkUseCase$factory_0();
    return this_0.t2();
  }
  function newCourseAssignmentSubmission($this) {
    var tmp = get_doorPrimaryKeyManager($this.uqn());
    Companion_getInstance_1();
    var tmp0_casUid = tmp.n62(522);
    var tmp1_casAssignmentUid = $this.uqm_1;
    var tmp2_casClazzUid = $this.uth_1;
    var tmp3_casSubmitterPersonUid = $this.qqn().uo9().onu_1.f96_1;
    return new CourseAssignmentSubmission(tmp0_casUid, tmp1_casAssignmentUid, VOID, tmp3_casSubmitterPersonUid, '', VOID, VOID, tmp2_casClazzUid);
  }
  function openSubmissionFileAsBlob($this, file, intent) {
    var tmp0_elvis_lhs = file.wcb_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.yth_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.rqn();
    tmp_0.yth_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_132() {
    this.ztp_1 = 'latestSubmission';
    this.atq_1 = 'submissionHtml';
    this.btq_1 = 'CourseAssignmentDetailOverviewView';
  }
  var Companion_instance_181;
  function Companion_getInstance_149() {
    return Companion_instance_181;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_16(function_0) {
    this.ctq_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_16).t1d = function (value, $completion) {
    return this.ctq_1(value, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().u7e().oac(this$0.sqn(), this$0.uqm_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().u7e().qac(this$0.uqm_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    this.ltq_1 = this$0;
    this.mtq_1 = $savedStateHandle;
    this.ntq_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.ltq_1.fqo(this.mtq_1, 'latestSubmission', Companion_getInstance_1().n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ptq_1 = suspendResult;
            this.qtq_1 = this.ptq_1 == null ? newCourseAssignmentSubmission(this.ltq_1) : this.ptq_1;
            l$ret$1: do {
              var this_0 = this.ltq_1.lth_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.rtq(this.qtq_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.otq_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this.ltq_1, null));
            this.hd_1 = 2;
            suspendResult = whenSubscribed(this.ltq_1.jth_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2(this.otq_1, this.ltq_1, this.ntq_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda(this.ltq_1, this.mtq_1, this.ntq_1, completion);
    i.otq_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda_0(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda(this$0, resultContinuation) {
    this.atr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          _get_dismissSocialWarningUseCase__st8mv5(this.atr_1).wp1(toString_0(_get_ustadAccountManager__el9prc(this.atr_1).uo9().onu_1.g96_1));
          l$ret$1: do {
            var this_0 = this.atr_1.jth_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda(this.atr_1, completion);
    i.btr_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda($text) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.oc2_1 = $text;
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda($submissionToSave, this$0, resultContinuation) {
    this.ktr_1 = $submissionToSave;
    this.ltr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ktr_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ltr_1.gqo(this.ltr_1.aqn_1, 'latestSubmission', Companion_getInstance_1().n4r(), this.ktr_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda(this.ktr_1, this.ltr_1, completion);
    i.mtr_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0($submissionToSave, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda($submissionToSave, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this$0, $submitterUid, resultContinuation) {
    this.vtr_1 = this$0;
    this.wtr_1 = $submitterUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.hd_1 = 2;
            var tmp_0 = this.vtr_1.wqn().u7e();
            var this_0 = new Comments();
            this_0.kad_1 = this.wtr_1;
            this_0.jad_1 = this.vtr_1.sqn();
            this_0.lad_1 = this.vtr_1.jth_1.t2().uti_1;
            this_0.had_1 = this.vtr_1.uqm_1;
            this_0.gad_1 = this.vtr_1.nth_1.t2();
            this_0.oad_1 = systemTimeInMillis();
            suspendResult = tmp_0.mac(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.vtr_1.nth_1.x1k('');
            tmp_1.ytr_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.vtr_1.cqo(Companion_getInstance_97().uq6_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.vtr_1.cqo(Companion_getInstance_97().uq6_1);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this.vtr_1, this.wtr_1, completion);
    i.xtr_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this$0, $submitterUid, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this$0, $submitterUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this$0, resultContinuation) {
    this.hts_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.hd_1 = 2;
            var tmp_0 = this.hts_1.wqn().u7e();
            var this_0 = new Comments();
            this_0.kad_1 = new Long(0, 0);
            this_0.jad_1 = this.hts_1.sqn();
            this_0.had_1 = this.hts_1.uqm_1;
            this_0.gad_1 = this.hts_1.pth_1.t2();
            this_0.oad_1 = systemTimeInMillis();
            suspendResult = tmp_0.mac(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.hts_1.pth_1.x1k('');
            tmp_1.jts_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.hts_1.cqo(Companion_getInstance_97().uq6_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.hts_1.cqo(Companion_getInstance_97().uq6_1);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this.hts_1, completion);
    i.its_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this$0, $size, $mimeType, $fileName, $uri, resultContinuation) {
    this.sts_1 = this$0;
    this.tts_1 = $size;
    this.uts_1 = $mimeType;
    this.vts_1 = $fileName;
    this.wts_1 = $uri;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            var tmp_0 = get_doorPrimaryKeyManager(this.sts_1.uqn());
            suspendResult = tmp_0.o62(90, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.yts_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.sts_1.lth_1.t2().qtl_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kc2_1;
            tmp_1.zts_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.att_1 = this.sts_1.jth_1.t2().uti_1;
            this.btt_1 = this.tts_1.mb();
            this.ctt_1 = this.sts_1.uqm_1;
            this.dtt_1 = this.sts_1.uth_1;
            this.ett_1 = new CourseAssignmentSubmissionFile(this.yts_1, this.zts_1, this.att_1, this.ctt_1, this.dtt_1, this.uts_1, this.vts_1, this.wts_1, this.btt_1);
            this.hd_1 = 2;
            suspendResult = this.sts_1.uqn().s7e().zc9(listOf_0(this.ett_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.id_1 = 4;
            this.hd_1 = 3;
            var tmp_2 = _get_saveAndUploadUseCase__bjy5rj(this.sts_1);
            var tmp_3 = this.ett_1.yca_1;
            suspendResult = tmp_2.oor(listOf_0(new SaveLocalUriAsBlobItem(this.wts_1, tmp_3, 90, this.uts_1, VOID, true)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.id_1 = 6;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.id_1 = 6;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().m5e('WARNING: Exception attempting to save/enqueue submission file', e);
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 6;
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this.sts_1, this.tts_1, this.uts_1, this.vts_1, this.wts_1, completion);
    i.xts_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this$0, $size, $mimeType, $fileName, $uri, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this$0, $size, $mimeType, $fileName, $uri, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this$0, $submission, resultContinuation) {
    this.ntt_1 = this$0;
    this.ott_1 = $submission;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 6;
            this.id_1 = 5;
            this.hd_1 = 2;
            suspendResult = this.ntt_1.ith_1.ooj(this.ntt_1.wqn(), this.ntt_1.jth_1.t2().uti_1, this.ntt_1.uqm_1, this.ntt_1.qqn().uo9().onu_1.f96_1, this.ott_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_0 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var this_0 = this.ntt_1.lth_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.rtq(newCourseAssignmentSubmission(this.ntt_1));
                if (this_0.y1k(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_0.rtt_1 = tmp$ret$0.qtl_1;
            l$ret$3: do {
              var this_1 = this.ntt_1.jth_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.rtt_1 == null)) {
              this.hd_1 = 3;
              suspendResult = this.ntt_1.gqo(this.ntt_1.aqn_1, 'latestSubmission', Companion_getInstance_1().n4r(), this.rtt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var tmp_1 = this;
            this.ntt_1.yqn().bq7(new Snack(this.ntt_1.aqo().moj(strings_getInstance().mn6_1)));
            tmp_1.qtt_1 = Unit_instance;
            this.id_1 = 7;
            this.hd_1 = 8;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Exception) {
              var e = this.kd_1;
              var tmp_3 = this;
              Napier_getInstance().q5e('Exception submitting assignment: ' + e, e);
              l$ret$7: do {
                var this_2 = this.ntt_1.jth_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, e.message);
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              tmp_3.qtt_1 = Unit_instance;
              this.id_1 = 7;
              this.hd_1 = 8;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            this.id_1 = 7;
            var t = this.kd_1;
            l$ret$9: do {
              var this_3 = this.ntt_1.jth_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_3.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            this.ntt_1.cqo(Companion_getInstance_97().uq6_1);
            throw t;
          case 7:
            throw this.kd_1;
          case 8:
            this.id_1 = 7;
            l$ret$11: do {
              var this_4 = this.ntt_1.jth_1;
              while (true) {
                var prevValue_3 = this_4.t2();
                var nextValue_3 = prevValue_3.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_4.y1k(prevValue_3, nextValue_3)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            this.ntt_1.cqo(Companion_getInstance_97().uq6_1);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 7) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this.ntt_1, this.ott_1, completion);
    i.ptt_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this$0, $submission, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this$0, $submission, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this$0, $file, resultContinuation) {
    this.atu_1 = this$0;
    this.btu_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            var tmp_0 = this.atu_1.wqn();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this.atu_1, this.btu_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var tmp0_safe_receiver = this.btu_1.xcb_1;
            tmp_1.dtu_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zcb_1;
            if (this.dtu_1 == null) {
              this.etu_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.ftu_1 = this.dtu_1;
              var tmp_3 = this;
              tmp_3.gtu_1 = this.ftu_1;
              this.htu_1 = _get_cancelTransferJobUseCase__o6e2y4(this.atu_1);
              if (this.htu_1 == null) {
                this.itu_1 = null;
                this.hd_1 = 3;
                continue $sm;
              } else {
                this.hd_1 = 2;
                suspendResult = this.htu_1.i1i(this.gtu_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 2:
            var tmp_4 = this;
            tmp_4.itu_1 = Unit_instance;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.etu_1 = this.ftu_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this.atu_1, this.btu_1, completion);
    i.ctu_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this$0, $file, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this$0, $file, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation) {
    this.rtu_1 = this$0;
    this.stu_1 = $submissionFile;
    this.ttu_1 = $intent;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.vtu_1 = _get_openBlobUiUseCase__fzusqz(this.rtu_1);
            if (this.vtu_1 == null) {
              this.wtu_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.stu_1);
              suspendResult = this.vtu_1.sop(tmp_0, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this.rtu_1), this.ttu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.wtu_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this.rtu_1, this.stu_1, this.ttu_1, completion);
    i.utu_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0(this$0, $submissionFile, $intent, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation) {
    this.ftv_1 = this$0;
    this.gtv_1 = $comments;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.ftv_1.wqn().u7e().nac(this.gtv_1.fad_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ftv_1.yqn().bq7(new Snack(this.ftv_1.aqo().moj(strings_getInstance().lmj_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this.ftv_1, this.gtv_1, completion);
    i.htv_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this$0, $comments, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel(di, savedStateHandle, submitAssignmentUseCase) {
    var tmp;
    if (submitAssignmentUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.d58(tmp$ret$0, null);
      tmp = new SubmitAssignmentUseCase(tmp$ret$1);
    } else {
      tmp = submitAssignmentUseCase;
    }
    submitAssignmentUseCase = tmp;
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    this.ith_1 = submitAssignmentUseCase;
    this.jth_1 = MutableStateFlow(new ClazzAssignmentDetailOverviewUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.aqo().hq5()));
    this.kth_1 = asStateFlow(this.jth_1);
    this.lth_1 = MutableStateFlow(new ClazzAssignmentDetailoverviewSubmissionUiState());
    this.mth_1 = asStateFlow(this.lth_1);
    this.nth_1 = MutableStateFlow('');
    this.oth_1 = asStateFlow(this.nth_1);
    this.pth_1 = MutableStateFlow('');
    this.qth_1 = asStateFlow(this.pth_1);
    var tmp_2 = this;
    tmp_2.rth_1 = ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_3 = this;
    tmp_3.sth_1 = ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this);
    this.tth_1 = null;
    var tmp_4 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_5;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('clazzUid arg is required');
    } else {
      tmp_5 = tmp1_elvis_lhs;
    }
    tmp_4.uth_1 = tmp_5;
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.vth_1 = Instance(this_0, tmp$ret$2, null).a5d(this, saveAndUploadUseCase$factory());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(CancelBlobUploadClientUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_8.wth_1 = InstanceOrNull(this_1, tmp$ret$4, null).a5d(this, cancelTransferJobUseCase$factory());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_2 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.xth_1 = InstanceOrNull(this_2, tmp$ret$6, null).a5d(this, openBlobUiUseCase$factory());
    this.yth_1 = null;
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.zth_1 = Instance(di, tmp$ret$8, null).a5d(this, ustadAccountManager$factory());
    var tmp_14 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_15 = typeToken(createKType(getKClass(ShowSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_15, TypeToken) ? tmp_15 : THROW_CCE();
    tmp_14.ati_1 = Instance(di, tmp$ret$10, null).a5d(this, showSocialWarningUseCase$factory());
    var tmp_16 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_17 = typeToken(createKType(getKClass(DismissSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
    tmp_16.bti_1 = Instance(di, tmp$ret$12, null).a5d(this, dismissSocialWarningUseCase$factory());
    var tmp_18 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_19 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
    tmp_18.cti_1 = Instance(di, tmp$ret$14, null).a5d(this, openExternalLinkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.jth_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp_20 = this.sqn();
        var tmp_21 = this.qqn().uo9().onu_1.ckr();
        var tmp0_safe_receiver_0 = this.qqn().uo9().qnu_1;
        var nextValue = prevValue.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_20, tmp_21, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.g97_1, VOID, VOID, VOID, VOID, VOID, VOID, _get_showSocialWarningUseCase__ft8jc6(this).up9(toString_0(_get_ustadAccountManager__el9prc(this).uo9().onu_1.g96_1)));
        if (this_3.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var entityFlow = shareIn(this.wqn().q7e().t7s(this.uqm_1, this.uth_1, this.qqn().joa().vky_1), this.rqn(), Companion_getInstance_12().v1h());
    var tmp_22 = this.rqn();
    launch(tmp_22, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda_0(this, savedStateHandle, entityFlow, null));
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.jth_1;
      while (true) {
        var prevValue_0 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp0_privateComments = this.rth_1;
        var tmp1_courseComments = this.sth_1;
        var nextValue_0 = prevValue_0.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_courseComments, tmp0_privateComments);
        if (this_4.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel).itv = function () {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).jtv = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.jth_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickMarksFilterChip.<anonymous>' call
        var nextValue = prevValue.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.pq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).dti = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.lth_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onChangeSubmissionText.<anonymous>' call
        var tmp0_safe_receiver = prevValue.qtl_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_0(tmp0_safe_receiver, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda(text));
        }
        var nextValue = prevValue.rtq(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var submissionToSave = tmp$ret$1.qtl_1;
    var tmp0_safe_receiver_0 = this.tth_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.rqn();
    tmp_0.tth_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0(submissionToSave, this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ktv = function (text) {
    this.nth_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ltv = function () {
    var submitterUid = this.jth_1.t2().uti_1;
    if (submitterUid.c7(new Long(0, 0)) <= 0)
      return Unit_instance;
    if (this.dqo().equals(Companion_getInstance_97().tq6_1))
      return Unit_instance;
    this.cqo(Companion_getInstance_97().tq6_1);
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this, submitterUid, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).mtv = function (text) {
    this.pth_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ntv = function () {
    if (this.dqo().equals(Companion_getInstance_97().tq6_1))
      return Unit_instance;
    this.cqo(Companion_getInstance_97().tq6_1);
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).otv = function (uri, fileName, mimeType, size) {
    var tmp0_safe_receiver = this.jth_1.t2().qti_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x7t_1;
    var assignmentSizeLimit = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    if (size.c7(toLong(imul(imul(assignmentSizeLimit, 1024), 1024))) > 0) {
      this.yqn().bq7(new Snack(this.aqo().moj(strings_getInstance().ymt_1)));
      return Unit_instance;
    }
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this, size, mimeType, fileName, uri, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ptv = function () {
    if (!this.jth_1.t2().btj_1)
      return Unit_instance;
    var tmp0_elvis_lhs = this.lth_1.t2().qtl_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submission = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.jth_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickSubmit.<anonymous>' call
        var nextValue = prevValue.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.cqo(Companion_getInstance_97().tq6_1);
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this, submission, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).qtv = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.jth_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.rtj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.ntj_1, submission.kc2_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).rtv = function () {
    Companion_getInstance_125();
    var tmp0_safe_receiver = this.jth_1.t2().tti_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a7z_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    var tmp = to('entityUid', tmp2_elvis_lhs == null ? '0' : tmp2_elvis_lhs);
    Companion_getInstance_125();
    this.cqn_1.rp6('CourseGroupSet', mapOf([tmp, to('clazzUid', this.uth_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).stv = function (file) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this, file, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ttv = function (file) {
    openSubmissionFileAsBlob(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).utv = function (comments) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq($this) {
    return latestUniqueMarksByMarker($this.yti_1);
  }
  function ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn_0() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailOverviewUiState(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning) {
    assignment = assignment === VOID ? null : assignment;
    courseBlock = courseBlock === VOID ? null : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? null : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    submitterUid = submitterUid === VOID ? new Long(0, 0) : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? emptyList() : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? false : submissionTooLong;
    submissions = submissions === VOID ? emptyList() : submissions;
    markList = markList === VOID ? emptyList() : markList;
    var tmp;
    if (courseComments === VOID) {
      tmp = ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn;
    } else {
      tmp = courseComments;
    }
    courseComments = tmp;
    var tmp_0;
    if (privateComments === VOID) {
      tmp_0 = ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn_0;
    } else {
      tmp_0 = privateComments;
    }
    privateComments = tmp_0;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_1;
    if (selectedChipId === VOID) {
      tmp_1 = 1;
    } else {
      tmp_1 = selectedChipId;
    }
    selectedChipId = tmp_1;
    var tmp_2;
    if (gradeFilterChips === VOID) {
      var tmp_3 = strings_getInstance().gnl_1;
      var tmp_4 = new MessageIdOption2(tmp_3, 1);
      var tmp_5 = strings_getInstance().wmz_1;
      tmp_2 = listOf([tmp_4, new MessageIdOption2(tmp_5, 0)]);
    } else {
      tmp_2 = gradeFilterChips;
    }
    gradeFilterChips = tmp_2;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? new UstadAssignmentSubmissionHeaderUiState() : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? null : unassignedError;
    submissionError = submissionError === VOID ? null : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? '' : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? null : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? emptyMap() : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? null : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    showSocialWarning = showSocialWarning === VOID ? true : showSocialWarning;
    this.qti_1 = assignment;
    this.rti_1 = courseBlock;
    this.sti_1 = courseBlockPicture;
    this.tti_1 = courseGroupSet;
    this.uti_1 = submitterUid;
    this.vti_1 = editableSubmissionFiles;
    this.wti_1 = submissionTooLong;
    this.xti_1 = submissions;
    this.yti_1 = markList;
    this.zti_1 = courseComments;
    this.atj_1 = privateComments;
    this.btj_1 = fieldsEnabled;
    this.ctj_1 = selectedChipId;
    this.dtj_1 = gradeFilterChips;
    this.etj_1 = submissionHeaderUiState;
    this.ftj_1 = unassignedError;
    this.gtj_1 = submissionError;
    this.htj_1 = activeUserPersonUid;
    this.itj_1 = activeUserPersonName;
    this.jtj_1 = activeUserPictureUri;
    this.ktj_1 = courseTerminology;
    this.ltj_1 = localDateTimeNow;
    this.mtj_1 = dayOfWeekStringMap;
    this.ntj_1 = collapsedSubmissions;
    this.otj_1 = openingFileSubmissionState;
    this.ptj_1 = showModerateOptions;
    this.qtj_1 = showSocialWarning;
  }
  protoOf(ClazzAssignmentDetailOverviewUiState).vtv = function () {
    var tmp0_safe_receiver = this.rti_1;
    return isDateSet(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7y_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).wtv = function () {
    return this.xtv();
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ytv = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = this.ftj_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ztv = function () {
    var tmp0_safe_receiver = this.qti_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s7t_1) === true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).atw = function () {
    return this.uti_1.c7(new Long(0, 0)) > 0;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).btw = function () {
    var tmp;
    if (this.atw()) {
      var tmp0_safe_receiver = this.qti_1;
      tmp = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t7t_1) === true;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ctw = function () {
    var timeNow = systemTimeInMillis();
    var tmp0_safe_receiver = this.rti_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7y_1;
    if (timeNow.c7(tmp1_elvis_lhs == null ? get_UNSET_DISTANT_FUTURE() : tmp1_elvis_lhs) < 0) {
      return true;
    }
    var tmp;
    var tmp2_safe_receiver = this.rti_1;
    if (isDateSet(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.d7y_1)) {
      var tmp3_safe_receiver = this.rti_1;
      var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.d7y_1;
      tmp = timeNow.c7(tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs) <= 0;
    } else {
      tmp = false;
    }
    if (tmp) {
      return true;
    }
    return false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).xtv = function () {
    if (!this.atw())
      return false;
    if (!this.ctw())
      return false;
    var tmp;
    var tmp0_safe_receiver = this.qti_1;
    var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z7t_1;
    if (tmp_0 === 1) {
      // Inline function 'kotlin.collections.isNotEmpty' call
      tmp = !this.xti_1.c1();
    } else {
      tmp = false;
    }
    if (tmp) {
      return false;
    }
    return true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).dtw = function () {
    var tmp;
    var tmp_0;
    if (this.xtv()) {
      var tmp0_safe_receiver = this.qti_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7t_1) === true;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.vti_1.u() < this.qti_1.y7t_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).etw = function () {
    return this.atw() ? submissionStatusFor(this.yti_1, this.xti_1) : null;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ftw = function () {
    return !(this.gtw() == null);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).htw = function () {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewUiState.<get-latePenaltyVisible>.<anonymous>' call
    var it = this.gtw();
    return !(it == null) ? !(it.xkc_1 === 0) : false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).itw = function () {
    var tmp;
    var tmp0_safe_receiver = this.qti_1;
    if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7u_1) === true) {
      tmp = this.xtv();
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).jtw = function () {
    var tmp;
    if (this.ctj_1 === 1) {
      tmp = _get_latestUniqueMarksByMarker__e0a3pq(this);
    } else {
      tmp = this.yti_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).gtw = function () {
    return averageMark(this.yti_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ktw = function () {
    var tmp0_safe_receiver = this.qti_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q7t_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewUiState.<get-isGroupSubmission>.<anonymous>' call
      tmp = !tmp1_safe_receiver.equals(new Long(0, 0));
    }
    var tmp2_elvis_lhs = tmp;
    return tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ltw = function (assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning) {
    return new ClazzAssignmentDetailOverviewUiState(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).rtj = function (assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning, $super) {
    assignment = assignment === VOID ? this.qti_1 : assignment;
    courseBlock = courseBlock === VOID ? this.rti_1 : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? this.sti_1 : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? this.tti_1 : courseGroupSet;
    submitterUid = submitterUid === VOID ? this.uti_1 : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? this.vti_1 : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? this.wti_1 : submissionTooLong;
    submissions = submissions === VOID ? this.xti_1 : submissions;
    markList = markList === VOID ? this.yti_1 : markList;
    courseComments = courseComments === VOID ? this.zti_1 : courseComments;
    privateComments = privateComments === VOID ? this.atj_1 : privateComments;
    fieldsEnabled = fieldsEnabled === VOID ? this.btj_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.ctj_1 : selectedChipId;
    gradeFilterChips = gradeFilterChips === VOID ? this.dtj_1 : gradeFilterChips;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? this.etj_1 : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? this.ftj_1 : unassignedError;
    submissionError = submissionError === VOID ? this.gtj_1 : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.htj_1 : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? this.itj_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.jtj_1 : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? this.ktj_1 : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? this.ltj_1 : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? this.mtj_1 : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.ntj_1 : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? this.otj_1 : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? this.ptj_1 : showModerateOptions;
    showSocialWarning = showSocialWarning === VOID ? this.qtj_1 : showSocialWarning;
    return $super === VOID ? this.ltw(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning) : $super.ltw.call(this, assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).toString = function () {
    return 'ClazzAssignmentDetailOverviewUiState(assignment=' + this.qti_1 + ', courseBlock=' + this.rti_1 + ', courseBlockPicture=' + this.sti_1 + ', courseGroupSet=' + this.tti_1 + ', submitterUid=' + this.uti_1.toString() + ', editableSubmissionFiles=' + this.vti_1 + ', submissionTooLong=' + this.wti_1 + ', submissions=' + this.xti_1 + ', markList=' + this.yti_1 + ', courseComments=' + this.zti_1 + ', privateComments=' + this.atj_1 + ', fieldsEnabled=' + this.btj_1 + ', selectedChipId=' + this.ctj_1 + ', gradeFilterChips=' + this.dtj_1 + ', submissionHeaderUiState=' + this.etj_1 + ', unassignedError=' + this.ftj_1 + ', submissionError=' + this.gtj_1 + ', activeUserPersonUid=' + this.htj_1.toString() + ', activeUserPersonName=' + this.itj_1 + ', activeUserPictureUri=' + this.jtj_1 + ', courseTerminology=' + this.ktj_1 + ', localDateTimeNow=' + this.ltj_1 + ', dayOfWeekStringMap=' + this.mtj_1 + ', collapsedSubmissions=' + this.ntj_1 + ', openingFileSubmissionState=' + this.otj_1 + ', showModerateOptions=' + this.ptj_1 + ', showSocialWarning=' + this.qtj_1 + ')';
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).hashCode = function () {
    var result = this.qti_1 == null ? 0 : this.qti_1.hashCode();
    result = imul(result, 31) + (this.rti_1 == null ? 0 : this.rti_1.hashCode()) | 0;
    result = imul(result, 31) + (this.sti_1 == null ? 0 : this.sti_1.hashCode()) | 0;
    result = imul(result, 31) + (this.tti_1 == null ? 0 : hashCode(this.tti_1)) | 0;
    result = imul(result, 31) + this.uti_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.vti_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wti_1) | 0;
    result = imul(result, 31) + hashCode(this.xti_1) | 0;
    result = imul(result, 31) + hashCode(this.yti_1) | 0;
    result = imul(result, 31) + hashCode(this.zti_1) | 0;
    result = imul(result, 31) + hashCode(this.atj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.btj_1) | 0;
    result = imul(result, 31) + this.ctj_1 | 0;
    result = imul(result, 31) + hashCode(this.dtj_1) | 0;
    result = imul(result, 31) + this.etj_1.hashCode() | 0;
    result = imul(result, 31) + (this.ftj_1 == null ? 0 : getStringHashCode(this.ftj_1)) | 0;
    result = imul(result, 31) + (this.gtj_1 == null ? 0 : getStringHashCode(this.gtj_1)) | 0;
    result = imul(result, 31) + this.htj_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.itj_1) | 0;
    result = imul(result, 31) + (this.jtj_1 == null ? 0 : getStringHashCode(this.jtj_1)) | 0;
    result = imul(result, 31) + (this.ktj_1 == null ? 0 : hashCode(this.ktj_1)) | 0;
    result = imul(result, 31) + this.ltj_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.mtj_1) | 0;
    result = imul(result, 31) + hashCode(this.ntj_1) | 0;
    result = imul(result, 31) + (this.otj_1 == null ? 0 : this.otj_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ptj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qtj_1) | 0;
    return result;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.qti_1, tmp0_other_with_cast.qti_1))
      return false;
    if (!equals(this.rti_1, tmp0_other_with_cast.rti_1))
      return false;
    if (!equals(this.sti_1, tmp0_other_with_cast.sti_1))
      return false;
    if (!equals(this.tti_1, tmp0_other_with_cast.tti_1))
      return false;
    if (!this.uti_1.equals(tmp0_other_with_cast.uti_1))
      return false;
    if (!equals(this.vti_1, tmp0_other_with_cast.vti_1))
      return false;
    if (!(this.wti_1 === tmp0_other_with_cast.wti_1))
      return false;
    if (!equals(this.xti_1, tmp0_other_with_cast.xti_1))
      return false;
    if (!equals(this.yti_1, tmp0_other_with_cast.yti_1))
      return false;
    if (!equals(this.zti_1, tmp0_other_with_cast.zti_1))
      return false;
    if (!equals(this.atj_1, tmp0_other_with_cast.atj_1))
      return false;
    if (!(this.btj_1 === tmp0_other_with_cast.btj_1))
      return false;
    if (!(this.ctj_1 === tmp0_other_with_cast.ctj_1))
      return false;
    if (!equals(this.dtj_1, tmp0_other_with_cast.dtj_1))
      return false;
    if (!this.etj_1.equals(tmp0_other_with_cast.etj_1))
      return false;
    if (!(this.ftj_1 == tmp0_other_with_cast.ftj_1))
      return false;
    if (!(this.gtj_1 == tmp0_other_with_cast.gtj_1))
      return false;
    if (!this.htj_1.equals(tmp0_other_with_cast.htj_1))
      return false;
    if (!(this.itj_1 === tmp0_other_with_cast.itj_1))
      return false;
    if (!(this.jtj_1 == tmp0_other_with_cast.jtj_1))
      return false;
    if (!equals(this.ktj_1, tmp0_other_with_cast.ktj_1))
      return false;
    if (!this.ltj_1.equals(tmp0_other_with_cast.ltj_1))
      return false;
    if (!equals(this.mtj_1, tmp0_other_with_cast.mtj_1))
      return false;
    if (!equals(this.ntj_1, tmp0_other_with_cast.ntj_1))
      return false;
    if (!equals(this.otj_1, tmp0_other_with_cast.otj_1))
      return false;
    if (!(this.ptj_1 === tmp0_other_with_cast.ptj_1))
      return false;
    if (!(this.qtj_1 === tmp0_other_with_cast.qtj_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission) {
    editableSubmission = editableSubmission === VOID ? null : editableSubmission;
    this.qtl_1 = editableSubmission;
  }
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).rtq = function (editableSubmission) {
    return new ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission);
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).toString = function () {
    return 'ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission=' + this.qtl_1 + ')';
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).hashCode = function () {
    return this.qtl_1 == null ? 0 : this.qtl_1.hashCode();
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailoverviewSubmissionUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailoverviewSubmissionUiState ? other : THROW_CCE();
    if (!equals(this.qtl_1, tmp0_other_with_cast.qtl_1))
      return false;
    return true;
  };
  function saveAndUploadUseCase$factory() {
    return getPropertyCallableRef('saveAndUploadUseCase', 1, KProperty1, function (receiver) {
      return _get_saveAndUploadUseCase__bjy5rj(receiver);
    }, null);
  }
  function cancelTransferJobUseCase$factory() {
    return getPropertyCallableRef('cancelTransferJobUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelTransferJobUseCase__o6e2y4(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz(receiver);
    }, null);
  }
  function ustadAccountManager$factory() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07(receiver);
    }, null);
  }
  function saveAndUploadUseCase$factory_0() {
    return getPropertyCallableRef('saveAndUploadUseCase', 1, KProperty1, function (receiver) {
      return _get_saveAndUploadUseCase__bjy5rj(receiver);
    }, null);
  }
  function cancelTransferJobUseCase$factory_0() {
    return getPropertyCallableRef('cancelTransferJobUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelTransferJobUseCase__o6e2y4(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_0() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz(receiver);
    }, null);
  }
  function ustadAccountManager$factory_0() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory_0() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory_0() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_0() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07(receiver);
    }, null);
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.utw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).lqf = function (noSubmissions, $completion) {
    var tmp = this.mqf(noSubmissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          if (!this.vtw_1 ? this.utw_1.utx_1.t2().aty_1 : false) {
            l$ret$1: do {
              var this_0 = this.utw_1.utx_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ity(VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).mqf = function (noSubmissions, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this.utw_1, completion);
    i.vtw_1 = noSubmissions;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (noSubmissions, $completion) {
      return i.lqf(noSubmissions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.rty_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.rty_1.uqn().r7e();
            var tmp0_safe_receiver = this.rty_1.utx_1.t2().sty();
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n7t_1;
            var tmp_1 = tmp_0.uc1(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_0(this.rty_1, null);
            suspendResult = tmp_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).l78 = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda$slambda(this.rty_1, completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.btz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.ctz_1.xq9_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var descriptionHtml = tmp_1;
          var tmp1_safe_receiver = this.btz_1.utx_1.t2().sty();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.nk8_1;
          this.btz_1.dtz(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hkm(VOID, VOID, VOID, VOID, VOID, descriptionHtml));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).rqa = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this.btz_1, completion);
    i.ctz_1 = result;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$lambda($groupSet) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.q7t_1 = $groupSet.a7z_1;
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.mtz_1 = $commitDelay;
    this.ntz_1 = $entity;
    this.otz_1 = $this;
    this.ptz_1 = $key;
    this.qtz_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.mtz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ntz_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.otz_1.gqo(this.otz_1.aqn_1, this.ptz_1, this.qtz_1, this.ntz_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1(this.mtz_1, this.ntz_1, this.otz_1, this.ptz_1, this.qtz_1, completion);
    i.rtz_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_2($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.au0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.bu0_1.xq9_1;
          var tmp0_elvis_lhs = tmp_0 instanceof CourseGroupSet ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var groupSet = tmp_1;
          var tmp$ret$0;
          l$ret$1: do {
            var this_0 = this.au0_1.utx_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp3_safe_receiver = prevValue.sty();
              var tmp_2;
              if (tmp3_safe_receiver == null) {
                tmp_2 = null;
              } else {
                var tmp0_safe_receiver = prevValue.sty();
                var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
                var tmp_3;
                if (tmp1_safe_receiver == null) {
                  tmp_3 = null;
                } else {
                  tmp_3 = shallowCopy_5(tmp1_safe_receiver, ClazzAssignmentEditViewModel$slambda$slambda$slambda$lambda(groupSet));
                }
                var tmp_4 = tmp_3;
                var tmp_5;
                if (!groupSet.a7z_1.equals(new Long(0, 0))) {
                  tmp_5 = groupSet;
                } else {
                  tmp_5 = null;
                }
                var tmp2_safe_receiver = tmp_5;
                tmp_2 = tmp3_safe_receiver.zk8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_4, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.b7z_1);
              }
              var nextValue = prevValue.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.fty_1.nu0(tmp_2), VOID, null);
              if (this_0.y1k(prevValue, nextValue)) {
                tmp$ret$0 = nextValue;
                break l$ret$1;
              }
            }
          }
           while (false);
          var newState = tmp$ret$0;
          var this_1 = this.au0_1;
          var entity = newState.sty();
          var serializer = Companion_getInstance_13().n4r();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_125();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.hqt_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_6 = this_1;
          var tmp_7 = this_1.rqn();
          tmp_6.hqt_1 = launch(tmp_7, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_2(commitDelay, entity, this_1, key, serializer, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).rqa = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this.au0_1, completion);
    i.bu0_1 = result;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.wu0_1 = $commitDelay;
    this.xu0_1 = $entity;
    this.yu0_1 = $this;
    this.zu0_1 = $key;
    this.au1_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.wu0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.xu0_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.yu0_1.gqo(this.yu0_1.aqn_1, this.zu0_1, this.au1_1, this.xu0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3(this.wu0_1, this.xu0_1, this.yu0_1, this.zu0_1, this.au1_1, completion);
    i.bu1_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_4($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.ku1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.lu1_1.xq9_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? isInterface(tmp_0, List) : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var allocations = tmp_1;
          var tmp$ret$0;
          l$ret$1: do {
            var this_0 = this.ku1_1.utx_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.fty_1.cu0_1;
              var nextValue = prevValue.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.fty_1.nu0(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, allocations)));
              if (this_0.y1k(prevValue, nextValue)) {
                tmp$ret$0 = nextValue;
                break l$ret$1;
              }
            }
          }
           while (false);
          var newState = tmp$ret$0;
          var this_1 = this.ku1_1;
          var entity = newState.sty();
          var serializer = Companion_getInstance_13().n4r();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_125();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.hqt_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_2 = this_1;
          var tmp_3 = this_1.rqn();
          tmp_2.hqt_1 = launch(tmp_3, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_4(commitDelay, entity, this_1, key, serializer, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).rqa = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this.ku1_1, completion);
    i.lu1_1 = result;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).vu1 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.vu1(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).yny = function (it, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(completion);
    i.uu1_1 = it;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.vu1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.eu2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).fu2 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.fu2($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = get_doorPrimaryKeyManager(this.eu2_1.uqn());
          var assignmentUid = tmp_0.n62(520);
          var this_0 = new CourseBlock();
          var tmp_1 = this_0;
          var tmp_2 = get_doorPrimaryKeyManager(this.eu2_1.uqn());
          tmp_1.t7x_1 = tmp_2.n62(124);
          var tmp_3 = this_0;
          tmp_3.u7x_1 = 103;
          this_0.l7y_1 = assignmentUid;
          var tmp_4 = this_0;
          tmp_4.z7x_1 = 102;
          this_0.e7y_1 = 10.0;
          this_0.f7y_1 = 0.0;
          var this_1 = new ClazzAssignment();
          this_1.n7t_1 = assignmentUid;
          this_1.f7u_1 = this.eu2_1.xtx_1;
          return new CourseBlockAndEditEntities(this_0, VOID, VOID, VOID, VOID, VOID, VOID, this_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda_1(this.eu2_1, completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.fu2($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$lambda($savedStateHandle, this$0, $courseTerminology) {
    return function (it) {
      var groupSubmissionOn = $savedStateHandle.ba('groupSubmissionOn');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.utx_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = prevValue.fty_1.nu0(it);
          var tmp4_elvis_lhs = groupSubmissionOn == null ? null : toBoolean(groupSubmissionOn);
          var tmp_0;
          if (tmp4_elvis_lhs == null) {
            var tmp2_safe_receiver = it == null ? null : it.uk8_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.q7t_1;
            var tmp_1;
            if (tmp3_safe_receiver == null) {
              tmp_1 = null;
            } else {
              // Inline function 'kotlin.let' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
              tmp_1 = !tmp3_safe_receiver.equals(new Long(0, 0));
            }
            tmp_0 = tmp_1;
          } else {
            tmp_0 = tmp4_elvis_lhs;
          }
          var tmp5_elvis_lhs = tmp_0;
          var nextValue = prevValue.ity(VOID, VOID, VOID, VOID, $courseTerminology, VOID, VOID, tmp, tmp5_elvis_lhs == null ? false : tmp5_elvis_lhs);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.ou2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).nr0 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.nr0((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.ou2_1.m4r();
          var value = this.ou2_1.utx_1.t2();
          var this_1 = this_0.t45();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzAssignmentEditUiState), arrayOf([]), false));
          return this_0.r45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), value);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).v1m = function ($this$withContext, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_3(this.ou2_1, completion);
    i.pu2_1 = $this$withContext;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.nr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.yu2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.yu2_1.utx_1, ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this.yu2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_5(this.yu2_1, completion);
    i.zu2_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_7(this$0, resultContinuation) {
    this.iu3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.iu3_1.xqn();
            Companion_getInstance_174();
            var tmp_1 = this.iu3_1.eqo(tmp_0, 'courseBlockDesc');
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this.iu3_1, null);
            suspendResult = tmp_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_7(this.iu3_1, completion);
    i.ju3_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_9(this$0, resultContinuation) {
    this.su3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.su3_1.eqo(this.su3_1.xqn(), 'groupSet');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this.su3_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_9(this.su3_1, completion);
    i.tu3_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_11(this$0, resultContinuation) {
    this.cu4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.cu4_1.eqo(this.cu4_1.xqn(), 'peerAllocationsResult');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this.cu4_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_11(this.cu4_1, completion);
    i.du4_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this$0, $initStateJson, resultContinuation) {
    this.mu4_1 = this$0;
    this.nu4_1 = $initStateJson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).pu4 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.pu4((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.mu4_1.m4r().s45(Companion_getInstance_151().n4r(), this.nu4_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this.mu4_1, this.nu4_1, completion);
    i.ou4_1 = $this$withContext;
    return i;
  };
  function ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this$0, $initStateJson, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this$0, $initStateJson, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.pu4($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda$lambda($this$shallowCopy) {
    $this$shallowCopy.q7t_1 = new Long(0, 0);
    return Unit_instance;
  }
  function _get_snackDisaptcher__bp310a($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wtx_1;
    snackDisaptcher$factory_0();
    return this_0.t2();
  }
  function hasErrors_0(_this__u8e3s4, $this) {
    return ((((((!(_this__u8e3s4.dty_1 == null) ? true : !(_this__u8e3s4.fty_1.ju0_1 == null)) ? true : !(_this__u8e3s4.fty_1.iu0_1 == null)) ? true : !(_this__u8e3s4.fty_1.lu0_1 == null)) ? true : !(_this__u8e3s4.bty_1 == null)) ? true : !(_this__u8e3s4.ety_1 == null)) ? true : !(_this__u8e3s4.hty_1 == null)) ? true : _this__u8e3s4.fty_1.ru4();
  }
  function checkNoSubmissionsMade($this, $completion) {
    var tmp = $this.uqn().r7e();
    var tmp0_safe_receiver = $this.utx_1.t2().sty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n7t_1;
    return tmp.tc1(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, $completion);
  }
  function Companion_133() {
    this.su4_1 = 'groupSet';
    this.tu4_1 = 'peerAllocationsResult';
    this.uu4_1 = 'terminology';
    this.vu4_1 = 'CourseAssignmentEdit';
    this.wu4_1 = 5;
    this.xu4_1 = 100;
    this.yu4_1 = 'groupSubmissionOn';
  }
  var Companion_instance_182;
  function Companion_getInstance_150() {
    return Companion_instance_182;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_17(function_0) {
    this.zu4_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_17).t1d = function (value, $completion) {
    return this.zu4_1(value, $completion);
  };
  function ClazzAssignmentEditViewModel$_init_$lambda_wdhfey(db, systemImpl) {
    return new UpdatePeerReviewAllocationUseCase(db, systemImpl);
  }
  function ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.iu5_1 = this$0;
    this.ju5_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.iu5_1.fqo(this.ju5_1, 'terminology', Companion_instance_34.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.lu5_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = Companion_getInstance_13().n4r();
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda_2(this.iu5_1, null);
            suspendResult = this.iu5_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzAssignmentEditViewModel$slambda$lambda(this.ju5_1, this.iu5_1, this.lu5_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Companion_getInstance_125();
            if (this.ju5_1.ba('initState') == null) {
              var tmp_3 = this;
              Companion_getInstance_125();
              tmp_3.mu5_1 = 'initState';
              this.hd_1 = 3;
              var tmp_4 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_4, ClazzAssignmentEditViewModel$slambda$slambda_4(this.iu5_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.ju5_1.dqj(this.mu5_1, ARGUMENT);
            this.hd_1 = 4;
            continue $sm;
          case 4:
            l$ret$1: do {
              var this_0 = this.iu5_1.utx_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nu5(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.iu5_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_5 = Companion_getInstance_97().uq6_1;
                var tmp_6 = this.iu5_1.aqo().moj(strings_getInstance().qmr_1);
                var nextValue_0 = prevValue_0.mq6(VOID, tmp_5, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_6, VOID, ClazzAssignmentEditViewModel$onClickSave$ref(this.iu5_1)));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.ku5_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_6(this.iu5_1, null));
            launch(this.ku5_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_8(this.iu5_1, null));
            launch(this.ku5_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_10(this.iu5_1, null));
            launch(this.ku5_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_12(this.iu5_1, null));
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda(this.iu5_1, this.ju5_1, completion);
    i.ku5_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onAssignmentChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.wu5_1 = $commitDelay;
    this.xu5_1 = $entity;
    this.yu5_1 = $this;
    this.zu5_1 = $key;
    this.au6_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.wu5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.xu5_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.yu5_1.gqo(this.yu5_1.aqn_1, this.zu5_1, this.au6_1, this.xu5_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onAssignmentChanged$slambda(this.wu5_1, this.xu5_1, this.yu5_1, this.zu5_1, this.au6_1, completion);
    i.bu6_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onAssignmentChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.ku6_1 = $commitDelay;
    this.lu6_1 = $entity;
    this.mu6_1 = $this;
    this.nu6_1 = $key;
    this.ou6_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.ku6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.lu6_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.mu6_1.gqo(this.mu6_1.aqn_1, this.nu6_1, this.ou6_1, this.lu6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda(this.ku6_1, this.lu6_1, this.mu6_1, this.nu6_1, this.ou6_1, completion);
    i.pu6_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.yu6_1 = $commitDelay;
    this.zu6_1 = $entity;
    this.au7_1 = $this;
    this.bu7_1 = $key;
    this.cu7_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.yu6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.zu6_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.au7_1.gqo(this.au7_1.aqn_1, this.bu7_1, this.cu7_1, this.zu6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onPictureChanged$slambda(this.yu6_1, this.zu6_1, this.au7_1, this.bu7_1, this.cu7_1, completion);
    i.du7_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$onPictureChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.utx_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nu5(true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.mu7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            Companion_getInstance_125();
            tmp_0.nu7_1 = this.mu7_1.aqn_1.ba('initState');
            if (this.nu7_1 == null) {
              this.ou7_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.pu7_1 = this.nu7_1;
              var tmp_2 = this;
              tmp_2.qu7_1 = this.pu7_1;
              this.hd_1 = 1;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this.mu7_1, this.qu7_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ou7_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.ru7_1 = this.ou7_1;
            var tmp_4 = this;
            var tmp_5;
            if (this.ru7_1 == null) {
              return Unit_instance;
            } else {
              tmp_5 = this.ru7_1;
            }

            tmp_4.su7_1 = tmp_5;
            var tmp_6 = this;
            var tmp2_safe_receiver = this.mu7_1.utx_1.t2().sty();
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.uk8_1;
            var tmp_7;
            if (tmp3_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_7 = tmp3_elvis_lhs;
            }

            tmp_6.tu7_1 = tmp_7;
            var tmp_8 = this;
            var tmp4_safe_receiver = this.mu7_1.utx_1.t2().sty();
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.nk8_1;
            var tmp_9;
            if (tmp5_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_9 = tmp5_elvis_lhs;
            }

            tmp_8.uu7_1 = tmp_9;
            if (!this.tu7_1.v7t_1 ? !this.tu7_1.b7u_1 : false) {
              l$ret$1: do {
                var this_0 = this.mu7_1.utx_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.ity(VOID, VOID, VOID, VOID, VOID, this.mu7_1.aqo().moj(strings_getInstance().xnj_1));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            }

            var it = this.uu7_1.e7y_1;
            if (it == null ? true : it <= 0.0) {
              l$ret$3: do {
                var this_1 = this.mu7_1.utx_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.fty_1.nu0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.mu7_1.aqo().moj(strings_getInstance().vmn_1)));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.uu7_1.b7y_1.c7(this.uu7_1.a7y_1) <= 0) {
              l$ret$5: do {
                var this_2 = this.mu7_1.utx_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.fty_1.nu0(VOID, VOID, VOID, VOID, VOID, VOID, this.mu7_1.aqo().moj(strings_getInstance().pn9_1)));
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
            }

            if (this.uu7_1.d7y_1.c7(this.uu7_1.b7y_1) < 0) {
              l$ret$7: do {
                var this_3 = this.mu7_1.utx_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_2.fty_1.nu0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.mu7_1.aqo().moj(strings_getInstance().dn6_1)));
                  if (this_3.y1k(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
            }

            var containsArg = this.tu7_1.x7t_1;
            if (!(5 <= containsArg ? containsArg <= 100 : false)) {
              l$ret$9: do {
                var this_4 = this.mu7_1.utx_1;
                while (true) {
                  var prevValue_3 = this_4.t2();
                  var nextValue_3 = prevValue_3.ity(VOID, VOID, VOID, VOID, VOID, VOID, this.mu7_1.aqo().noj(strings_getInstance().fng_1, ['5', '100']));
                  if (this_4.y1k(prevValue_3, nextValue_3)) {
                    break l$ret$9;
                  }
                }
              }
               while (false);
            }

            var this_5 = this.uu7_1.x7x_1;
            if (this_5 == null ? true : isBlank(this_5)) {
              l$ret$11: do {
                var this_6 = this.mu7_1.utx_1;
                while (true) {
                  var prevValue_4 = this_6.t2();
                  var nextValue_4 = prevValue_4.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_4.fty_1.nu0(VOID, VOID, VOID, VOID, VOID, this.mu7_1.aqo().moj(strings_getInstance().wnl_1)));
                  if (this_6.y1k(prevValue_4, nextValue_4)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
            }

            if (this.mu7_1.utx_1.t2().gty_1 ? this.tu7_1.q7t_1.equals(new Long(0, 0)) : false) {
              l$ret$13: do {
                var this_7 = this.mu7_1.utx_1;
                while (true) {
                  var prevValue_5 = this_7.t2();
                  var nextValue_5 = prevValue_5.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.mu7_1.aqo().moj(strings_getInstance().vmn_1));
                  if (this_7.y1k(prevValue_5, nextValue_5)) {
                    break l$ret$13;
                  }
                }
              }
               while (false);
            }

            this.vu7_1 = null;
            var tmp6_safe_receiver = this.su7_1.sty();
            var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.uk8_1;
            if (!equals(tmp7_safe_receiver == null ? null : tmp7_safe_receiver.q7t_1, this.tu7_1.q7t_1)) {
              this.hd_1 = 3;
              suspendResult = checkNoSubmissionsMade(this.mu7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.wu7_1 = false;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.xu7_1 = suspendResult;
            this.wu7_1 = !this.xu7_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (this.wu7_1) {
              this.vu7_1 = this.mu7_1.aqo().moj(strings_getInstance().qmi_1) + 'Cannot change groups after submissions made';
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 5:
            var tmp_10;
            var tmp8_safe_receiver = this.su7_1.sty();
            var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.uk8_1;
            if (!((tmp9_safe_receiver == null ? null : tmp9_safe_receiver.a7u_1) === this.tu7_1.a7u_1)) {
              tmp_10 = this.vu7_1 == null;
            } else {
              tmp_10 = false;
            }

            if (tmp_10) {
              this.hd_1 = 6;
              suspendResult = checkNoSubmissionsMade(this.mu7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.yu7_1 = false;
              this.hd_1 = 7;
              continue $sm;
            }

          case 6:
            this.zu7_1 = suspendResult;
            this.yu7_1 = !this.zu7_1;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            if (this.yu7_1) {
              this.vu7_1 = this.mu7_1.aqo().moj(strings_getInstance().qmi_1) + 'Cannot change marking type after submissions made';
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 8;
              continue $sm;
            }

          case 8:
            var tmp_11;
            var tmp_12 = this.tu7_1.a7u_1;
            if (tmp_12 === 2) {
              tmp_11 = this.tu7_1.g7u_1 < 1;
            } else {
              tmp_11 = false;
            }

            if (tmp_11) {
              l$ret$15: do {
                var this_8 = this.mu7_1.utx_1;
                while (true) {
                  var prevValue_6 = this_8.t2();
                  var nextValue_6 = prevValue_6.ity(VOID, VOID, VOID, this.mu7_1.aqo().moj(strings_getInstance().xng_1));
                  if (this_8.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$15;
                  }
                }
              }
               while (false);
            }

            this.au8_1 = this.vu7_1;
            if (hasErrors_0(this.mu7_1.utx_1.t2(), this.mu7_1) ? true : !(this.au8_1 == null)) {
              var tmp10_safe_receiver = this.au8_1;
              if (tmp10_safe_receiver == null)
                null;
              else {
                _get_snackDisaptcher__bp310a(this.mu7_1).bq7(new Snack(tmp10_safe_receiver));
              }
              return Unit_instance;
            }

            var tmp_13;
            var tmp_14 = this.tu7_1.a7u_1;
            if (tmp_14 === 2) {
              var tmp11_safe_receiver = this.su7_1.sty();
              var tmp12_safe_receiver = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.uk8_1;
              tmp_13 = !((tmp12_safe_receiver == null ? null : tmp12_safe_receiver.g7u_1) === this.tu7_1.g7u_1);
            } else {
              tmp_13 = false;
            }

            if (tmp_13) {
              this.hd_1 = 9;
              var tmp_15 = this.mu7_1.ttx_1(this.mu7_1.uqn(), this.mu7_1.aqo());
              var tmp13_safe_receiver = this.mu7_1.utx_1.t2().sty();
              var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.wk8_1;
              suspendResult = tmp_15.qpk(tmp14_elvis_lhs == null ? emptyList() : tmp14_elvis_lhs, this.tu7_1.q7t_1, this.tu7_1.f7u_1, this.tu7_1.n7t_1, this.tu7_1.g7u_1, true, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              continue $sm;
            }

          case 9:
            var newAllocations = suspendResult;
            l$ret$17: do {
              var this_9 = this.mu7_1.utx_1;
              while (true) {
                var prevValue_7 = this_9.t2();
                var tmp0_safe_receiver = prevValue_7.fty_1.cu0_1;
                var nextValue_7 = prevValue_7.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_7.fty_1.nu0(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, newAllocations)));
                if (this_9.y1k(prevValue_7, nextValue_7)) {
                  break l$ret$17;
                }
              }
            }
             while (false);
            this.hd_1 = 10;
            continue $sm;
          case 10:
            var this_10 = this.mu7_1.utx_1;
            var tmp_16;
            var tmp_17;
            var tmp0_safe_receiver_0 = this_10.t2().sty();
            var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.uk8_1;
            if (!equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q7t_1, new Long(0, 0))) {
              tmp_17 = !this_10.t2().gty_1;
            } else {
              tmp_17 = false;
            }

            if (tmp_17) {
              tmp_16 = this_10;
            } else {
              tmp_16 = null;
            }

            var tmp15_safe_receiver = tmp_16;
            if (tmp15_safe_receiver == null)
              null;
            else {
              l$ret$19: do {
                while (true) {
                  var prevValue_8 = tmp15_safe_receiver.t2();
                  var tmp1_safe_receiver_0 = prevValue_8.fty_1.cu0_1;
                  var tmp_18;
                  if (tmp1_safe_receiver_0 == null) {
                    tmp_18 = null;
                  } else {
                    var tmp0_safe_receiver_1 = prevValue_8.fty_1.cu0_1.uk8_1;
                    var tmp_19;
                    if (tmp0_safe_receiver_1 == null) {
                      tmp_19 = null;
                    } else {
                      tmp_19 = shallowCopy_5(tmp0_safe_receiver_1, ClazzAssignmentEditViewModel$onClickSave$slambda$lambda);
                    }
                    tmp_18 = tmp1_safe_receiver_0.zk8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_19, null);
                  }
                  var nextValue_8 = prevValue_8.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_8.fty_1.nu0(tmp_18));
                  if (tmp15_safe_receiver.y1k(prevValue_8, nextValue_8)) {
                    break l$ret$19;
                  }
                }
              }
               while (false);
            }

            this.mu7_1.lqt(this.mu7_1.utx_1.t2().sty());
            return Unit_instance;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).l78 = function (completion) {
    return new ClazzAssignmentEditViewModel$onClickSave$slambda(this.mu7_1, completion);
  };
  function ClazzAssignmentEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel(di, savedStateHandle, peerReviewAllocationUseCaseFactory) {
    var tmp;
    if (peerReviewAllocationUseCaseFactory === VOID) {
      tmp = ClazzAssignmentEditViewModel$_init_$lambda_wdhfey;
    } else {
      tmp = peerReviewAllocationUseCaseFactory;
    }
    peerReviewAllocationUseCaseFactory = tmp;
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseAssignmentEdit');
    this.ttx_1 = peerReviewAllocationUseCaseFactory;
    var tmp_0 = this;
    var tmp0_completionCriteriaOptions = Companion_getInstance_151().qu4_1;
    var tmp1_timeZone = Companion_getInstance_9().xmh().ymg();
    tmp_0.utx_1 = MutableStateFlow(new ClazzAssignmentEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, new CourseBlockEditUiState(VOID, VOID, tmp0_completionCriteriaOptions, VOID, VOID, VOID, VOID, VOID, true, VOID, tmp1_timeZone)));
    this.vtx_1 = asStateFlow(this.utx_1);
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SnackBarDispatcher), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.wtx_1 = Instance(this, tmp$ret$0, null).a5d(this, snackDisaptcher$factory());
    var tmp_3 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.xtx_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_97().tq6_1;
        var tmp1_title = this.kqu(strings_getInstance().vn5_1, strings_getInstance().wn5_1);
        var nextValue = prevValue.mq6(VOID, tmp0_loadingState, tmp1_title, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_4 = this.rqn();
    launch(tmp_4, VOID, VOID, ClazzAssignmentEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ClazzAssignmentEditViewModel).bu8 = function (groupSubmissionOn) {
    this.aqn_1.dqj('groupSubmissionOn', groupSubmissionOn.toString());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.utx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onGroupSubmissionOnChanged.<anonymous>' call
        var tmp;
        if (!(prevValue.hty_1 == null) ? groupSubmissionOn : false) {
          tmp = prevValue.hty_1;
        } else {
          tmp = null;
        }
        var nextValue = prevValue.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, groupSubmissionOn, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentEditViewModel).cu8 = function (assignment) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.utx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onAssignmentChanged.<anonymous>' call
        var tmp8_safe_receiver = prevValue.fty_1.cu0_1;
        var tmp9_courseBlockEditUiState = prevValue.fty_1.nu0(tmp8_safe_receiver == null ? null : tmp8_safe_receiver.zk8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, assignment));
        var tmp;
        var tmp_0;
        if (!(prevValue.ety_1 == null)) {
          var tmp_1 = assignment == null ? null : assignment.x7t_1;
          var tmp6_safe_receiver = prevValue.sty();
          var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.uk8_1;
          tmp_0 = tmp_1 == (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.x7t_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.ety_1;
        } else {
          tmp = null;
        }
        var tmp10_sizeLimitError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.dty_1 == null)) {
          tmp_4 = (assignment == null ? null : assignment.v7t_1) === false;
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = !assignment.b7u_1;
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.dty_1;
        } else {
          tmp_2 = null;
        }
        var tmp11_submissionRequiredError = tmp_2;
        var tmp_5;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.bty_1 == null)) {
          var tmp_8 = assignment == null ? null : assignment.g7u_1;
          var tmp1_safe_receiver = prevValue.sty();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.uk8_1;
          tmp_7 = tmp_8 == (tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g7u_1);
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          var tmp_9 = assignment == null ? null : assignment.a7u_1;
          tmp_6 = tmp_9 === 2;
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp_5 = prevValue.bty_1;
        } else {
          tmp_5 = null;
        }
        var tmp12_reviewerCountError = tmp_5;
        var nextValue = prevValue.ity(VOID, VOID, VOID, tmp12_reviewerCountError, VOID, tmp11_submissionRequiredError, tmp10_sizeLimitError, tmp9_courseBlockEditUiState);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.sty();
    var serializer = Companion_getInstance_13().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.hqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_10 = this;
    var tmp_11 = this.rqn();
    tmp_10.hqt_1 = launch(tmp_11, VOID, VOID, ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).dtz = function (courseBlock) {
    if (courseBlock == null) {
      Napier_getInstance().m5e('Change courseblock shoudl not really be null');
      return Unit_instance;
    }
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.utx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onCourseBlockChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.sty();
        var prevBlock = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
        var tmp8_$this = prevValue.fty_1;
        var tmp1_safe_receiver = prevValue.sty();
        var tmp9_block = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zk8(courseBlock);
        var tmp5_safe_receiver = prevValue.fty_1.cu0_1;
        var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.nk8_1;
        var tmp10_caMaxPointsError = this.lqu(tmp6_safe_receiver == null ? null : tmp6_safe_receiver.e7y_1, courseBlock.e7y_1, prevValue.fty_1.ju0_1);
        var tmp;
        var tmp_0;
        var tmp_1;
        if (!(prevValue.fty_1.iu0_1 == null)) {
          tmp_1 = equals(prevBlock == null ? null : prevBlock.b7y_1, courseBlock.b7y_1);
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp_0 = prevBlock.a7y_1.equals(courseBlock.a7y_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.fty_1.iu0_1;
        } else {
          tmp = null;
        }
        var tmp11_caDeadlineError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.fty_1.lu0_1 == null)) {
          tmp_4 = equals(prevBlock == null ? null : prevBlock.b7y_1, courseBlock.b7y_1);
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = prevBlock.d7y_1.equals(courseBlock.d7y_1);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.fty_1.lu0_1;
        } else {
          tmp_2 = null;
        }
        var tmp12_caGracePeriodError = tmp_2;
        var tmp2_safe_receiver = prevValue.fty_1.cu0_1;
        var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.nk8_1;
        var tmp13_caTitleError = this.lqu(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.x7x_1, courseBlock.x7x_1, prevValue.fty_1.hu0_1);
        var nextValue = prevValue.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp8_$this.nu0(tmp9_block, VOID, VOID, VOID, VOID, tmp13_caTitleError, tmp11_caDeadlineError, tmp10_caMaxPointsError, VOID, tmp12_caGracePeriodError));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.sty();
    var serializer = Companion_getInstance_13().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_5 = this;
    var tmp_6 = this.rqn();
    tmp_5.hqt_1 = launch(tmp_6, VOID, VOID, ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).du8 = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.utx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.fty_1.cu0_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.fty_1.cu0_1.ok8_1;
          tmp = tmp1_safe_receiver.zk8(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lkm(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.ity(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.fty_1.nu0(tmp));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.sty();
    var serializer = Companion_getInstance_13().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.rqn();
    tmp_0.hqt_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentEditViewModel$onPictureChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).eu8 = function () {
    var tmp = serializer_0(StringCompanionObject_instance);
    Companion_getInstance_125();
    var tmp0_safe_receiver = this.utx_1.t2().sty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f7u_1;
    this.iqo('CourseGroups', 'groupSet', null, tmp, mapOf_0(to('clazzUid', (tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs).toString())));
  };
  protoOf(ClazzAssignmentEditViewModel).fu8 = function () {
    var tmp0_safe_receiver = this.utx_1.t2().sty();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    var tmp;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp1_elvis_lhs;
    }
    var assignmentVal = tmp;
    var tmp_0 = ListSerializer(Companion_instance_18.n4r());
    var tmp_1 = this.m4r();
    var tmp_2 = ListSerializer(Companion_instance_18.n4r());
    var tmp2_safe_receiver = this.utx_1.t2().sty();
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.wk8_1;
    var tmp_3 = to('allocations', tmp_1.r45(tmp_2, tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs));
    var tmp_4 = to('groupSetUid', assignmentVal.q7t_1.toString());
    Companion_getInstance_125();
    var tmp_5 = to('clazzUid', assignmentVal.f7u_1.toString());
    var tmp_6 = to('numReviewers', assignmentVal.g7u_1.toString());
    Companion_getInstance_116();
    this.iqo('PeerReviewerAllocationEdit', 'peerAllocationsResult', null, tmp_0, mapOf([tmp_3, tmp_4, tmp_5, tmp_6, to('clazzAssignmentUid', assignmentVal.n7t_1.toString())]));
  };
  protoOf(ClazzAssignmentEditViewModel).asa = function () {
    if (!this.utx_1.t2().ytx_1)
      return Unit_instance;
    var tmp = ClazzAssignmentEditViewModel$onClickSave$lambda(this);
    this.nqu(tmp, ClazzAssignmentEditViewModel$onClickSave$slambda_0(this, null));
  };
  function Companion_134() {
    Companion_instance_183 = this;
    this.qu4_1 = listOf([CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()]);
  }
  protoOf(Companion_134).n4r = function () {
    return $serializer_getInstance_73();
  };
  var Companion_instance_183;
  function Companion_getInstance_151() {
    if (Companion_instance_183 == null)
      new Companion_134();
    return Companion_instance_183;
  }
  function $serializer_61() {
    $serializer_instance_61 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditUiState', this, 10);
    tmp0_serialDesc.t4f('fieldsEnabled', true);
    tmp0_serialDesc.t4f('markingTypeEnabled', true);
    tmp0_serialDesc.t4f('groupSetEnabled', true);
    tmp0_serialDesc.t4f('reviewerCountError', true);
    tmp0_serialDesc.t4f('courseTerminology', true);
    tmp0_serialDesc.t4f('submissionRequiredError', true);
    tmp0_serialDesc.t4f('sizeLimitError', true);
    tmp0_serialDesc.t4f('courseBlockEditUiState', true);
    tmp0_serialDesc.t4f('groupSubmissionOn', true);
    tmp0_serialDesc.t4f('groupSetError', true);
    this.gu8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_61).q44 = function () {
    return this.gu8_1;
  };
  protoOf($serializer_61).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_10()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_75(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_61).s44 = function (decoder) {
    var tmp0_desc = this.gu8_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = false;
    var tmp6_local2 = false;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = false;
    var tmp13_local9 = null;
    var tmp14_input = decoder.i48(tmp0_desc);
    if (tmp14_input.x48()) {
      tmp4_local0 = tmp14_input.k48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp14_input.k48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp14_input.k48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp14_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp14_input.w48(tmp0_desc, 4, $serializer_getInstance_10(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp14_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp14_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp14_input.u48(tmp0_desc, 7, $serializer_getInstance_75(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp14_input.k48(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp14_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp14_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp14_input.k48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp14_input.k48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp14_input.k48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp14_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp14_input.w48(tmp0_desc, 4, $serializer_getInstance_10(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp14_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp14_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp14_input.u48(tmp0_desc, 7, $serializer_getInstance_75(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp14_input.k48(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp14_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp14_input.j48(tmp0_desc);
    return ClazzAssignmentEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, null);
  };
  protoOf($serializer_61).hu8 = function (encoder, value) {
    var tmp0_desc = this.gu8_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.ytx_1 === false)) {
      tmp1_output.o49(tmp0_desc, 0, value.ytx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.ztx_1 === true)) {
      tmp1_output.o49(tmp0_desc, 1, value.ztx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.aty_1 === true)) {
      tmp1_output.o49(tmp0_desc, 2, value.aty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.bty_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.bty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.cty_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, $serializer_getInstance_10(), value.cty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.dty_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.dty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.ety_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, StringSerializer_getInstance(), value.ety_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !value.fty_1.equals(new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_151().qu4_1))) {
      tmp1_output.y49(tmp0_desc, 7, $serializer_getInstance_75(), value.fty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.gty_1 === false)) {
      tmp1_output.o49(tmp0_desc, 8, value.gty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.hty_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, StringSerializer_getInstance(), value.hty_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_61).r44 = function (encoder, value) {
    return this.hu8(encoder, value instanceof ClazzAssignmentEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_61;
  function $serializer_getInstance_73() {
    if ($serializer_instance_61 == null)
      new $serializer_61();
    return $serializer_instance_61;
  }
  function ClazzAssignmentEditUiState_init_$Init$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_73().gu8_1);
    }
    if (0 === (seen1 & 1))
      $this.ytx_1 = false;
    else
      $this.ytx_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.ztx_1 = true;
    else
      $this.ztx_1 = markingTypeEnabled;
    if (0 === (seen1 & 4))
      $this.aty_1 = true;
    else
      $this.aty_1 = groupSetEnabled;
    if (0 === (seen1 & 8))
      $this.bty_1 = null;
    else
      $this.bty_1 = reviewerCountError;
    if (0 === (seen1 & 16))
      $this.cty_1 = null;
    else
      $this.cty_1 = courseTerminology;
    if (0 === (seen1 & 32))
      $this.dty_1 = null;
    else
      $this.dty_1 = submissionRequiredError;
    if (0 === (seen1 & 64))
      $this.ety_1 = null;
    else
      $this.ety_1 = sizeLimitError;
    if (0 === (seen1 & 128))
      $this.fty_1 = new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_151().qu4_1);
    else
      $this.fty_1 = courseBlockEditUiState;
    if (0 === (seen1 & 256))
      $this.gty_1 = false;
    else
      $this.gty_1 = groupSubmissionOn;
    if (0 === (seen1 & 512))
      $this.hty_1 = null;
    else
      $this.hty_1 = groupSetError;
    return $this;
  }
  function ClazzAssignmentEditUiState_init_$Create$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker) {
    return ClazzAssignmentEditUiState_init_$Init$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker, objectCreate(protoOf(ClazzAssignmentEditUiState)));
  }
  function ClazzAssignmentEditUiState(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) {
    Companion_getInstance_151();
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? true : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? true : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? null : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? null : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? null : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_151().qu4_1) : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? false : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? null : groupSetError;
    this.ytx_1 = fieldsEnabled;
    this.ztx_1 = markingTypeEnabled;
    this.aty_1 = groupSetEnabled;
    this.bty_1 = reviewerCountError;
    this.cty_1 = courseTerminology;
    this.dty_1 = submissionRequiredError;
    this.ety_1 = sizeLimitError;
    this.fty_1 = courseBlockEditUiState;
    this.gty_1 = groupSubmissionOn;
    this.hty_1 = groupSetError;
  }
  protoOf(ClazzAssignmentEditUiState).sty = function () {
    return this.fty_1.cu0_1;
  };
  protoOf(ClazzAssignmentEditUiState).iu8 = function () {
    var tmp0_safe_receiver = this.sty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a7u_1;
    return tmp === 2;
  };
  protoOf(ClazzAssignmentEditUiState).ju8 = function () {
    var tmp0_safe_receiver = this.sty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b7u_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).ku8 = function () {
    var tmp0_safe_receiver = this.sty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v7t_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).nu5 = function (fieldsEnabled) {
    return this.ity(fieldsEnabled, VOID, VOID, VOID, VOID, VOID, VOID, this.fty_1.nu0(VOID, VOID, VOID, fieldsEnabled));
  };
  protoOf(ClazzAssignmentEditUiState).lu8 = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) {
    return new ClazzAssignmentEditUiState(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).ity = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.ytx_1 : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? this.ztx_1 : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? this.aty_1 : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? this.bty_1 : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? this.cty_1 : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? this.dty_1 : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? this.ety_1 : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.fty_1 : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? this.gty_1 : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? this.hty_1 : groupSetError;
    return $super === VOID ? this.lu8(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) : $super.lu8.call(this, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).toString = function () {
    return 'ClazzAssignmentEditUiState(fieldsEnabled=' + this.ytx_1 + ', markingTypeEnabled=' + this.ztx_1 + ', groupSetEnabled=' + this.aty_1 + ', reviewerCountError=' + this.bty_1 + ', courseTerminology=' + this.cty_1 + ', submissionRequiredError=' + this.dty_1 + ', sizeLimitError=' + this.ety_1 + ', courseBlockEditUiState=' + this.fty_1 + ', groupSubmissionOn=' + this.gty_1 + ', groupSetError=' + this.hty_1 + ')';
  };
  protoOf(ClazzAssignmentEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.ytx_1);
    result = imul(result, 31) + getBooleanHashCode(this.ztx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.aty_1) | 0;
    result = imul(result, 31) + (this.bty_1 == null ? 0 : getStringHashCode(this.bty_1)) | 0;
    result = imul(result, 31) + (this.cty_1 == null ? 0 : hashCode(this.cty_1)) | 0;
    result = imul(result, 31) + (this.dty_1 == null ? 0 : getStringHashCode(this.dty_1)) | 0;
    result = imul(result, 31) + (this.ety_1 == null ? 0 : getStringHashCode(this.ety_1)) | 0;
    result = imul(result, 31) + this.fty_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gty_1) | 0;
    result = imul(result, 31) + (this.hty_1 == null ? 0 : getStringHashCode(this.hty_1)) | 0;
    return result;
  };
  protoOf(ClazzAssignmentEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentEditUiState ? other : THROW_CCE();
    if (!(this.ytx_1 === tmp0_other_with_cast.ytx_1))
      return false;
    if (!(this.ztx_1 === tmp0_other_with_cast.ztx_1))
      return false;
    if (!(this.aty_1 === tmp0_other_with_cast.aty_1))
      return false;
    if (!(this.bty_1 == tmp0_other_with_cast.bty_1))
      return false;
    if (!equals(this.cty_1, tmp0_other_with_cast.cty_1))
      return false;
    if (!(this.dty_1 == tmp0_other_with_cast.dty_1))
      return false;
    if (!(this.ety_1 == tmp0_other_with_cast.ety_1))
      return false;
    if (!this.fty_1.equals(tmp0_other_with_cast.fty_1))
      return false;
    if (!(this.gty_1 === tmp0_other_with_cast.gty_1))
      return false;
    if (!(this.hty_1 == tmp0_other_with_cast.hty_1))
      return false;
    return true;
  };
  function snackDisaptcher$factory() {
    return getPropertyCallableRef('snackDisaptcher', 1, KProperty1, function (receiver) {
      return _get_snackDisaptcher__bp310a(receiver);
    }, null);
  }
  function snackDisaptcher$factory_0() {
    return getPropertyCallableRef('snackDisaptcher', 1, KProperty1, function (receiver) {
      return _get_snackDisaptcher__bp310a(receiver);
    }, null);
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation) {
    this.uu8_1 = this$0;
    this.vu8_1 = $savedStateHandle;
    this.wu8_1 = $primaryKeyManager;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).qu9 = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qu9(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.hd_1 = 1;
            suspendResult = this.uu8_1.fqo(this.vu8_1, 'allocations', ListSerializer(Companion_instance_18.n4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.yu8_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.xu8_1.q7e().n7s(this.uu8_1.rua_1, this.uu8_1.uua_1, systemTimeInMillis(), this.uu8_1.aqo().moj(strings_getInstance().ynf_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.zu8_1 = suspendResult;
            Napier_getInstance().i5e('Number of submitters: ' + this.zu8_1.u());
            var tmp_0 = this;
            tmp_0.au9_1 = this.zu8_1;
            var tmp_1 = this;
            tmp_1.bu9_1 = this.au9_1;
            var tmp_2 = this;
            tmp_2.cu9_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.au9_1, 10));
            this.du9_1 = this.bu9_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.du9_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.eu9_1 = this.du9_1.e();
            var tmp_3 = this;
            tmp_3.fu9_1 = this.eu9_1;
            this.gu9_1 = new AssignmentSubmitterSummary(this.fu9_1.e7x_1, this.fu9_1.d7x_1);
            var tmp_4 = this;
            var tmp0_safe_receiver = this.yu8_1;
            var tmp_5;
            if (tmp0_safe_receiver == null) {
              tmp_5 = null;
            } else {
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = tmp0_safe_receiver.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.pfu_1.equals(this.fu9_1.e7x_1)) {
                  destination.i1(element);
                }
              }
              tmp_5 = destination;
            }

            var tmp1_elvis_lhs = tmp_5;
            tmp_4.hu9_1 = trimToSize(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, this.uu8_1.sua_1);
            var tmp_6 = this;
            tmp_6.iu9_1 = this.uu8_1.sua_1;
            if (this.hu9_1.u() < this.iu9_1) {
              var tmp_7 = this;
              tmp_7.ku9_1 = until(this.hu9_1.u(), this.iu9_1);
              var tmp_8 = this;
              tmp_8.lu9_1 = this.ku9_1;
              var tmp_9 = this;
              tmp_9.mu9_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.ku9_1, 10));
              this.nu9_1 = this.lu9_1.w();
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.ju9_1 = this.hu9_1;
              this.hd_1 = 7;
              continue $sm;
            }

          case 4:
            if (!this.nu9_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.ou9_1 = this.nu9_1.e();
            var tmp_11 = this;
            tmp_11.pu9_1 = this.ou9_1;
            this.hd_1 = 5;
            suspendResult = this.wu8_1.o62(140, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = new PeerReviewerAllocation(ARGUMENT, VOID, this.fu9_1.e7x_1, this.uu8_1.tua_1);
            this.mu9_1.i1(ARGUMENT_0);
            this.hd_1 = 4;
            continue $sm;
          case 6:
            var ARGUMENT_1 = this.mu9_1;
            this.ju9_1 = plus(this.hu9_1, ARGUMENT_1);
            this.hd_1 = 7;
            continue $sm;
          case 7:
            var ARGUMENT_2 = this.ju9_1;
            var ARGUMENT_3 = new AssignmentSubmitterAndAllocations(this.gu9_1, ARGUMENT_2);
            this.cu9_1.i1(ARGUMENT_3);
            this.hd_1 = 3;
            continue $sm;
          case 8:
            return this.cu9_1;
          case 9:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 9) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).yny = function (db, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this.uu8_1, this.vu8_1, this.wu8_1, completion);
    i.xu8_1 = db;
    return i;
  };
  function PeerReviewerAllocationEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation);
    var l = function (db, $completion) {
      return i.qu9(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).dub = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.dub($completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new PeerReviewerAllocationEditViewModel$slambda$slambda_1(completion);
  };
  function PeerReviewerAllocationEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.dub($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pua_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.fub(it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PeerReviewerAllocationEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_135() {
    this.gub_1 = 'allocations';
    this.hub_1 = 'groupSetUid';
    this.iub_1 = 'numReviewers';
    this.jub_1 = 'PeerReviewerAllocationEdit';
  }
  var Companion_instance_184;
  function Companion_getInstance_152() {
    return Companion_instance_184;
  }
  function PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.sub_1 = this$0;
    this.tub_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.vub_1 = get_doorPrimaryKeyManager(this.sub_1.uqn());
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_getInstance_14().n4r());
            var tmp_1 = PeerReviewerAllocationEditViewModel$slambda$slambda_0(this.sub_1, this.tub_1, this.vub_1, null);
            var tmp_2 = PeerReviewerAllocationEditViewModel$slambda$slambda_2(null);
            suspendResult = this.sub_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, PeerReviewerAllocationEditViewModel$slambda$lambda(this.sub_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.sub_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.sub_1.aqo().moj(strings_getInstance().qmr_1);
                var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, true, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, PeerReviewerAllocationEditViewModel$onClickSave$ref(this.sub_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda(this.sub_1, this.tub_1, completion);
    i.uub_1 = $this$launch;
    return i;
  };
  function PeerReviewerAllocationEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda($allocation) {
    return function (it) {
      return it.nfu_1.equals($allocation.nfu_1);
    };
  }
  function PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this$0, resultContinuation) {
    this.euc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.euc_1.pua_1.t2().eub_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var list = element.pkc_1;
              addAll(destination, list);
            }

            suspendResult = this.euc_1.oua_1.ppk(destination, this.euc_1.uua_1, this.euc_1.rua_1, this.euc_1.tua_1, this.euc_1.sua_1, true, true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newAllocations = suspendResult;
            l$ret$1: do {
              var this_1 = this.euc_1.pua_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = prevValue.eub_1;
                var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_0 = this_2.w();
                while (tmp0_iterator_0.f()) {
                  var item = tmp0_iterator_0.e();
                  var destination_1 = ArrayList_init_$Create$();
                  var tmp0_iterator_1 = newAllocations.w();
                  while (tmp0_iterator_1.f()) {
                    var element_0 = tmp0_iterator_1.e();
                    if (element_0.pfu_1.equals(item.okc_1.r7v_1)) {
                      destination_1.i1(element_0);
                    }
                  }
                  destination_0.i1(new AssignmentSubmitterAndAllocations(item.okc_1, destination_1));
                }
                var nextValue = prevValue.fub(destination_0);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).v1m = function ($this$launch, completion) {
    var i = new PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this.euc_1, completion);
    i.fuc_1 = $this$launch;
    return i;
  };
  function PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this$0, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel(di, savedStateHandle, updatePeerReviewAllocationUseCase) {
    var tmp;
    if (updatePeerReviewAllocationUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.d58(tmp$ret$0, 1);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(di).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp$ret$3 = tmp_3.d58(tmp$ret$2, null);
      tmp = new UpdatePeerReviewAllocationUseCase(tmp_2, tmp$ret$3);
    } else {
      tmp = updatePeerReviewAllocationUseCase;
    }
    updatePeerReviewAllocationUseCase = tmp;
    UstadEditViewModel.call(this, di, savedStateHandle, 'PeerReviewerAllocationEdit');
    this.oua_1 = updatePeerReviewAllocationUseCase;
    this.pua_1 = MutableStateFlow(new PeerReviewerAllocationEditUIState());
    this.qua_1 = asStateFlow(this.pua_1);
    var tmp_5 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_5.rua_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_6 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('numReviewers');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toInt(tmp0_safe_receiver_0);
    tmp_6.sua_1 = tmp1_elvis_lhs_0 == null ? 1 : tmp1_elvis_lhs_0;
    var tmp_7 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('clazzAssignmentUid');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    tmp_7.tua_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_8 = this;
    var tmp0_safe_receiver_2 = savedStateHandle.ba('groupSetUid');
    var tmp1_elvis_lhs_2 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_8.uua_1 = tmp1_elvis_lhs_2 == null ? new Long(0, 0) : tmp1_elvis_lhs_2;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().rnk_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.rqn();
    launch(tmp_9, VOID, VOID, PeerReviewerAllocationEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(PeerReviewerAllocationEditViewModel).guc = function (allocation) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pua_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onAllocationChanged.<anonymous>' call
        // Inline function 'kotlin.collections.map' call
        var this_1 = prevValue.eub_1;
        // Inline function 'kotlin.collections.mapTo' call
        var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
        var tmp0_iterator = this_1.w();
        while (tmp0_iterator.f()) {
          var item = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onAllocationChanged.<anonymous>.<anonymous>' call
          var tmp;
          if (item.okc_1.r7v_1.equals(allocation.pfu_1)) {
            tmp = item.rkc(VOID, replace_0(item.pkc_1, allocation, PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda(allocation)));
          } else {
            tmp = item;
          }
          var tmp$ret$0 = tmp;
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.fub(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PeerReviewerAllocationEditViewModel).huc = function () {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this, null));
  };
  protoOf(PeerReviewerAllocationEditViewModel).asa = function () {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var this_0 = this.pua_1.t2().eub_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onClickSave.<anonymous>' call
      var list = element.pkc_1;
      addAll(destination, list);
    }
    this.lqt(destination);
  };
  function PeerReviewerAllocationEditUIState(submitterListWithAllocations) {
    submitterListWithAllocations = submitterListWithAllocations === VOID ? emptyList() : submitterListWithAllocations;
    this.eub_1 = submitterListWithAllocations;
  }
  protoOf(PeerReviewerAllocationEditUIState).iuc = function (allocation) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.eub_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
        if (element.okc_1.r7v_1.equals(allocation.pfu_1)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pkc_1;
    var existingAllocationsForSubmitter = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator_0 = existingAllocationsForSubmitter.w();
    while (tmp0_iterator_0.f()) {
      var element_0 = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      if (!element_0.nfu_1.equals(allocation.nfu_1)) {
        destination.i1(element_0);
      }
    }
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
    var tmp0_iterator_1 = destination.w();
    while (tmp0_iterator_1.f()) {
      var item = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      var tmp$ret$5 = item.ofu_1;
      destination_0.i1(tmp$ret$5);
    }
    var otherMarkersAlreadySelected = destination_0;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.eub_1;
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_2 = this_0.w();
    while (tmp0_iterator_2.f()) {
      var element_1 = tmp0_iterator_2.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      if (!element_1.okc_1.r7v_1.equals(allocation.pfu_1) ? !otherMarkersAlreadySelected.a1(element_1.okc_1.r7v_1) : false) {
        destination_1.i1(element_1);
      }
    }
    return destination_1;
  };
  protoOf(PeerReviewerAllocationEditUIState).fub = function (submitterListWithAllocations) {
    return new PeerReviewerAllocationEditUIState(submitterListWithAllocations);
  };
  protoOf(PeerReviewerAllocationEditUIState).toString = function () {
    return 'PeerReviewerAllocationEditUIState(submitterListWithAllocations=' + this.eub_1 + ')';
  };
  protoOf(PeerReviewerAllocationEditUIState).hashCode = function () {
    return hashCode(this.eub_1);
  };
  protoOf(PeerReviewerAllocationEditUIState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PeerReviewerAllocationEditUIState))
      return false;
    var tmp0_other_with_cast = other instanceof PeerReviewerAllocationEditUIState ? other : THROW_CCE();
    if (!equals(this.eub_1, tmp0_other_with_cast.eub_1))
      return false;
    return true;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ruc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).tuc = function (it, $completion) {
    var tmp = this.uuc(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.tuc((p1 == null ? true : p1 instanceof CourseBlockAndAssignment) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ruc_1.rud_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.auf(VOID, this.suc_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).uuc = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this.ruc_1, completion);
    i.suc_1 = it;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.tuc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.juf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.juf_1.wqn().p7d().ncl(this.juf_1.vud_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this.juf_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_18(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.juf_1, completion);
    i.kuf_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).ctk = function (submissions, submissionFiles, $completion) {
    var tmp = this.dtk(submissions, submissionFiles, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.ctk(tmp, (!(p2 == null) ? isInterface(p2, List) : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return combineWithSubmissionFiles(this.tuf_1, this.uuf_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).dtk = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(completion);
    i.tuf_1 = submissions;
    i.uuf_1 = submissionFiles;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (submissions, submissionFiles, $completion) {
      return i.ctk(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.dug_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).otk = function (it, $completion) {
    var tmp = this.ptk(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.otk((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.dug_1.rud_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.auf(VOID, VOID, VOID, this.eug_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).ptk = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.dug_1, completion);
    i.eug_1 = it;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.otk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.nug_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).atl = function (it, $completion) {
    var tmp = this.btl(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.atl((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.nug_1.rud_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.auf(VOID, VOID, VOID, VOID, VOID, this.oug_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).btl = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this.nug_1, completion);
    i.oug_1 = it;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.atl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.xug_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_assignmentSubmitterNameUseCase__ts4wyt(this.xug_1).ioo(this.xug_1.wud_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var submitterName = suspendResult;
            l$ret$1: do {
              var this_0 = this.xug_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mq6(VOID, VOID, submitterName);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.xug_1, completion);
    i.yug_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.huh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.iuh_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.huh_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.huh_1, completion);
    i.iuh_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.ruh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.tuh_1 = this.ruh_1.wqn().r7e().rc1(this.ruh_1.wud_1, this.ruh_1.vud_1);
            this.uuh_1 = this.ruh_1.wqn().s7e().cca(this.ruh_1.wud_1, this.ruh_1.vud_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.tuh_1, this.uuh_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.ruh_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_18(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this.ruh_1, completion);
    i.suh_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.dui_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.dui_1.wqn().t7e().qbv(this.dui_1.wud_1, this.dui_1.vud_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this.dui_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_18(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this.dui_1, completion);
    i.eui_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this$0, $this_launch, resultContinuation) {
    this.nui_1 = this$0;
    this.oui_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).qui = function (permissionPair, $completion) {
    var tmp = this.rui(permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qui(p1 instanceof AssignmentPermissionAndActiveUserSubmitterUid ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          if (this.pui_1.qdo_1) {
            l$ret$1: do {
              var this_0 = this.nui_1.rud_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_privateCommentsList = this.nui_1.yud_1;
                var tmp1_activeUserPersonUid = this.nui_1.sqn();
                var tmp2_activeUserSubmitterId = this.pui_1.sdo_1;
                var tmp_0;
                if (this.pui_1.pdo_1) {
                  var this_1 = new CourseAssignmentMark();
                  this_1.lbw_1 = -1.0;
                  tmp_0 = this_1;
                } else {
                  tmp_0 = null;
                }
                var tmp3_draftMark = tmp_0;
                var tmp4_showModerateOptions = this.pui_1.rdo_1;
                var nextValue = prevValue.auf(VOID, VOID, VOID, VOID, VOID, VOID, tmp3_draftMark, VOID, VOID, VOID, VOID, VOID, tmp0_privateCommentsList, true, tmp1_activeUserPersonUid, tmp2_activeUserSubmitterId, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_showModerateOptions);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.oui_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.nui_1, null));
            launch(this.oui_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.nui_1, null));
            launch(this.oui_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this.nui_1, null));
            launch(this.oui_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this.nui_1, null));
          } else {
            l$ret$3: do {
              var this_2 = this.nui_1.rud_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp0_submissionList = emptyList();
                var tmp1_marks = emptyList();
                var nextValue_0 = prevValue_0.auf(VOID, null, VOID, tmp0_submissionList, VOID, tmp1_marks, VOID, VOID, VOID, VOID, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$lambda, false, VOID, new Long(0, 0));
                if (this_2.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).rui = function (permissionPair, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this.nui_1, this.oui_1, completion);
    i.pui_1 = permissionPair;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, $this_launch, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this$0, $this_launch, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.qui(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation) {
    this.auj_1 = $permissionFlow;
    this.buj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.auj_1);
            suspendResult = collectLatest(tmp_0, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this.buj_1, this.cuj_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda(this.auj_1, this.buj_1, completion);
    i.cuj_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation) {
    this.luj_1 = $this_launch;
    this.muj_1 = $permissionFlow;
    this.nuj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.luj_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0(this.muj_1, this.nuj_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda(this.luj_1, this.muj_1, this.nuj_1, completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0($this_launch, $permissionFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.rud_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.openSubmissionFileAsBlob.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.auf(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_assignmentSubmitterNameUseCase__ts4wyt($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zud_1;
    assignmentSubmitterNameUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bue_1;
    openBlobUiUseCase$factory_2();
    return this_0.t2();
  }
  function _get_submitMarkUseCase__y8b5kx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cue_1;
    submitMarkUseCase$factory_0();
    return this_0.t2();
  }
  function openSubmissionFileAsBlob_0($this, file, intent) {
    var tmp0_elvis_lhs = file.wcb_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.aue_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.rqn();
    tmp_0.aue_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_136() {
    this.ouj_1 = 'assignmentUid';
    this.puj_1 = 'submitterUid';
    this.quj_1 = 'CourseAssignmentSubmitter';
  }
  var Companion_instance_185;
  function Companion_getInstance_153() {
    return Companion_instance_185;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_18(function_0) {
    this.ruj_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_18).t1d = function (value, $completion) {
    return this.ruj_1(value, $completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().u7e().pac(this$0.wud_1, this$0.vud_1, false);
    };
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation) {
    this.auk_1 = this$0;
    this.buk_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.auk_1.rud_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0(this.cuk_1, this.buk_1, this.auk_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda(this.auk_1, this.buk_1, completion);
    i.cuk_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda_0(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this$0, resultContinuation) {
    this.luk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.hd_1 = 2;
            var tmp_0 = this.luk_1.wqn().u7e();
            var this_0 = new Comments();
            this_0.kad_1 = this.luk_1.wud_1;
            this_0.lad_1 = this.luk_1.rud_1.t2().sue_1;
            this_0.jad_1 = this.luk_1.sqn();
            this_0.had_1 = this.luk_1.vud_1;
            this_0.gad_1 = this.luk_1.tud_1.t2();
            this_0.oad_1 = systemTimeInMillis();
            suspendResult = tmp_0.mac(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.luk_1.tud_1.x1k('');
            tmp_1.nuk_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.luk_1.cqo(Companion_getInstance_97().uq6_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.luk_1.cqo(Companion_getInstance_97().uq6_1);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this.luk_1, completion);
    i.muk_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation) {
    this.wuk_1 = this$0;
    this.xuk_1 = $assignment;
    this.yuk_1 = $draftMark;
    this.zuk_1 = $submissions;
    this.aul_1 = $courseBlock;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            var tmp_0 = _get_submitMarkUseCase__y8b5kx(this.wuk_1);
            var tmp_1 = this.wuk_1.qqn().uo9().onu_1;
            var this_0 = this.zuk_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(item.ekb_1);
            }

            suspendResult = tmp_0.rom(tmp_1, this.xuk_1, this.wuk_1.xud_1, this.wuk_1.wud_1, this.yuk_1, destination, this.aul_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_2 = this;
            l$ret$1: do {
              var this_1 = this.wuk_1.rud_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = new CourseAssignmentMark();
                this_2.lbw_1 = -1.0;
                var nextValue = prevValue.auf(VOID, VOID, VOID, VOID, VOID, VOID, this_2);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_2.cul_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Exception) {
              var e = this.kd_1;
              var tmp_4 = this;
              this.wuk_1.yqn().bq7(new Snack('Error: ' + e.message));
              Napier_getInstance().m5e('Exception submitting mark:', e);
              tmp_4.cul_1 = Unit_instance;
              this.id_1 = 5;
              this.hd_1 = 6;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            l$ret$5: do {
              var this_3 = this.wuk_1.rud_1;
              while (true) {
                var prevValue_0 = this_3.t2();
                var nextValue_0 = prevValue_0.auf(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_3.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            l$ret$7: do {
              var this_4 = this.wuk_1.rud_1;
              while (true) {
                var prevValue_1 = this_4.t2();
                var nextValue_1 = prevValue_1.auf(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_4.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 5) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this.wuk_1, this.xuk_1, this.yuk_1, this.zuk_1, this.aul_1, completion);
    i.bul_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation) {
    this.lul_1 = this$0;
    this.mul_1 = $submissionFile;
    this.nul_1 = $intent;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.pul_1 = _get_openBlobUiUseCase__fzusqz_0(this.lul_1);
            if (this.pul_1 == null) {
              this.qul_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.mul_1);
              suspendResult = this.pul_1.sop(tmp_0, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this.lul_1), this.nul_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.qul_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this.lul_1, this.mul_1, this.nul_1, completion);
    i.oul_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0(this$0, $submissionFile, $intent, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation) {
    this.zul_1 = this$0;
    this.aum_1 = $comments;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.zul_1.wqn().u7e().nac(this.aum_1.fad_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zul_1.yqn().bq7(new Snack(this.zul_1.aqo().moj(strings_getInstance().lmj_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this.zul_1, this.aum_1, completion);
    i.bum_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this$0, $comments, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignmentSubmitter');
    this.rud_1 = MutableStateFlow(new ClazzAssignmentSubmitterDetailUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.aqo().hq5()));
    this.sud_1 = asStateFlow(this.rud_1);
    this.tud_1 = MutableStateFlow('');
    this.uud_1 = asStateFlow(this.tud_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('assignmentUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No assignmentUid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.vud_1 = tmp_0;
    var tmp_1 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('submitterUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_2;
    if (tmp1_elvis_lhs_0 == null) {
      throw IllegalArgumentException_init_$Create$('No submitter uid');
    } else {
      tmp_2 = tmp1_elvis_lhs_0;
    }
    tmp_1.wud_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    var tmp_4;
    if (tmp1_elvis_lhs_1 == null) {
      throw IllegalArgumentException_init_$Create$('No clazzUid');
    } else {
      tmp_4 = tmp1_elvis_lhs_1;
    }
    tmp_3.xud_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.yud_1 = ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.qqn().loa();
    var trigger = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_7 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$1 = tmp_7.h57(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_6.zud_1 = Instance(this_0, tmp$ret$3, null).a5d(this, assignmentSubmitterNameUseCase$factory());
    this.aue_1 = null;
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.bue_1 = InstanceOrNull(this_1, tmp$ret$5, null).a5d(this, openBlobUiUseCase$factory_1());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.cue_1 = Instance(this_2, tmp$ret$7, null).a5d(this, submitMarkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.rud_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.<anonymous>' call
        var tmp_14 = this.qqn().uo9().onu_1.ckr();
        var tmp0_safe_receiver_2 = this.qqn().uo9().qnu_1;
        var nextValue = prevValue.auf(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_14, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.h97_1);
        if (this_3.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var permissionFlow = this.wqn().o7f().kdk(this.sqn(), this.vud_1, this.xud_1, this.wud_1);
    var tmp_15 = this.rqn();
    launch(tmp_15, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda_0(this, permissionFlow, null));
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel).cum = function (text) {
    this.tud_1.x1k(text);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).dum = function () {
    if (this.dqo().equals(Companion_getInstance_97().tq6_1))
      return Unit_instance;
    this.cqo(Companion_getInstance_97().tq6_1);
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).eum = function (draftMark) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onChangeDraftMark.<anonymous>' call
        var tmp;
        var tmp0_safe_receiver = prevValue.jue_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lbw_1;
        if (tmp_0 == (draftMark == null ? null : draftMark.lbw_1)) {
          tmp = prevValue.due_1;
        } else {
          tmp = null;
        }
        var tmp2_submitMarkError = tmp;
        var nextValue = prevValue.auf(tmp2_submitMarkError, VOID, VOID, VOID, VOID, VOID, draftMark);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).fum = function () {
    if (!this.rud_1.t2().gum())
      return Unit_instance;
    var tmp0_elvis_lhs = this.rud_1.t2().jue_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var draftMark = tmp;
    var submissions = this.rud_1.t2().gue_1;
    var tmp1_elvis_lhs = this.rud_1.t2().eue_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var block = tmp_0;
    var tmp2_elvis_lhs = block.uco_1;
    var tmp_1;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_1 = tmp2_elvis_lhs;
    }
    var courseBlock = tmp_1;
    var tmp3_elvis_lhs = block.vco_1;
    var tmp_2;
    if (tmp3_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_2 = tmp3_elvis_lhs;
    }
    var assignment = tmp_2;
    if (draftMark.lbw_1 === -1.0) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.rud_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
          var nextValue = prevValue.auf(this.aqo().moj(strings_getInstance().vmn_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    } else {
      if (draftMark.lbw_1 < 0.0) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_1 = this.rud_1;
          while (true) {
            var prevValue_0 = this_1.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
            var nextValue_0 = prevValue_0.auf(this.aqo().moj(strings_getInstance().xng_1));
            if (this_1.y1k(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_instance;
      } else {
        var tmp_3 = draftMark.lbw_1;
        var tmp4_elvis_lhs = courseBlock.e7y_1;
        if (tmp_3 > (tmp4_elvis_lhs == null ? 0.0 : tmp4_elvis_lhs)) {
          $l$block_1: {
            // Inline function 'kotlinx.coroutines.flow.update' call
            var this_2 = this.rud_1;
            while (true) {
              var prevValue_1 = this_2.t2();
              // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
              var nextValue_1 = prevValue_1.auf(this.aqo().moj(strings_getInstance().vnl_1));
              if (this_2.y1k(prevValue_1, nextValue_1)) {
                break $l$block_1;
              }
            }
          }
          return Unit_instance;
        }
      }
    }
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.rud_1;
      while (true) {
        var prevValue_2 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
        var nextValue_2 = prevValue_2.auf(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_3.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_4 = this.rqn();
    launch(tmp_4, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this, assignment, draftMark, submissions, courseBlock, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).hum = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickGradeFilterChip.<anonymous>' call
        var nextValue = prevValue.auf(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.pq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).qtv = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.auf(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.xue_1, submission.kc2_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).ttv = function (file) {
    openSubmissionFileAsBlob_0(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).utv = function (comments) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq_0($this) {
    return latestUniqueMarksByMarker($this.iue_1);
  }
  function sam$kotlin_Comparator$0_1(function_0) {
    this.ium_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_1).pa = function (a, b) {
    return this.ium_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {
    return this.pa(a, b);
  };
  function ClazzAssignmentSubmitterDetailUiState$_init_$lambda_l9iher() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentSubmitterDetailUiState$_get_visibleMarks_$lambda_u07plk(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-visibleMarks>.<anonymous>' call
    var tmp0_safe_receiver = b.rbw_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.obw_1;
    var tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-visibleMarks>.<anonymous>' call
    var tmp0_safe_receiver_0 = a.rbw_1;
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.obw_1;
    var tmp$ret$1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    return compareValues(tmp, tmp$ret$1);
  }
  function ClazzAssignmentSubmitterDetailUiState(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) {
    submitMarkError = submitMarkError === VOID ? null : submitMarkError;
    block = block === VOID ? null : block;
    gradeFilterChips = gradeFilterChips === VOID ? emptyList() : gradeFilterChips;
    submissionList = submissionList === VOID ? emptyList() : submissionList;
    submissionAttachments = submissionAttachments === VOID ? emptyList() : submissionAttachments;
    marks = marks === VOID ? emptyList() : marks;
    draftMark = draftMark === VOID ? null : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? false : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? true : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp;
    if (markListSelectedChipId === VOID) {
      tmp = 1;
    } else {
      tmp = markListSelectedChipId;
    }
    markListSelectedChipId = tmp;
    var tmp_0;
    if (markListFilterOptions === VOID) {
      var tmp_1 = strings_getInstance().gnl_1;
      var tmp_2 = new MessageIdOption2(tmp_1, 1);
      var tmp_3 = strings_getInstance().wmz_1;
      tmp_0 = listOf([tmp_2, new MessageIdOption2(tmp_3, 0)]);
    } else {
      tmp_0 = markListFilterOptions;
    }
    markListFilterOptions = tmp_0;
    var tmp_4;
    if (privateCommentsList === VOID) {
      tmp_4 = ClazzAssignmentSubmitterDetailUiState$_init_$lambda_l9iher;
    } else {
      tmp_4 = privateCommentsList;
    }
    privateCommentsList = tmp_4;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? false : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? new Long(0, 0) : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? '' : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? null : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? null : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    this.due_1 = submitMarkError;
    this.eue_1 = block;
    this.fue_1 = gradeFilterChips;
    this.gue_1 = submissionList;
    this.hue_1 = submissionAttachments;
    this.iue_1 = marks;
    this.jue_1 = draftMark;
    this.kue_1 = markSubmissionInProgress;
    this.lue_1 = markNextStudentVisible;
    this.mue_1 = fieldsEnabled;
    this.nue_1 = markListSelectedChipId;
    this.oue_1 = markListFilterOptions;
    this.pue_1 = privateCommentsList;
    this.que_1 = newPrivateCommentTextVisible;
    this.rue_1 = activeUserPersonUid;
    this.sue_1 = activeUserSubmitterId;
    this.tue_1 = activeUserPersonName;
    this.uue_1 = activeUserPictureUri;
    this.vue_1 = localDateTimeNow;
    this.wue_1 = dayOfWeekStrings;
    this.xue_1 = collapsedSubmissions;
    this.yue_1 = openingFileState;
    this.zue_1 = showModerateOptions;
  }
  protoOf(ClazzAssignmentSubmitterDetailUiState).gum = function () {
    var tmp;
    if (!this.kue_1) {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-markFieldsEnabled>.<anonymous>' call
      var it = this.eue_1;
      var tmp_0;
      if (!((it == null ? null : it.vco_1) == null)) {
        tmp_0 = !(it.uco_1 == null);
      } else {
        tmp_0 = false;
      }
      tmp = tmp_0;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).etw = function () {
    return submissionStatusFor(this.iue_1, this.gue_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).jum = function () {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-averageScore>.<anonymous>' call
    var latestUniqueMarks = _get_latestUniqueMarksByMarker__e0a3pq_0(this);
    // Inline function 'kotlin.collections.sumOf' call
    var sum = 0.0;
    var tmp0_iterator = latestUniqueMarks.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      var tmp = sum;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-averageScore>.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver = element.rbw_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lbw_1;
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;
      sum = tmp + (tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);
    }
    var tmp_0 = sum;
    // Inline function 'kotlin.math.max' call
    var a = latestUniqueMarks.u();
    return tmp_0 / Math.max(a, 1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).kum = function (mark) {
    return new UstadCourseAssignmentMarkListItemUiState(mark, this.vue_1, this.wue_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).lum = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.iue_1;
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-submitGradeButtonMessageId>.<anonymous>' call
        var tmp0_safe_receiver = element.rbw_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_1, this.sue_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().enk_1;
    } else {
      tmp = strings_getInstance().ung_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).mum = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.iue_1;
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-submitGradeButtonAndGoNextMessageId>.<anonymous>' call
        var tmp0_safe_receiver = element.rbw_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_1, this.sue_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().fnk_1;
    } else {
      tmp = strings_getInstance().vng_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).jtw = function () {
    var tmp;
    if (this.nue_1 === 1) {
      // Inline function 'kotlin.collections.sortedByDescending' call
      var this_0 = _get_latestUniqueMarksByMarker__e0a3pq_0(this);
      // Inline function 'kotlin.comparisons.compareByDescending' call
      var tmp_0 = ClazzAssignmentSubmitterDetailUiState$_get_visibleMarks_$lambda_u07plk;
      var tmp$ret$0 = new sam$kotlin_Comparator$0_1(tmp_0);
      tmp = sortedWith(this_0, tmp$ret$0);
    } else {
      tmp = this.iue_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).num = function () {
    return hasUpdatedMarks(this.iue_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).oum = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.iue_1.c1();
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).pum = function (submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) {
    return new ClazzAssignmentSubmitterDetailUiState(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).auf = function (submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions, $super) {
    submitMarkError = submitMarkError === VOID ? this.due_1 : submitMarkError;
    block = block === VOID ? this.eue_1 : block;
    gradeFilterChips = gradeFilterChips === VOID ? this.fue_1 : gradeFilterChips;
    submissionList = submissionList === VOID ? this.gue_1 : submissionList;
    submissionAttachments = submissionAttachments === VOID ? this.hue_1 : submissionAttachments;
    marks = marks === VOID ? this.iue_1 : marks;
    draftMark = draftMark === VOID ? this.jue_1 : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? this.kue_1 : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? this.lue_1 : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? this.mue_1 : fieldsEnabled;
    markListSelectedChipId = markListSelectedChipId === VOID ? this.nue_1 : markListSelectedChipId;
    markListFilterOptions = markListFilterOptions === VOID ? this.oue_1 : markListFilterOptions;
    privateCommentsList = privateCommentsList === VOID ? this.pue_1 : privateCommentsList;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? this.que_1 : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.rue_1 : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? this.sue_1 : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? this.tue_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.uue_1 : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? this.vue_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.wue_1 : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.xue_1 : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? this.yue_1 : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? this.zue_1 : showModerateOptions;
    return $super === VOID ? this.pum(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) : $super.pum.call(this, submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).toString = function () {
    return 'ClazzAssignmentSubmitterDetailUiState(submitMarkError=' + this.due_1 + ', block=' + this.eue_1 + ', gradeFilterChips=' + this.fue_1 + ', submissionList=' + this.gue_1 + ', submissionAttachments=' + this.hue_1 + ', marks=' + this.iue_1 + ', draftMark=' + this.jue_1 + ', markSubmissionInProgress=' + this.kue_1 + ', markNextStudentVisible=' + this.lue_1 + ', fieldsEnabled=' + this.mue_1 + ', markListSelectedChipId=' + this.nue_1 + ', markListFilterOptions=' + this.oue_1 + ', privateCommentsList=' + this.pue_1 + ', newPrivateCommentTextVisible=' + this.que_1 + ', activeUserPersonUid=' + this.rue_1.toString() + ', activeUserSubmitterId=' + this.sue_1.toString() + ', activeUserPersonName=' + this.tue_1 + ', activeUserPictureUri=' + this.uue_1 + ', localDateTimeNow=' + this.vue_1 + ', dayOfWeekStrings=' + this.wue_1 + ', collapsedSubmissions=' + this.xue_1 + ', openingFileState=' + this.yue_1 + ', showModerateOptions=' + this.zue_1 + ')';
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).hashCode = function () {
    var result = this.due_1 == null ? 0 : getStringHashCode(this.due_1);
    result = imul(result, 31) + (this.eue_1 == null ? 0 : this.eue_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.fue_1) | 0;
    result = imul(result, 31) + hashCode(this.gue_1) | 0;
    result = imul(result, 31) + hashCode(this.hue_1) | 0;
    result = imul(result, 31) + hashCode(this.iue_1) | 0;
    result = imul(result, 31) + (this.jue_1 == null ? 0 : hashCode(this.jue_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kue_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lue_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mue_1) | 0;
    result = imul(result, 31) + this.nue_1 | 0;
    result = imul(result, 31) + hashCode(this.oue_1) | 0;
    result = imul(result, 31) + hashCode(this.pue_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.que_1) | 0;
    result = imul(result, 31) + this.rue_1.hashCode() | 0;
    result = imul(result, 31) + this.sue_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.tue_1) | 0;
    result = imul(result, 31) + (this.uue_1 == null ? 0 : getStringHashCode(this.uue_1)) | 0;
    result = imul(result, 31) + this.vue_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.wue_1) | 0;
    result = imul(result, 31) + hashCode(this.xue_1) | 0;
    result = imul(result, 31) + (this.yue_1 == null ? 0 : this.yue_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zue_1) | 0;
    return result;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentSubmitterDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentSubmitterDetailUiState ? other : THROW_CCE();
    if (!(this.due_1 == tmp0_other_with_cast.due_1))
      return false;
    if (!equals(this.eue_1, tmp0_other_with_cast.eue_1))
      return false;
    if (!equals(this.fue_1, tmp0_other_with_cast.fue_1))
      return false;
    if (!equals(this.gue_1, tmp0_other_with_cast.gue_1))
      return false;
    if (!equals(this.hue_1, tmp0_other_with_cast.hue_1))
      return false;
    if (!equals(this.iue_1, tmp0_other_with_cast.iue_1))
      return false;
    if (!equals(this.jue_1, tmp0_other_with_cast.jue_1))
      return false;
    if (!(this.kue_1 === tmp0_other_with_cast.kue_1))
      return false;
    if (!(this.lue_1 === tmp0_other_with_cast.lue_1))
      return false;
    if (!(this.mue_1 === tmp0_other_with_cast.mue_1))
      return false;
    if (!(this.nue_1 === tmp0_other_with_cast.nue_1))
      return false;
    if (!equals(this.oue_1, tmp0_other_with_cast.oue_1))
      return false;
    if (!equals(this.pue_1, tmp0_other_with_cast.pue_1))
      return false;
    if (!(this.que_1 === tmp0_other_with_cast.que_1))
      return false;
    if (!this.rue_1.equals(tmp0_other_with_cast.rue_1))
      return false;
    if (!this.sue_1.equals(tmp0_other_with_cast.sue_1))
      return false;
    if (!(this.tue_1 === tmp0_other_with_cast.tue_1))
      return false;
    if (!(this.uue_1 == tmp0_other_with_cast.uue_1))
      return false;
    if (!this.vue_1.equals(tmp0_other_with_cast.vue_1))
      return false;
    if (!equals(this.wue_1, tmp0_other_with_cast.wue_1))
      return false;
    if (!equals(this.xue_1, tmp0_other_with_cast.xue_1))
      return false;
    if (!equals(this.yue_1, tmp0_other_with_cast.yue_1))
      return false;
    if (!(this.zue_1 === tmp0_other_with_cast.zue_1))
      return false;
    return true;
  };
  function assignmentSubmitterNameUseCase$factory() {
    return getPropertyCallableRef('assignmentSubmitterNameUseCase', 1, KProperty1, function (receiver) {
      return _get_assignmentSubmitterNameUseCase__ts4wyt(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_1() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_0(receiver);
    }, null);
  }
  function submitMarkUseCase$factory() {
    return getPropertyCallableRef('submitMarkUseCase', 1, KProperty1, function (receiver) {
      return _get_submitMarkUseCase__y8b5kx(receiver);
    }, null);
  }
  function assignmentSubmitterNameUseCase$factory_0() {
    return getPropertyCallableRef('assignmentSubmitterNameUseCase', 1, KProperty1, function (receiver) {
      return _get_assignmentSubmitterNameUseCase__ts4wyt(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_2() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_0(receiver);
    }, null);
  }
  function submitMarkUseCase$factory_0() {
    return getPropertyCallableRef('submitMarkUseCase', 1, KProperty1, function (receiver) {
      return _get_submitMarkUseCase__y8b5kx(receiver);
    }, null);
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.vqv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.fun(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.oun_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).qun = function (nameAndTerminology, $completion) {
    var tmp = this.run(nameAndTerminology, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qun((p1 == null ? true : p1 instanceof ClazzNameAndTerminology) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp1_currentTerminologyStrings = this.oun_1.vqv_1.t2().cun_1;
          var tmp0_safe_receiver = this.pun_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u8l_1;
          var tmp3_json = this.oun_1.m4r();
          var tmp4_systemImpl = this.oun_1.aqo();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this.oun_1));
          l$ret$1: do {
            var this_0 = this.oun_1.eqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver_0 = this.pun_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.t8l_1;
              var nextValue = prevValue.mq6(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).run = function (nameAndTerminology, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this.oun_1, completion);
    i.pun_1 = nameAndTerminology;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (nameAndTerminology, $completion) {
      return i.qun(nameAndTerminology, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.auo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).mt7 = function (it, $completion) {
    var tmp = this.nt7(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.mt7(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.auo_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.fun(VOID, VOID, VOID, VOID, this.buo_1.hdn_1, this.buo_1.idn_1, this.buo_1.idn_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).nt7 = function (it, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this.auo_1, completion);
    i.buo_1 = it;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mt7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.kuo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.kuo_1.wqn().o7d().a8d(this.kuo_1.oup_1);
            var tmp_1 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this.kuo_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda(this.kuo_1, completion);
    i.luo_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.buq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.buq_1.uqn().o7f();
            var tmp_1 = this.buq_1.sqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.buq_1.oup_1, tmp_2, new Long(8, 0)));
            var tmp_4 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this.buq_1, null);
            suspendResult = tmp_3.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda_1(this.buq_1, completion);
    i.cuq_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda(this$0, $this_launch, resultContinuation) {
    this.luq_1 = this$0;
    this.muq_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.luq_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.fun(VOID, VOID, VOID, this.luq_1.rup_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          launch(this.muq_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_0(this.luq_1, null));
          launch(this.muq_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_2(this.luq_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).l78 = function (completion) {
    return new ClazzMemberListViewModel$slambda$slambda(this.luq_1, this.muq_1, completion);
  };
  function ClazzMemberListViewModel$slambda$slambda_0(this$0, $this_launch, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda(this$0, $this_launch, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this$0, resultContinuation) {
    this.vuq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).jrh = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).he = function (p1, $completion) {
    return this.jrh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.wuq_1.o7d().s8c(this.vuq_1.oup_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_safe_receiver = suspendResult;
            return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o8e_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).yny = function (it, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this.vuq_1, completion);
    i.wuq_1 = it;
    return i;
  };
  function ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.jrh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_sendClazzInvitesUseCase__utu0z8_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mup_1;
    sendClazzInvitesUseCase$factory_2();
    return this_0.t2();
  }
  function _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nup_1;
    approveOrDeclinePendingEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function getMembersAsPagingSource($this, roleId) {
    var tmp0_$this = $this.wqn().t7d();
    var tmp1_clazzUid = $this.oup_1;
    var tmp2_sortOrder = $this.vqv_1.t2().yum_1.tqc_1;
    var tmp3_filter = $this.vqv_1.t2().aun_1;
    var tmp4_searchText = toQueryLikeParam($this.eqn_1.t2().eq6_1.tq5_1);
    var tmp5_accountPersonUid = $this.sqn();
    var tmp6_currentTime = systemTimeInMillis();
    PermissionFlags_getInstance();
    var tmp7_permission = new Long(8192, 0);
    return tmp0_$this.j93(tmp1_clazzUid, roleId, tmp2_sortOrder, tmp4_searchText, tmp3_filter, tmp5_accountPersonUid, tmp6_currentTime, tmp7_permission);
  }
  function Companion_137() {
    this.xuq_1 = 'CourseMembers';
  }
  var Companion_instance_186;
  function Companion_getInstance_154() {
    return Companion_instance_186;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_19(function_0) {
    this.yuq_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_19).t1d = function (value, $completion) {
    return this.yuq_1(value, $completion);
  };
  function ClazzMemberListViewModel$teacherListPagingSource$lambda(this$0) {
    return function () {
      return getMembersAsPagingSource(this$0, 1001);
    };
  }
  function ClazzMemberListViewModel$studentListPagingSource$lambda(this$0) {
    return function () {
      return getMembersAsPagingSource(this$0, 1000);
    };
  }
  function ClazzMemberListViewModel$pendingInvitesPagingSource$lambda(this$0) {
    return function () {
      return this$0.wqn().e7g().m9m(this$0.qqn().uo9().nnu_1.wij_1, this$0.oup_1, systemTimeInMillis());
    };
  }
  function ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this$0) {
    return function () {
      var tmp0_$this = this$0.wqn().n7f();
      var tmp1_clazzUid = this$0.oup_1;
      var tmp2_searchText = toQueryLikeParam(this$0.eqn_1.t2().eq6_1.tq5_1);
      var tmp4_sortOrder = this$0.vqv_1.t2().yum_1.tqc_1;
      return tmp0_$this.vex(tmp1_clazzUid, false, 1, tmp2_searchText, tmp4_sortOrder);
    };
  }
  function ClazzMemberListViewModel$slambda(this$0, resultContinuation) {
    this.hur_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.hur_1.vqv_1, ClazzMemberListViewModel$slambda$slambda_0(this.hur_1, this.iur_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda(this.hur_1, completion);
    i.iur_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this$0, $enrolmentDetails, $approved, resultContinuation) {
    this.rur_1 = this$0;
    this.sur_1 = $enrolmentDetails;
    this.tur_1 = $approved;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(this.rur_1).gp0(this.sur_1, this.tur_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this.rur_1.yqn();
            var tmp_1 = this.rur_1.aqo();
            var tmp_2 = this.tur_1 ? strings_getInstance().jnn_1 : strings_getInstance().knn_1;
            var tmp0_elvis_lhs = this.sur_1.oey_1;
            tmp_0.bq7(new Snack(tmp_1.noj(tmp_2, [tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs])));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              var e = this.kd_1;
              var tmp_4 = this.rur_1.yqn();
              var tmp_5 = this.rur_1.aqo().moj(strings_getInstance().qmi_1);
              var tmp1_elvis_lhs = e.message;
              tmp_4.bq7(new Snack(tmp_5 + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this.rur_1, this.sur_1, this.tur_1, completion);
    i.uur_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this$0, $enrolmentDetails, $approved, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this$0, $enrolmentDetails, $approved, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickAddNewMember$slambda(this$0, $role, resultContinuation) {
    this.dus_1 = this$0;
    this.eus_1 = $role;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.dus_1.vqn();
            var tmp_1;
            if (this.eus_1 === 1000) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.gus_1 = tmp_1;
            if (this.gus_1 == null) {
              this.hus_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = localFirstThenRepoIfNull(this.gus_1, ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda_0(this.dus_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hus_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var clazzCode = this.hus_1;
            var tmp_2;
            if (this.eus_1 === 1000) {
              tmp_2 = strings_getInstance().tml_1;
            } else {
              tmp_2 = strings_getInstance().smy_1;
            }

            var titleStringResource = tmp_2;
            var tmp1_safe_receiver = this.dus_1.vqv_1.t2().cun_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.oq8(titleStringResource);
            var title = tmp2_elvis_lhs == null ? this.dus_1.aqo().moj(titleStringResource) : tmp2_elvis_lhs;
            Companion_getInstance_116();
            var tmp_3 = to('clazzUid', this.dus_1.oup_1.toString());
            Companion_getInstance_116();
            var tmp_4 = to('popUpToOnFinish', this.dus_1.bqn_1);
            var goToOnPersonSelectedArg = appendQueryArgs('EnrolmentEdit', mapOf([tmp_3, tmp_4, to('role', this.eus_1.toString())]));
            var this_1 = LinkedHashMap_init_$Create$();
            Companion_getInstance_204();
            this_1.s('exlcudeFromClazz', this.dus_1.oup_1.toString());
            Companion_getInstance_116();
            this_1.s('listMode', ListViewMode_PICKER_getInstance().zqj_1);
            this_1.s('goToOnPersonSelected', goToOnPersonSelectedArg);
            Companion_getInstance_204();
            this_1.s('showAddViaContact', 'true');
            Companion_getInstance_204();
            this_1.s('role', this.eus_1.toString());
            Companion_getInstance_125();
            this_1.s('t', title);
            Companion_getInstance_204();
            PermissionFlags_getInstance();
            this_1.s('rptsl', (new Long(2048, 0)).toString());
            if (!(clazzCode == null)) {
              Companion_getInstance_204();
              this_1.s('showAddViaInviteLink', clazzCode);
            }

            var args = this_1.f3();
            Companion_getInstance_204();
            this.dus_1.cqn_1.rp6('People', args);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda(this.dus_1, this.eus_1, completion);
    i.fus_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this$0, $role, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda(this$0, $role, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickRevokeInvite$slambda(this$0, $contact, resultContinuation) {
    this.qus_1 = this$0;
    this.rus_1 = $contact;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.qus_1.wqn().e7g().n9m(this.rus_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickRevokeInvite$slambda(this.qus_1, this.rus_1, completion);
    i.sus_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickRevokeInvite$slambda_0(this$0, $contact, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickRevokeInvite$slambda(this$0, $contact, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickResendInvite$slambda(this$0, $clazzInvite, resultContinuation) {
    this.but_1 = this$0;
    this.cut_1 = $clazzInvite;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickResendInvite$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickResendInvite$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickResendInvite$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_sendClazzInvitesUseCase__utu0z8_0(this.but_1).qph(new SendClazzInvitesRequest(listOf_0(this.cut_1.h9n_1), this.cut_1.f9n_1, this.cut_1.e9n_1, this.but_1.qqn().uo9().onu_1.f96_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.but_1.yqn().bq7(new Snack(this.but_1.aqo().moj(strings_getInstance().ins_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickResendInvite$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickResendInvite$slambda(this.but_1, this.cut_1, completion);
    i.dut_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickResendInvite$slambda_0(this$0, $clazzInvite, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickResendInvite$slambda(this$0, $clazzInvite, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel(di, savedStateHandle) {
    var tmp = new ClazzMemberListUiState();
    UstadListViewModel.call(this, di, savedStateHandle, tmp, 'Course');
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(SendClazzInvitesUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.mup_1 = Instance(this_0, tmp$ret$0, null).a5d(this, sendClazzInvitesUseCase$factory_1());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.qqn().loa();
    var trigger = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_3 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.h57(tmp$ret$2, context);
    var this_1 = On(this, tmp$ret$3, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(IApproveOrDeclinePendingEnrolmentRequestUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_2.nup_1 = Instance(this_1, tmp$ret$5, null).a5d(this, approveOrDeclinePendingEnrolmentUseCase$factory());
    var tmp_6 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_7;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_7 = tmp1_elvis_lhs;
    }
    tmp_6.oup_1 = tmp_7;
    var tmp_8 = this;
    tmp_8.pup_1 = ClazzMemberListViewModel$teacherListPagingSource$lambda(this);
    var tmp_9 = this;
    tmp_9.qup_1 = ClazzMemberListViewModel$studentListPagingSource$lambda(this);
    var tmp_10 = this;
    tmp_10.rup_1 = ClazzMemberListViewModel$pendingInvitesPagingSource$lambda(this);
    var tmp_11 = this;
    tmp_11.sup_1 = ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.vqv_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_3 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_3.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_3.length;
        while (inductionVariable < last) {
          var element = this_3[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$7 = this.aqo().moj(get_dayStringResource(element));
          result.s(element, tmp$ret$7);
        }
        var nextValue = prevValue.fun(this.qup_1, this.pup_1, this.sup_1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, VOID, true, VOID, VOID, VOID, this.eqx(), new ActionBarButtonUiState(false));
        if (this_4.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_12 = this.rqn();
    launch(tmp_12, VOID, VOID, ClazzMemberListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzMemberListViewModel).pqw = function (searchText) {
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).qqw = function () {
  };
  protoOf(ClazzMemberListViewModel).osz = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.fun(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, filterOption.pq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).eut = function (enrolmentDetails, approved) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this, enrolmentDetails, approved, null));
  };
  protoOf(ClazzMemberListViewModel).fut = function (role) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this, role, null));
  };
  protoOf(ClazzMemberListViewModel).gut = function (entry) {
    Companion_getInstance_116();
    var tmp0_safe_receiver = entry.a96_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
    var tmp = to('personUid', (tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs).toString());
    Companion_getInstance_116();
    this.cqn_1.rp6('CourseEnrolments', mapOf([tmp, to('clazzUid', this.oup_1.toString())]));
  };
  protoOf(ClazzMemberListViewModel).nsz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.fun(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).hut = function (contact) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRevokeInvite$slambda_0(this, contact, null));
  };
  protoOf(ClazzMemberListViewModel).iut = function (clazzInvite) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickResendInvite$slambda_0(this, clazzInvite, null));
  };
  function ClazzMemberListUiState$_init_$lambda_dc27oi() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_0() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_1() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_2() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (studentList === VOID) {
      tmp = ClazzMemberListUiState$_init_$lambda_dc27oi;
    } else {
      tmp = studentList;
    }
    studentList = tmp;
    var tmp_0;
    if (teacherList === VOID) {
      tmp_0 = ClazzMemberListUiState$_init_$lambda_dc27oi_0;
    } else {
      tmp_0 = teacherList;
    }
    teacherList = tmp_0;
    var tmp_1;
    if (pendingStudentList === VOID) {
      tmp_1 = ClazzMemberListUiState$_init_$lambda_dc27oi_1;
    } else {
      tmp_1 = pendingStudentList;
    }
    pendingStudentList = tmp_1;
    var tmp_2;
    if (pendingInviteList === VOID) {
      tmp_2 = ClazzMemberListUiState$_init_$lambda_dc27oi_2;
    } else {
      tmp_2 = pendingInviteList;
    }
    pendingInviteList = tmp_2;
    addTeacherVisible = addTeacherVisible === VOID ? false : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? false : addStudentVisible;
    pendingInviteListVisible = pendingInviteListVisible === VOID ? false : pendingInviteListVisible;
    var tmp_3;
    if (sortOptions === VOID) {
      var tmp_4 = strings_getInstance().cmk_1;
      var tmp_5 = new SortOrderOption(tmp_4, 1, true);
      var tmp_6 = strings_getInstance().cmk_1;
      var tmp_7 = new SortOrderOption(tmp_6, 2, false);
      var tmp_8 = strings_getInstance().bmk_1;
      var tmp_9 = new SortOrderOption(tmp_8, 3, true);
      var tmp_10 = strings_getInstance().bmk_1;
      var tmp_11 = new SortOrderOption(tmp_10, 4, false);
      var tmp_12 = strings_getInstance().mmx_1;
      var tmp_13 = new SortOrderOption(tmp_12, 7, true);
      var tmp_14 = strings_getInstance().mmx_1;
      var tmp_15 = new SortOrderOption(tmp_14, 8, false);
      var tmp_16 = strings_getInstance().nmx_1;
      var tmp_17 = new SortOrderOption(tmp_16, 9, true);
      var tmp_18 = strings_getInstance().nmx_1;
      tmp_3 = listOf([tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, new SortOrderOption(tmp_18, 10, false)]);
    } else {
      tmp_3 = sortOptions;
    }
    sortOptions = tmp_3;
    activeSortOrderOption = activeSortOrderOption === VOID ? first_0(sortOptions) : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_19;
    if (selectedChipId === VOID) {
      tmp_19 = 1;
    } else {
      tmp_19 = selectedChipId;
    }
    selectedChipId = tmp_19;
    var tmp_20;
    if (filterOptions === VOID) {
      var tmp_21 = strings_getInstance().dn0_1;
      tmp_20 = listOf([new MessageIdOption2(tmp_21, 1), new MessageIdOption2(strings_getInstance().wmz_1, 0)]);
    } else {
      tmp_20 = filterOptions;
    }
    filterOptions = tmp_20;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.qum_1 = studentList;
    this.rum_1 = teacherList;
    this.sum_1 = pendingStudentList;
    this.tum_1 = pendingInviteList;
    this.uum_1 = addTeacherVisible;
    this.vum_1 = addStudentVisible;
    this.wum_1 = pendingInviteListVisible;
    this.xum_1 = sortOptions;
    this.yum_1 = activeSortOrderOption;
    this.zum_1 = fieldsEnabled;
    this.aun_1 = selectedChipId;
    this.bun_1 = filterOptions;
    this.cun_1 = terminologyStrings;
    this.dun_1 = localDateTimeNow;
    this.eun_1 = dayOfWeekStrings;
  }
  protoOf(ClazzMemberListUiState).jut = function (studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) {
    return new ClazzMemberListUiState(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).fun = function (studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings, $super) {
    studentList = studentList === VOID ? this.qum_1 : studentList;
    teacherList = teacherList === VOID ? this.rum_1 : teacherList;
    pendingStudentList = pendingStudentList === VOID ? this.sum_1 : pendingStudentList;
    pendingInviteList = pendingInviteList === VOID ? this.tum_1 : pendingInviteList;
    addTeacherVisible = addTeacherVisible === VOID ? this.uum_1 : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? this.vum_1 : addStudentVisible;
    pendingInviteListVisible = pendingInviteListVisible === VOID ? this.wum_1 : pendingInviteListVisible;
    sortOptions = sortOptions === VOID ? this.xum_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.yum_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.zum_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.aun_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.bun_1 : filterOptions;
    terminologyStrings = terminologyStrings === VOID ? this.cun_1 : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.dun_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.eun_1 : dayOfWeekStrings;
    return $super === VOID ? this.jut(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) : $super.jut.call(this, studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).toString = function () {
    return 'ClazzMemberListUiState(studentList=' + this.qum_1 + ', teacherList=' + this.rum_1 + ', pendingStudentList=' + this.sum_1 + ', pendingInviteList=' + this.tum_1 + ', addTeacherVisible=' + this.uum_1 + ', addStudentVisible=' + this.vum_1 + ', pendingInviteListVisible=' + this.wum_1 + ', sortOptions=' + this.xum_1 + ', activeSortOrderOption=' + this.yum_1 + ', fieldsEnabled=' + this.zum_1 + ', selectedChipId=' + this.aun_1 + ', filterOptions=' + this.bun_1 + ', terminologyStrings=' + this.cun_1 + ', localDateTimeNow=' + this.dun_1 + ', dayOfWeekStrings=' + this.eun_1 + ')';
  };
  protoOf(ClazzMemberListUiState).hashCode = function () {
    var result = hashCode(this.qum_1);
    result = imul(result, 31) + hashCode(this.rum_1) | 0;
    result = imul(result, 31) + hashCode(this.sum_1) | 0;
    result = imul(result, 31) + hashCode(this.tum_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uum_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vum_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wum_1) | 0;
    result = imul(result, 31) + hashCode(this.xum_1) | 0;
    result = imul(result, 31) + this.yum_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zum_1) | 0;
    result = imul(result, 31) + this.aun_1 | 0;
    result = imul(result, 31) + hashCode(this.bun_1) | 0;
    result = imul(result, 31) + (this.cun_1 == null ? 0 : this.cun_1.hashCode()) | 0;
    result = imul(result, 31) + this.dun_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.eun_1) | 0;
    return result;
  };
  protoOf(ClazzMemberListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzMemberListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzMemberListUiState ? other : THROW_CCE();
    if (!equals(this.qum_1, tmp0_other_with_cast.qum_1))
      return false;
    if (!equals(this.rum_1, tmp0_other_with_cast.rum_1))
      return false;
    if (!equals(this.sum_1, tmp0_other_with_cast.sum_1))
      return false;
    if (!equals(this.tum_1, tmp0_other_with_cast.tum_1))
      return false;
    if (!(this.uum_1 === tmp0_other_with_cast.uum_1))
      return false;
    if (!(this.vum_1 === tmp0_other_with_cast.vum_1))
      return false;
    if (!(this.wum_1 === tmp0_other_with_cast.wum_1))
      return false;
    if (!equals(this.xum_1, tmp0_other_with_cast.xum_1))
      return false;
    if (!this.yum_1.equals(tmp0_other_with_cast.yum_1))
      return false;
    if (!(this.zum_1 === tmp0_other_with_cast.zum_1))
      return false;
    if (!(this.aun_1 === tmp0_other_with_cast.aun_1))
      return false;
    if (!equals(this.bun_1, tmp0_other_with_cast.bun_1))
      return false;
    if (!equals(this.cun_1, tmp0_other_with_cast.cun_1))
      return false;
    if (!this.dun_1.equals(tmp0_other_with_cast.dun_1))
      return false;
    if (!equals(this.eun_1, tmp0_other_with_cast.eun_1))
      return false;
    return true;
  };
  function sendClazzInvitesUseCase$factory_1() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8_0(receiver);
    }, null);
  }
  function approveOrDeclinePendingEnrolmentUseCase$factory() {
    return getPropertyCallableRef('approveOrDeclinePendingEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(receiver);
    }, null);
  }
  function sendClazzInvitesUseCase$factory_2() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8_0(receiver);
    }, null);
  }
  function approveOrDeclinePendingEnrolmentUseCase$factory_0() {
    return getPropertyCallableRef('approveOrDeclinePendingEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(receiver);
    }, null);
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.sut_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).wut = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.wut(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.tut_1.t7d();
            var tmp_1;
            if (!this.sut_1.iqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.uut_1 = tmp_1;
            if (this.uut_1 == null) {
              this.vut_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.uut_1.f93(this.sut_1.iqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.vut_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.vut_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).yny = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this.sut_1, completion);
    i.tut_1 = db;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.wut(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.fuu_1 = $savedStateHandle;
    this.guu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).juu = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.juu($completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.huu_1 = new ClazzEnrolmentWithLeavingReason();
            var tmp_1 = this;
            tmp_1.iuu_1 = this.huu_1;
            var tmp_2 = this.iuu_1;
            Companion_getInstance_116();
            var tmp0_safe_receiver = this.fuu_1.ba('clazzUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_3;
            if (tmp1_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('No clazzUid for enrolment!');
            } else {
              tmp_3 = tmp1_elvis_lhs;
            }

            tmp_2.d8i_1 = tmp_3;
            var tmp_4 = this.iuu_1;
            Companion_getInstance_116();
            var tmp2_safe_receiver = this.fuu_1.ba('personUid');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            var tmp_5;
            if (tmp3_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('No personuid for enrolment!');
            } else {
              tmp_5 = tmp3_elvis_lhs;
            }

            tmp_4.c8i_1 = tmp_5;
            this.iuu_1.e8i_1 = systemTimeInMillis();
            var tmp_6 = this.iuu_1;
            var tmp4_safe_receiver = this.fuu_1.ba('role');
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toInt(tmp4_safe_receiver);
            var tmp_7;
            if (tmp5_elvis_lhs == null) {
              tmp_7 = 1000;
            } else {
              tmp_7 = tmp5_elvis_lhs;
            }

            tmp_6.g8i_1 = tmp_7;
            this.hd_1 = 1;
            suspendResult = this.guu_1.wqn().o7d().c8d(this.iuu_1.d8i_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp6_elvis_lhs = suspendResult;
            var tmp_8;
            if (tmp6_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Could not find timezone for clazzUid');
            } else {
              tmp_8 = tmp6_elvis_lhs;
            }

            var ARGUMENT = tmp_8;
            this.iuu_1.s94_1 = ARGUMENT;
            return this.huu_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ClazzEnrolmentEditViewModel$slambda$slambda_1(this.fuu_1, this.guu_1, completion);
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($completion) {
      return i.juu($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.huv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ruv(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.auw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).cuw = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.cuw((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.auw_1.wqn().q7d();
            var tmp0_safe_receiver = this.auw_1.huv_1.t2().kuv_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d8i_1;
            suspendResult = tmp_0.ee7(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).v1m = function ($this$async, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_3(this.auw_1, completion);
    i.buw_1 = $this$async;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.cuw($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function _get_enrolIntoCourseUseCase__jh2n4b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.juv_1;
    enrolIntoCourseUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_1(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.luv_1 == null) ? true : !(_this__u8e3s4.muv_1 == null)) ? true : !(_this__u8e3s4.nuv_1 == null);
  }
  function Companion_138() {
    this.duw_1 = 'EnrolmentEdit';
    this.euw_1 = 'role';
  }
  var Companion_instance_187;
  function Companion_getInstance_155() {
    return Companion_instance_187;
  }
  function ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation) {
    this.nuw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda).msc = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.ouw_1.o7f().edk(this.nuw_1.sqn(), this.nuw_1.iqt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).yny = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this.nuw_1, completion);
    i.ouw_1 = db;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.msc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.xuw_1 = this$0;
    this.yuw_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_35.n4r();
            var tmp_1 = ClazzEnrolmentEditViewModel$slambda$slambda_0(this.xuw_1, null);
            var tmp_2 = ClazzEnrolmentEditViewModel$slambda$slambda_2(this.yuw_1, this.xuw_1, null);
            suspendResult = this.xuw_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEnrolmentEditViewModel$slambda$lambda(this.xuw_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = this.xuw_1.uqn().o7f();
            var tmp_4 = this.xuw_1.sqn();
            var tmp0_safe_receiver = this.xuw_1.huv_1.t2().kuv_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d8i_1;
            var tmp_5 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            PermissionFlags_getInstance();
            var tmp_6 = new Long(8, 0);
            PermissionFlags_getInstance();
            suspendResult = tmp_3.hdk(tmp_4, tmp_5, tmp_6, new Long(16, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.aux_1 = suspendResult;
            this.bux_1 = this.aux_1.y6();
            this.cux_1 = this.aux_1.z6();
            var tmp_7 = this;
            tmp_7.dux_1 = async(this.zuw_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda$slambda_4(this.xuw_1, null));
            var tmp_8 = this;
            var this_0 = ArrayList_init_$Create$();
            if (this.bux_1) {
              this_0.i1(1000);
            }

            if (this.cux_1) {
              this_0.i1(1001);
            }

            tmp_8.eux_1 = this_0.f3();
            this.hd_1 = 3;
            suspendResult = this.dux_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp3_safe_receiver = suspendResult;
            var tmp_9;
            if (tmp3_safe_receiver == null) {
              tmp_9 = null;
            } else {
              tmp_9 = CourseTerminologyStrings_init_$Create$(tmp3_safe_receiver, this.xuw_1.aqo(), this.xuw_1.m4r());
            }

            var terminologyStrings = tmp_9;
            l$ret$1: do {
              var this_1 = this.xuw_1.huv_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.ruv(VOID, VOID, VOID, VOID, true, terminologyStrings, this.eux_1);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_2 = this.xuw_1.eqn_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp_10 = Companion_getInstance_97().uq6_1;
                var tmp_11 = this.xuw_1.aqo().moj(strings_getInstance().en3_1);
                var nextValue_0 = prevValue_0.mq6(VOID, tmp_10, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_11, VOID, ClazzEnrolmentEditViewModel$onClickSave$ref(this.xuw_1)));
                if (this_2.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda_1(this.xuw_1, this.yuw_1, completion);
    i.zuw_1 = $this$launchIfHasPermission;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.nux_1 = $commitDelay;
    this.oux_1 = $entity;
    this.pux_1 = $this;
    this.qux_1 = $key;
    this.rux_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.nux_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.oux_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.pux_1.gqo(this.pux_1.aqn_1, this.qux_1, this.rux_1, this.oux_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentEditViewModel$onEntityChanged$slambda(this.nux_1, this.oux_1, this.pux_1, this.qux_1, this.rux_1, completion);
    i.sux_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$slambda(this$0, $entity, $timeZoneVal, resultContinuation) {
    this.buy_1 = this$0;
    this.cuy_1 = $entity;
    this.duy_1 = $timeZoneVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (this.buy_1.iqt_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_enrolIntoCourseUseCase__jh2n4b(this.buy_1).soz(this.cuy_1, this.duy_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.buy_1.uqn().t7d().g93(this.cuy_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            Companion_getInstance_116();
            var popUpToOnFinish = this.buy_1.aqn_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.buy_1.cqn_1.mq9(popUpToOnFinish, false);
            } else {
              this.buy_1.lqt(this.cuy_1);
            }

            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentEditViewModel$onClickSave$slambda(this.buy_1, this.cuy_1, this.duy_1, completion);
    i.euy_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentEditViewModel$onClickSave$slambda_0(this$0, $entity, $timeZoneVal, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$onClickSave$slambda(this$0, $entity, $timeZoneVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'EnrolmentEdit');
    this.huv_1 = MutableStateFlow(new ClazzEnrolmentEditUiState(VOID, VOID, VOID, VOID, false));
    this.iuv_1 = asStateFlow(this.huv_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.juv_1 = Instance(this_0, tmp$ret$0, null).a5d(this, enrolIntoCourseUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, Companion_getInstance_97().tq6_1, this.kqu(strings_getInstance().wmx_1, strings_getInstance().vmx_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzEnrolmentEditViewModel$slambda_0(this, null);
    this.mqo(tmp_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ClazzEnrolmentEditViewModel).fuy = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.huv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.kuv_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g8i_1;
        var tmp_0 = this.lqu(tmp, entity == null ? null : entity.g8i_1, prevValue.luv_1);
        var tmp2_safe_receiver = prevValue.kuv_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.e8i_1;
        var nextValue = prevValue.ruv(entity, tmp_0, this.lqu(tmp_1, entity == null ? null : entity.e8i_1, prevValue.muv_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_35.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.rqn();
    tmp_2.hqt_1 = launch(tmp_3, VOID, VOID, ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEnrolmentEditViewModel).asa = function () {
    if (this.dqo().equals(Companion_getInstance_97().tq6_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.huv_1.t2().kuv_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    var timeZoneVal = entity.s94_1;
    if (timeZoneVal == null) {
      this.yqn().bq7(new Snack('Error: no time zone for course'));
      return Unit_instance;
    }
    this.cqo(Companion_getInstance_97().tq6_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.huv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.ruv(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (entity.g8i_1 === 0) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.huv_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.ruv(VOID, this.aqo().moj(strings_getInstance().vmn_1));
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    if (entity.e8i_1.c7(toLong(imul(get_MS_PER_HOUR(), 24))) <= 0) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.huv_1;
        while (true) {
          var prevValue_1 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_1 = prevValue_1.ruv(VOID, VOID, this.aqo().moj(strings_getInstance().vmn_1));
          if (this_2.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (entity.f8i_1.c7(entity.e8i_1) <= 0) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.huv_1;
        while (true) {
          var prevValue_2 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_2 = prevValue_2.ruv(VOID, VOID, VOID, this.aqo().moj(strings_getInstance().pn9_1));
          if (this_3.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
    }
    if (hasErrors_1(this.huv_1.t2(), this)) {
      $l$block_3: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.huv_1;
        while (true) {
          var prevValue_3 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_3 = prevValue_3.ruv(VOID, VOID, VOID, VOID, true);
          if (this_4.y1k(prevValue_3, nextValue_3)) {
            break $l$block_3;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, ClazzEnrolmentEditViewModel$onClickSave$slambda_0(this, entity, timeZoneVal, null));
  };
  function ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    clazzEnrolment = clazzEnrolment === VOID ? null : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? null : roleSelectedError;
    startDateError = startDateError === VOID ? null : startDateError;
    endDateError = endDateError === VOID ? null : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    var tmp;
    if (roleOptions === VOID) {
      tmp = listOf([1000, 1001]);
    } else {
      tmp = roleOptions;
    }
    roleOptions = tmp;
    this.kuv_1 = clazzEnrolment;
    this.luv_1 = roleSelectedError;
    this.muv_1 = startDateError;
    this.nuv_1 = endDateError;
    this.ouv_1 = fieldsEnabled;
    this.puv_1 = courseTerminology;
    this.quv_1 = roleOptions;
  }
  protoOf(ClazzEnrolmentEditUiState).guy = function () {
    var tmp0_safe_receiver = this.kuv_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g8i_1;
    return tmp === 1000;
  };
  protoOf(ClazzEnrolmentEditUiState).huy = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    return new ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).ruv = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions, $super) {
    clazzEnrolment = clazzEnrolment === VOID ? this.kuv_1 : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? this.luv_1 : roleSelectedError;
    startDateError = startDateError === VOID ? this.muv_1 : startDateError;
    endDateError = endDateError === VOID ? this.nuv_1 : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? this.ouv_1 : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? this.puv_1 : courseTerminology;
    roleOptions = roleOptions === VOID ? this.quv_1 : roleOptions;
    return $super === VOID ? this.huy(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) : $super.huy.call(this, clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).toString = function () {
    return 'ClazzEnrolmentEditUiState(clazzEnrolment=' + this.kuv_1 + ', roleSelectedError=' + this.luv_1 + ', startDateError=' + this.muv_1 + ', endDateError=' + this.nuv_1 + ', fieldsEnabled=' + this.ouv_1 + ', courseTerminology=' + this.puv_1 + ', roleOptions=' + this.quv_1 + ')';
  };
  protoOf(ClazzEnrolmentEditUiState).hashCode = function () {
    var result = this.kuv_1 == null ? 0 : hashCode(this.kuv_1);
    result = imul(result, 31) + (this.luv_1 == null ? 0 : getStringHashCode(this.luv_1)) | 0;
    result = imul(result, 31) + (this.muv_1 == null ? 0 : getStringHashCode(this.muv_1)) | 0;
    result = imul(result, 31) + (this.nuv_1 == null ? 0 : getStringHashCode(this.nuv_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ouv_1) | 0;
    result = imul(result, 31) + (this.puv_1 == null ? 0 : this.puv_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.quv_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentEditUiState ? other : THROW_CCE();
    if (!equals(this.kuv_1, tmp0_other_with_cast.kuv_1))
      return false;
    if (!(this.luv_1 == tmp0_other_with_cast.luv_1))
      return false;
    if (!(this.muv_1 == tmp0_other_with_cast.muv_1))
      return false;
    if (!(this.nuv_1 == tmp0_other_with_cast.nuv_1))
      return false;
    if (!(this.ouv_1 === tmp0_other_with_cast.ouv_1))
      return false;
    if (!equals(this.puv_1, tmp0_other_with_cast.puv_1))
      return false;
    if (!equals(this.quv_1, tmp0_other_with_cast.quv_1))
      return false;
    return true;
  };
  function enrolIntoCourseUseCase$factory() {
    return getPropertyCallableRef('enrolIntoCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_enrolIntoCourseUseCase__jh2n4b(receiver);
    }, null);
  }
  function enrolIntoCourseUseCase$factory_0() {
    return getPropertyCallableRef('enrolIntoCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_enrolIntoCourseUseCase__jh2n4b(receiver);
    }, null);
  }
  function ClazzEnrolmentListViewModel$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.quy_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).urm = function (value, $completion) {
    var tmp = this.vrm(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.urm(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.suy_1 = this.quy_1;
            var tmp_1 = this;
            tmp_1.tuy_1 = this.ruy_1;
            this.hd_1 = 1;
            var it = this.tuy_1;
            suspendResult = this.suy_1.t1d(it.zdn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).vrm = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda(this.quy_1, completion);
    i.ruy_1 = value;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.urm(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$71(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.cuz_1 = _this__u8e3s4;
    this.duz_1 = collector;
  }
  protoOf($collectCOROUTINE$71).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.euz_1 = this.duz_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0(this.euz_1, null);
            suspendResult = this.cuz_1.fuz_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ouz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).urm = function (it, $completion) {
    var tmp = this.vrm(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.urm(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.puz_1;
          var canEditTeacherEnrolments = tmp0_container.y6();
          var canEditStudentEnrolments = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.ouz_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.xuz(VOID, VOID, VOID, canEditTeacherEnrolments, canEditStudentEnrolments);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).vrm = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this.ouz_1, completion);
    i.puz_1 = it;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.urm(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.gv0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).iv0 = function (it, $completion) {
    var tmp = this.jv0(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.iv0((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.gv0_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.xuz(this.hv0_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).jv0 = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this.gv0_1, completion);
    i.hv0_1 = it;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.iv0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.sv0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).lqf = function (canViewMembers, $completion) {
    var tmp = this.mqf(canViewMembers, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1;
            if (this.tv0_1) {
              tmp_1 = this.sv0_1.wqn().t7d().e93(this.sv0_1.wv1_1, this.sv0_1.vv1_1);
            } else {
              tmp_1 = flowOf(emptyList());
            }

            tmp_0.uv0_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this.sv0_1, null);
            suspendResult = this.uv0_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).mqf = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this.sv0_1, completion);
    i.tv0_1 = canViewMembers;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (canViewMembers, $completion) {
      return i.lqf(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.fv2_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).lqf = function (value, $completion) {
    var tmp = this.mqf(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.iv2_1 = this.fv2_1;
            var tmp_1 = this;
            tmp_1.jv2_1 = this.gv2_1;
            if (this.jv2_1) {
              this.hd_1 = 3;
              suspendResult = this.iv2_1.t1d(this.jv2_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.hv2_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).mqf = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda(this.fv2_1, completion);
    i.gv2_1 = value;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.lqf(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$72(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.sv2_1 = _this__u8e3s4;
    this.tv2_1 = collector;
  }
  protoOf($collectCOROUTINE$72).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.uv2_1 = this.tv2_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.uv2_1, null);
            suspendResult = this.sv2_1.vv2_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_8($this) {
    this.vv2_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_8).aqf = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$72(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_8).a1c = function (collector, $completion) {
    return this.aqf(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.ev3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).lqf = function (canViewMembers, $completion) {
    var tmp = this.mqf(canViewMembers, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.fv3_1) {
              this.hd_1 = 1;
              suspendResult = this.ev3_1.wqn().t7d().l93(this.ev3_1.wv1_1, this.ev3_1.vv1_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var courseAndPersonName = suspendResult;
            var tmp_0 = courseAndPersonName == null ? null : courseAndPersonName.e9a_1;
            var personName = '' + tmp_0 + ' ' + (courseAndPersonName == null ? null : courseAndPersonName.f9a_1);
            l$ret$1: do {
              var this_0 = this.ev3_1.vqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xuz(VOID, personName, courseAndPersonName == null ? null : courseAndPersonName.d9a_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.ev3_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mq6(VOID, VOID, personName);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).mqf = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this.ev3_1, completion);
    i.fv3_1 = canViewMembers;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (canViewMembers, $completion) {
      return i.lqf(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ov3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.ov3_1.wqn().q7d().ee7(this.ov3_1.vv1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.ov3_1.vqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xuz(VOID, VOID, VOID, VOID, VOID, terminology);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda(this.ov3_1, completion);
    i.pv3_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation) {
    this.yv3_1 = $permissionFlow;
    this.zv3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.yv3_1);
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this.zv3_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_1(this.yv3_1, this.zv3_1, completion);
    i.av4_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_2($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_3($canViewMembersFlow, this$0, resultContinuation) {
    this.jv4_1 = $canViewMembersFlow;
    this.kv4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.jv4_1);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this.kv4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_3(this.jv4_1, this.kv4_1, completion);
    i.lv4_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_4($canViewMembersFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_3($canViewMembersFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_5($canViewMembersFlow, this$0, resultContinuation) {
    this.uv4_1 = $canViewMembersFlow;
    this.vv4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = distinctUntilChanged(this.uv4_1);
            var tmp_0 = new _no_name_provided__qut3iv_8(this_0);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this.vv4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_5(this.uv4_1, this.vv4_1, completion);
    i.wv4_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_6($canViewMembersFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_5($canViewMembersFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_9($this) {
    this.fuz_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_9).aqf = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$71(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_9).a1c = function (collector, $completion) {
    return this.aqf(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    this.fv5_1 = $this_launch;
    this.gv5_1 = this$0;
    this.hv5_1 = $permissionFlow;
    this.iv5_1 = $canViewMembersFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.fv5_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this.gv5_1, null));
          launch(this.fv5_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_2(this.hv5_1, this.gv5_1, null));
          launch(this.fv5_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_4(this.iv5_1, this.gv5_1, null));
          launch(this.fv5_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_6(this.iv5_1, this.gv5_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).l78 = function (completion) {
    return new ClazzEnrolmentListViewModel$slambda$slambda(this.fv5_1, this.gv5_1, this.hv5_1, this.iv5_1, completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda_0($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_139() {
    this.jv5_1 = 'CourseEnrolments';
  }
  var Companion_instance_188;
  function Companion_getInstance_156() {
    return Companion_instance_188;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_20(function_0) {
    this.kv5_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_20).t1d = function (value, $completion) {
    return this.kv5_1(value, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation) {
    this.tv5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.tv5_1.uqn().o7f();
            var tmp_2 = this.tv5_1.sqn();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_4 = new Long(8, 0);
            PermissionFlags_getInstance();
            tmp_0.vv5_1 = shareIn(tmp_1.idk(tmp_2, this.tv5_1.vv1_1, tmp_3, tmp_4, new Long(8192, 0)), this.tv5_1.rqn(), Companion_getInstance_12().v1h());
            var tmp_5 = this;
            var this_0 = this.vv5_1;
            tmp_5.wv5_1 = new _no_name_provided__qut3iv_9(this_0);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.tv5_1.vqv_1, ClazzEnrolmentListViewModel$slambda$slambda_0(this.uv5_1, this.tv5_1, this.vv5_1, this.wv5_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda(this.tv5_1, completion);
    i.uv5_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzEnrolmentListUiState(), 'CourseEnrolments');
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.vv1_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.wv1_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this.rqn();
    launch(tmp_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzEnrolmentListViewModel).xv5 = function (enrolment) {
    var tmp = Companion_instance_35.n4r();
    Companion_getInstance_116();
    this.iqo('EnrolmentEdit', '', null, tmp, mapOf_0(to('entityUid', enrolment.b8i_1.toString())), VOID, true);
  };
  protoOf(ClazzEnrolmentListViewModel).yv5 = function () {
    Companion_getInstance_116();
    this.cqn_1.rp6('PersonDetailView', mapOf_0(to('entityUid', this.wv1_1.toString())));
  };
  protoOf(ClazzEnrolmentListViewModel).pqw = function (searchText) {
  };
  protoOf(ClazzEnrolmentListViewModel).qqw = function () {
  };
  function ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    enrolmentList = enrolmentList === VOID ? emptyList() : enrolmentList;
    personName = personName === VOID ? null : personName;
    courseName = courseName === VOID ? null : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? false : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? false : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.quz_1 = enrolmentList;
    this.ruz_1 = personName;
    this.suz_1 = courseName;
    this.tuz_1 = canEditTeacherEnrolments;
    this.uuz_1 = canEditStudentEnrolments;
    this.vuz_1 = courseTerminology;
    this.wuz_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListUiState).zv5 = function (enrolment) {
    var tmp;
    var tmp_0 = enrolment.g8i_1;
    if (tmp_0 === 1001) {
      tmp = this.tuz_1;
    } else {
      tmp = this.tuz_1;
    }
    var tmp0_canEdit = tmp;
    var tmp1_timeZone = this.wuz_1;
    return new ClazzEnrolmentListItemUiState(tmp0_canEdit, enrolment, tmp1_timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).av6 = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    return new ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).xuz = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone, $super) {
    enrolmentList = enrolmentList === VOID ? this.quz_1 : enrolmentList;
    personName = personName === VOID ? this.ruz_1 : personName;
    courseName = courseName === VOID ? this.suz_1 : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? this.tuz_1 : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? this.uuz_1 : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? this.vuz_1 : courseTerminology;
    timeZone = timeZone === VOID ? this.wuz_1 : timeZone;
    return $super === VOID ? this.av6(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) : $super.av6.call(this, enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).toString = function () {
    return 'ClazzEnrolmentListUiState(enrolmentList=' + this.quz_1 + ', personName=' + this.ruz_1 + ', courseName=' + this.suz_1 + ', canEditTeacherEnrolments=' + this.tuz_1 + ', canEditStudentEnrolments=' + this.uuz_1 + ', courseTerminology=' + this.vuz_1 + ', timeZone=' + this.wuz_1 + ')';
  };
  protoOf(ClazzEnrolmentListUiState).hashCode = function () {
    var result = hashCode(this.quz_1);
    result = imul(result, 31) + (this.ruz_1 == null ? 0 : getStringHashCode(this.ruz_1)) | 0;
    result = imul(result, 31) + (this.suz_1 == null ? 0 : getStringHashCode(this.suz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tuz_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uuz_1) | 0;
    result = imul(result, 31) + (this.vuz_1 == null ? 0 : hashCode(this.vuz_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.wuz_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentListUiState ? other : THROW_CCE();
    if (!equals(this.quz_1, tmp0_other_with_cast.quz_1))
      return false;
    if (!(this.ruz_1 == tmp0_other_with_cast.ruz_1))
      return false;
    if (!(this.suz_1 == tmp0_other_with_cast.suz_1))
      return false;
    if (!(this.tuz_1 === tmp0_other_with_cast.tuz_1))
      return false;
    if (!(this.uuz_1 === tmp0_other_with_cast.uuz_1))
      return false;
    if (!equals(this.vuz_1, tmp0_other_with_cast.vuz_1))
      return false;
    if (!(this.wuz_1 === tmp0_other_with_cast.wuz_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListItemUiState(canEdit, enrolment, timeZone) {
    canEdit = canEdit === VOID ? false : canEdit;
    this.bv6_1 = canEdit;
    this.cv6_1 = enrolment;
    this.dv6_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListItemUiState).toString = function () {
    return 'ClazzEnrolmentListItemUiState(canEdit=' + this.bv6_1 + ', enrolment=' + this.cv6_1 + ', timeZone=' + this.dv6_1 + ')';
  };
  protoOf(ClazzEnrolmentListItemUiState).hashCode = function () {
    var result = getBooleanHashCode(this.bv6_1);
    result = imul(result, 31) + hashCode(this.cv6_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.dv6_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentListItemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentListItemUiState ? other : THROW_CCE();
    if (!(this.bv6_1 === tmp0_other_with_cast.bv6_1))
      return false;
    if (!equals(this.cv6_1, tmp0_other_with_cast.cv6_1))
      return false;
    if (!(this.dv6_1 === tmp0_other_with_cast.dv6_1))
      return false;
    return true;
  };
  var RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance;
  var RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance;
  var RecordAttendanceOption_entriesInitialized;
  function RecordAttendanceOption_initEntries() {
    if (RecordAttendanceOption_entriesInitialized)
      return Unit_instance;
    RecordAttendanceOption_entriesInitialized = true;
    RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE', 0, strings_getInstance().qn9_1);
    RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_NEW_SCHEDULE', 1, strings_getInstance().rn9_1);
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mv6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).ov6 = function (clazz, $completion) {
    var tmp = this.pv6(clazz, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ov6((p1 == null ? true : p1 instanceof Clazz) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.mv6_1.vqv_1;
          var tmp_0;
          var tmp_1 = this_0.t2().rv6_1;
          var tmp0_safe_receiver = this.nv6_1;
          if (!(tmp_1 === (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j8e_1))) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver_0 = tmp_0;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver_0.t2();
                var tmp0_safe_receiver_1 = this.nv6_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.j8e_1;
                var nextValue = prevValue.yv6(VOID, tmp1_elvis_lhs == null ? 'UTC' : tmp1_elvis_lhs);
                if (tmp0_safe_receiver_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          var this_1 = this.mv6_1.eqn_1;
          var tmp_2;
          var tmp_3 = this_1.t2().zq5_1;
          var tmp0_safe_receiver_2 = this.nv6_1;
          if (!(tmp_3 == (tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.s8d_1))) {
            tmp_2 = this_1;
          } else {
            tmp_2 = null;
          }
          var tmp1_safe_receiver = tmp_2;
          if (tmp1_safe_receiver == null)
            null;
          else {
            l$ret$3: do {
              while (true) {
                var prevValue_0 = tmp1_safe_receiver.t2();
                var tmp0_safe_receiver_3 = this.nv6_1;
                var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.s8d_1);
                if (tmp1_safe_receiver.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).pv6 = function (clazz, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this.mv6_1, completion);
    i.nv6_1 = clazz;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (clazz, $completion) {
      return i.ov6(clazz, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda($options, this$0) {
    return function () {
      var tmp;
      if ($options.u() > 1) {
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_0 = this$0.vqv_1;
          while (true) {
            var prevValue = this_0.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
            var nextValue = prevValue.yv6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
            if (this_0.y1k(prevValue, nextValue)) {
              tmp$ret$1 = Unit_instance;
              break $l$block;
            }
          }
        }
        tmp = tmp$ret$1;
      } else {
        this$0.bv8(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
        tmp = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).mv8 = function (hasPermission, hasLogs, $completion) {
    var tmp = this.nv8(hasPermission, hasLogs, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE();
    return this.mv8(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new PermissionAndExistingLogs(this.kv8_1, this.lv8_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).nv8 = function (hasPermission, hasLogs, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.kv8_1 = hasPermission;
    i.lv8_1 = hasLogs;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (hasPermission, hasLogs, $completion) {
      return i.mv8(hasPermission, hasLogs, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.wv8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).yv8 = function (it, $completion) {
    var tmp = this.zv8(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.yv8(p1 instanceof PermissionAndExistingLogs ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = ArrayList_init_$Create$();
          if (this.xv8_1.av9_1) {
            this_0.i1(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
          }
          if (this.xv8_1.av9_1 ? this.xv8_1.bv9_1 : false) {
            this_0.i1(RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance());
          }
          var options = this_0.f3();
          l$ret$1: do {
            var this_1 = this.wv8_1.vqv_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.yv6(VOID, VOID, options);
              if (this_1.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.wv8_1.eqn_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_0 = !options.c1();
              var tmp_1 = this.wv8_1.aqo().moj(strings_getInstance().tmu_1);
              var tmp_2 = FabIcon_ADD_getInstance();
              var nextValue_0 = prevValue_0.mq6(new FabUiState(tmp_0, tmp_1, tmp_2, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda(options, this.wv8_1)));
              if (this_2.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).zv8 = function (it, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this.wv8_1, completion);
    i.xv8_1 = it;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.yv8(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.kv9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.kv9_1.wqn().o7d().t8c(this.kv9_1.zv7_1);
            var tmp_1 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this.kv9_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this.kv9_1, completion);
    i.lv9_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.uv9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.uv9_1.wqn().o7f();
            var tmp_2 = this.uv9_1.sqn();
            PermissionFlags_getInstance();
            tmp_0.wv9_1 = tmp_1.fdk(tmp_2, this.uv9_1.zv7_1, new Long(64, 0));
            var tmp_3 = this;
            var tmp_4 = this.uv9_1.wqn().m7e();
            tmp_3.xv9_1 = tmp_4.ka3(this.uv9_1.zv7_1, 8);
            this.hd_1 = 1;
            var tmp_5 = combine(this.wv9_1, this.xv9_1, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_6 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this.uv9_1, null);
            suspendResult = tmp_5.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this.uv9_1, completion);
    i.vv9_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.gva_1 = $this_launch;
    this.hva_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.gva_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this.hva_1, null));
          launch(this.gva_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this.hva_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).l78 = function (completion) {
    return new ClazzLogListAttendanceViewModel$slambda$slambda(this.gva_1, this.hva_1, completion);
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function RecordAttendanceOption(name, ordinal, stringResource) {
    Enum.call(this, name, ordinal);
    this.kva_1 = stringResource;
  }
  function PermissionAndExistingLogs(hasRecordPermission, hasExistingLogs) {
    this.av9_1 = hasRecordPermission;
    this.bv9_1 = hasExistingLogs;
  }
  protoOf(PermissionAndExistingLogs).toString = function () {
    return 'PermissionAndExistingLogs(hasRecordPermission=' + this.av9_1 + ', hasExistingLogs=' + this.bv9_1 + ')';
  };
  protoOf(PermissionAndExistingLogs).hashCode = function () {
    var result = getBooleanHashCode(this.av9_1);
    result = imul(result, 31) + getBooleanHashCode(this.bv9_1) | 0;
    return result;
  };
  protoOf(PermissionAndExistingLogs).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PermissionAndExistingLogs))
      return false;
    var tmp0_other_with_cast = other instanceof PermissionAndExistingLogs ? other : THROW_CCE();
    if (!(this.av9_1 === tmp0_other_with_cast.av9_1))
      return false;
    if (!(this.bv9_1 === tmp0_other_with_cast.bv9_1))
      return false;
    return true;
  };
  function Companion_140() {
    this.lva_1 = 'CourseLogListAttendanceView';
  }
  var Companion_instance_189;
  function Companion_getInstance_157() {
    return Companion_instance_189;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_21(function_0) {
    this.mva_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_21).t1d = function (value, $completion) {
    return this.mva_1(value, $completion);
  };
  function ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      var tmp = this$0.wqn().m7e();
      return tmp.ia3(this$0.zv7_1, 8);
    };
  }
  function ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.vva_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.vva_1.vqv_1, ClazzLogListAttendanceViewModel$slambda$slambda_0(this.wva_1, this.vva_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda(this.vva_1, completion);
    i.wva_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this$0, resultContinuation) {
    this.fvb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.fvb_1.wqn().m7e().la3(this.fvb_1.zv7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var mostRecentLogUid = suspendResult;
            var this_0 = this.fvb_1.cqn_1;
            var tmp_0;
            if (!mostRecentLogUid.equals(new Long(0, 0))) {
              tmp_0 = this_0;
            } else {
              tmp_0 = null;
            }

            var tmp0_safe_receiver = tmp_0;
            if (tmp0_safe_receiver == null)
              null;
            else {
              Companion_getInstance_116();
              tmp0_safe_receiver.rp6('EditAttendance', mapOf_0(to('entityUid', mostRecentLogUid.toString())));
            }

            this.fvb_1.hvb();
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this.fvb_1, completion);
    i.gvb_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance() {
    RecordAttendanceOption_initEntries();
    return RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance;
  }
  function RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance() {
    RecordAttendanceOption_initEntries();
    return RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance;
  }
  function ClazzLogListAttendanceViewModel(di, savedStateHandle) {
    var tmp = new ClazzLogListAttendanceUiState();
    UstadListViewModel.call(this, di, savedStateHandle, tmp, 'Course');
    var tmp_0 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_1;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzUid specified');
    } else {
      tmp_1 = tmp1_elvis_lhs;
    }
    tmp_0.zv7_1 = tmp_1;
    var tmp_2 = this;
    tmp_2.av8_1 = ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.yv6(VOID, VOID, VOID, this.av8_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.rqn();
    launch(tmp_3, VOID, VOID, ClazzLogListAttendanceViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogListAttendanceViewModel).hvb = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.yv6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).pqw = function (searchText) {
  };
  protoOf(ClazzLogListAttendanceViewModel).qqw = function () {
  };
  protoOf(ClazzLogListAttendanceViewModel).bv8 = function (option) {
    var tmp0 = option.za_1;
    if (tmp0 === 1) {
      Companion_getInstance_125();
      var tmp = to('timeZone', this.vqv_1.t2().rv6_1);
      Companion_getInstance_116();
      this.iqx('ClazzLogEdit', mapOf([tmp, to('clazzUid', this.zv7_1.toString())]));
      this.hvb();
    } else if (tmp0 === 0) {
      if (this.dqo().equals(Companion_getInstance_97().tq6_1))
        return Unit_instance;
      this.cqo(Companion_getInstance_97().tq6_1);
      var tmp_0 = this.rqn();
      launch(tmp_0, VOID, VOID, ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this, null));
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).ivb = function (clazzLog) {
    Companion_getInstance_116();
    var tmp = to('entityUid', clazzLog.ga4_1.toString());
    Companion_getInstance_125();
    this.cqn_1.rp6('EditAttendance', mapOf([tmp, to('clazzUid', this.zv7_1.toString())]));
  };
  function ClazzLogListAttendanceUiState$_init_$lambda_i3ey0v() {
    return new EmptyPagingSource();
  }
  function ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    graphData = graphData === VOID ? null : graphData;
    timeZoneId = timeZoneId === VOID ? Companion_getInstance_9().xmh().ymg() : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? emptyList() : recordAttendanceOptions;
    var tmp;
    if (clazzLogsList === VOID) {
      tmp = ClazzLogListAttendanceUiState$_init_$lambda_i3ey0v;
    } else {
      tmp = clazzLogsList;
    }
    clazzLogsList = tmp;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? 7 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? listOf([new MessageIdOption2(strings_getInstance().cmv_1, 7), new MessageIdOption2(strings_getInstance().cmx_1, 30), new MessageIdOption2(strings_getInstance().omz_1, 90)]) : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    this.qv6_1 = graphData;
    this.rv6_1 = timeZoneId;
    this.sv6_1 = recordAttendanceOptions;
    this.tv6_1 = clazzLogsList;
    this.uv6_1 = fieldsEnabled;
    this.vv6_1 = selectedChipId;
    this.wv6_1 = viewIdToNumDays;
    this.xv6_1 = createNewOptionsVisible;
  }
  protoOf(ClazzLogListAttendanceUiState).jvb = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    return new ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).yv6 = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible, $super) {
    graphData = graphData === VOID ? this.qv6_1 : graphData;
    timeZoneId = timeZoneId === VOID ? this.rv6_1 : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? this.sv6_1 : recordAttendanceOptions;
    clazzLogsList = clazzLogsList === VOID ? this.tv6_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.uv6_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.vv6_1 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? this.wv6_1 : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.xv6_1 : createNewOptionsVisible;
    return $super === VOID ? this.jvb(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) : $super.jvb.call(this, graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).toString = function () {
    return 'ClazzLogListAttendanceUiState(graphData=' + this.qv6_1 + ', timeZoneId=' + this.rv6_1 + ', recordAttendanceOptions=' + this.sv6_1 + ', clazzLogsList=' + this.tv6_1 + ', fieldsEnabled=' + this.uv6_1 + ', selectedChipId=' + this.vv6_1 + ', viewIdToNumDays=' + this.wv6_1 + ', createNewOptionsVisible=' + this.xv6_1 + ')';
  };
  protoOf(ClazzLogListAttendanceUiState).hashCode = function () {
    var result = this.qv6_1 == null ? 0 : this.qv6_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.rv6_1) | 0;
    result = imul(result, 31) + hashCode(this.sv6_1) | 0;
    result = imul(result, 31) + hashCode(this.tv6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uv6_1) | 0;
    result = imul(result, 31) + this.vv6_1 | 0;
    result = imul(result, 31) + hashCode(this.wv6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xv6_1) | 0;
    return result;
  };
  protoOf(ClazzLogListAttendanceUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogListAttendanceUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogListAttendanceUiState ? other : THROW_CCE();
    if (!equals(this.qv6_1, tmp0_other_with_cast.qv6_1))
      return false;
    if (!(this.rv6_1 === tmp0_other_with_cast.rv6_1))
      return false;
    if (!equals(this.sv6_1, tmp0_other_with_cast.sv6_1))
      return false;
    if (!equals(this.tv6_1, tmp0_other_with_cast.tv6_1))
      return false;
    if (!(this.uv6_1 === tmp0_other_with_cast.uv6_1))
      return false;
    if (!(this.vv6_1 === tmp0_other_with_cast.vv6_1))
      return false;
    if (!equals(this.wv6_1, tmp0_other_with_cast.wv6_1))
      return false;
    if (!(this.xv6_1 === tmp0_other_with_cast.xv6_1))
      return false;
    return true;
  };
  function ClazzLogEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda).tvb = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.tvb(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).yny = function (it, completion) {
    var i = new ClazzLogEditViewModel$slambda$slambda(completion);
    i.svb_1 = it;
    return i;
  };
  function ClazzLogEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.tvb(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.cvc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).dvc = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.dvc($completion);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new ClazzLog();
          this_0.ha4_1 = this.cvc_1.evd_1;
          this_0.ia4_1 = systemTimeInMillis();
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ClazzLogEditViewModel$slambda$slambda_1(this.cvc_1, completion);
  };
  function ClazzLogEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.dvc($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzLogEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.cvd_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jvd(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzLogEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_141() {
    this.kvd_1 = 'ClazzLogEdit';
  }
  var Companion_instance_190;
  function Companion_getInstance_158() {
    return Companion_instance_190;
  }
  function ClazzLogEditViewModel$slambda(this$0, resultContinuation) {
    this.tvd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_36.n4r();
            var tmp_1 = ClazzLogEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzLogEditViewModel$slambda$slambda_2(this.tvd_1, null);
            suspendResult = this.tvd_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzLogEditViewModel$slambda$lambda(this.tvd_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.tvd_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.tvd_1.aqo().moj(strings_getInstance().vmj_1);
                var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ClazzLogEditViewModel$onClickSave$ref(this.tvd_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.tvd_1.cvd_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.jvd(true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditViewModel$slambda(this.tvd_1, completion);
    i.uvd_1 = $this$launch;
    return i;
  };
  function ClazzLogEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.dve_1 = $commitDelay;
    this.eve_1 = $entity;
    this.fve_1 = $this;
    this.gve_1 = $key;
    this.hve_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.dve_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.eve_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.fve_1.gqo(this.fve_1.aqn_1, this.gve_1, this.hve_1, this.eve_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditViewModel$onEntityChanged$slambda(this.dve_1, this.eve_1, this.fve_1, this.gve_1, this.hve_1, completion);
    i.ive_1 = $this$launch;
    return i;
  };
  function ClazzLogEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzLogEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$onClickSave$lambda($this$shallowCopy) {
    $this$shallowCopy.ga4_1 = generateUid($this$shallowCopy);
    return Unit_instance;
  }
  function ClazzLogEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ClazzLogEdit');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_elvis_lhs = savedStateHandle.ba('timeZone');
    tmp.bvd_1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
    this.cvd_1 = MutableStateFlow(new ClazzLogEditUiState(VOID, VOID, this.bvd_1));
    this.dvd_1 = asStateFlow(this.cvd_1);
    var tmp_0 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.evd_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().rn9_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.rqn();
    launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogEditViewModel).jve = function (clazzLog) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.cvd_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.gvd_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ia4_1;
        var nextValue = prevValue.jvd(VOID, clazzLog, VOID, this.lqu(tmp, clazzLog == null ? null : clazzLog.ia4_1, prevValue.ivd_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_36.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.rqn();
    tmp_0.hqt_1 = launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$onEntityChanged$slambda_0(commitDelay, clazzLog, this, key, serializer, null));
  };
  protoOf(ClazzLogEditViewModel).asa = function () {
    var tmp0_elvis_lhs = this.cvd_1.t2().gvd_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var clazzLog = tmp;
    var errorMsg = !isDateSet(clazzLog.ia4_1) ? strings_getInstance().vmn_1 : clazzLog.ia4_1.c7(systemTimeInMillis()) > 0 ? strings_getInstance().tnm_1 : null;
    if (!(errorMsg == null)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.cvd_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.jvd(VOID, VOID, VOID, this.aqo().moj(errorMsg));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    var clazzLogWithUid = shallowCopy_6(clazzLog, ClazzLogEditViewModel$onClickSave$lambda);
    var newClazzLogJson = this.m4r().r45(Companion_instance_36.n4r(), clazzLogWithUid);
    var tmp_0 = to('newclazzlog', newClazzLogJson);
    Companion_getInstance_125();
    this.cqn_1.rp6('EditAttendance', mapOf([tmp_0, to('clazzUid', this.evd_1.toString())]));
  };
  function ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError) {
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    clazzLog = clazzLog === VOID ? null : clazzLog;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    dateError = dateError === VOID ? null : dateError;
    this.fvd_1 = fieldsEnabled;
    this.gvd_1 = clazzLog;
    this.hvd_1 = timeZone;
    this.ivd_1 = dateError;
  }
  protoOf(ClazzLogEditUiState).kve = function (fieldsEnabled, clazzLog, timeZone, dateError) {
    return new ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).jvd = function (fieldsEnabled, clazzLog, timeZone, dateError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.fvd_1 : fieldsEnabled;
    clazzLog = clazzLog === VOID ? this.gvd_1 : clazzLog;
    timeZone = timeZone === VOID ? this.hvd_1 : timeZone;
    dateError = dateError === VOID ? this.ivd_1 : dateError;
    return $super === VOID ? this.kve(fieldsEnabled, clazzLog, timeZone, dateError) : $super.kve.call(this, fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).toString = function () {
    return 'ClazzLogEditUiState(fieldsEnabled=' + this.fvd_1 + ', clazzLog=' + this.gvd_1 + ', timeZone=' + this.hvd_1 + ', dateError=' + this.ivd_1 + ')';
  };
  protoOf(ClazzLogEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.fvd_1);
    result = imul(result, 31) + (this.gvd_1 == null ? 0 : this.gvd_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.hvd_1) | 0;
    result = imul(result, 31) + (this.ivd_1 == null ? 0 : getStringHashCode(this.ivd_1)) | 0;
    return result;
  };
  protoOf(ClazzLogEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogEditUiState ? other : THROW_CCE();
    if (!(this.fvd_1 === tmp0_other_with_cast.fvd_1))
      return false;
    if (!equals(this.gvd_1, tmp0_other_with_cast.gvd_1))
      return false;
    if (!(this.hvd_1 === tmp0_other_with_cast.hvd_1))
      return false;
    if (!(this.ivd_1 == tmp0_other_with_cast.ivd_1))
      return false;
    return true;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
    var tmp = a.ia4_1;
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.ia4_1;
    return compareValues(tmp, tmp$ret$1);
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda(this$0, $newClazzLogVal, resultContinuation) {
    this.tve_1 = this$0;
    this.uve_1 = $newClazzLogVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).wve = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.wve(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.vve_1.m7e();
            suspendResult = tmp_0.ja3(this.tve_1.zvf_1, 8, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var dbLogList = suspendResult;
            var tmp_1;
            if (!(this.uve_1 == null)) {
              var this_0 = plus(dbLogList, listOf_0(this.uve_1));
              var tmp_2 = ClazzLogEditAttendanceViewModel$slambda$slambda$lambda;
              tmp_1 = sortedWith(this_0, new sam$kotlin_Comparator$0_2(tmp_2));
            } else {
              tmp_1 = dbLogList;
            }

            var list = tmp_1;
            return list;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).yny = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this.tve_1, this.uve_1, completion);
    i.vve_1 = db;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_0(this$0, $newClazzLogVal, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this$0, $newClazzLogVal, resultContinuation);
    var l = function (db, $completion) {
      return i.wve(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).ivg = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.ivg($completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ClazzLogEditAttendanceViewModel$slambda$slambda_1(completion);
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_2(resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.ivg($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$lambda(this$0, $hasEditPermission) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.uvf_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.pvg(VOID, VOID, it == null ? emptyList() : it, VOID, $hasEditPermission);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.yvg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.yvg_1.wqn().o7d().c8d(this.yvg_1.uvf_1.t2().avh().ha4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var timeZone = suspendResult;
            l$ret$1: do {
              var this_0 = this.yvg_1.uvf_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.pvg(VOID, VOID, VOID, VOID, VOID, timeZone == null ? 'UTC' : timeZone);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_3(this.yvg_1, completion);
    i.zvg_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda($logRecords) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp$ret$0;
      $l$block: {
        // Inline function 'kotlin.collections.count' call
        var this_0 = $logRecords;
        var tmp_0;
        if (isInterface(this_0, Collection)) {
          tmp_0 = this_0.c1();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp$ret$0 = 0;
          break $l$block;
        }
        var count = 0;
        var tmp0_iterator = this_0.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var tmp_1 = element.d9z_1;
          if (tmp_1 === 1) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$0 = count;
      }
      tmp.na4_1 = tmp$ret$0;
      var tmp_2 = $this$shallowCopy;
      var tmp$ret$2;
      $l$block_0: {
        // Inline function 'kotlin.collections.count' call
        var this_1 = $logRecords;
        var tmp_3;
        if (isInterface(this_1, Collection)) {
          tmp_3 = this_1.c1();
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp$ret$2 = 0;
          break $l$block_0;
        }
        var count_0 = 0;
        var tmp0_iterator_0 = this_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var tmp_4 = element_0.d9z_1;
          if (tmp_4 === 2) {
            count_0 = count_0 + 1 | 0;
            checkCountOverflow(count_0);
          }
        }
        tmp$ret$2 = count_0;
      }
      tmp_2.oa4_1 = tmp$ret$2;
      var tmp_5 = $this$shallowCopy;
      var tmp$ret$4;
      $l$block_1: {
        // Inline function 'kotlin.collections.count' call
        var this_2 = $logRecords;
        var tmp_6;
        if (isInterface(this_2, Collection)) {
          tmp_6 = this_2.c1();
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp$ret$4 = 0;
          break $l$block_1;
        }
        var count_1 = 0;
        var tmp0_iterator_1 = this_2.w();
        while (tmp0_iterator_1.f()) {
          var element_1 = tmp0_iterator_1.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var tmp_7 = element_1.d9z_1;
          if (tmp_7 === 4) {
            count_1 = count_1 + 1 | 0;
            checkCountOverflow(count_1);
          }
        }
        tmp$ret$4 = count_1;
      }
      tmp_5.pa4_1 = tmp$ret$4;
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation) {
    this.jvh_1 = this$0;
    this.kvh_1 = $clazzLogsToSave;
    this.lvh_1 = $attendanceRecordsToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.jvh_1.wqn().m7e().ma3(this.kvh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.jvh_1.wqn().l7e().g9y(this.lvh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).yny = function (it, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this.jvh_1, this.kvh_1, this.lvh_1, completion);
    i.mvh_1 = it;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_newClazzLog__zdra0r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wvf_1;
    newClazzLog$factory();
    return this_0.t2();
  }
  function _set_currentClazzLogIndex__l00dbq($this, value) {
    $this.aqn_1.dqj('activeIndex', toString_0(value));
  }
  function _get_currentClazzLogIndex__yy31c2($this) {
    var tmp0_safe_receiver = $this.aqn_1.ba('activeIndex');
    return tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
  }
  function savePersonAndAttendanceRecords($this, clazzLogUid, records, $completion) {
    var tmp = new $savePersonAndAttendanceRecordsCOROUTINE$73($this, clazzLogUid, records, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function commitAttendanceRecordsToState($this, $completion) {
    var tmp = new $commitAttendanceRecordsToStateCOROUTINE$74($this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_142() {
    this.pvi_1 = 'newclazzlog';
    this.qvi_1 = 'EditAttendance';
    this.rvi_1 = 'activeIndex';
    this.svi_1 = 'log_';
    this.tvi_1 = 'logsToSave';
  }
  var Companion_instance_191;
  function Companion_getInstance_159() {
    return Companion_instance_191;
  }
  function sam$kotlin_Comparator$0_2(function_0) {
    this.uvi_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_2).pa = function (a, b) {
    return this.uvi_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {
    return this.pa(a, b);
  };
  function ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda($savedStateHandle, this$0) {
    return function () {
      var tmp0_safe_receiver = $savedStateHandle.ba('newclazzlog');
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.newClazzLog$delegate.<anonymous>.<anonymous>' call
        tmp = this$0.m4r().s45(Companion_instance_36.n4r(), tmp0_safe_receiver);
      }
      return tmp;
    };
  }
  function ClazzLogEditAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.dvj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda).msc = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.evj_1.o7f();
            var tmp_1 = this.dvj_1.sqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.dvj_1.zvf_1, new Long(32, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).yny = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this.dvj_1, completion);
    i.evj_1 = db;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.msc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation) {
    this.nvj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.pvj_1 = _get_newClazzLog__zdra0r(this.nvj_1);
            this.hd_1 = 1;
            var tmp_0 = this.nvj_1.uqn().o7f();
            var tmp_1 = this.nvj_1.sqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.nvj_1.zvf_1, new Long(64, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qvj_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_2 = ListSerializer(Companion_instance_36.n4r());
            var tmp_3 = ClazzLogEditAttendanceViewModel$slambda$slambda_0(this.nvj_1, this.pvj_1, null);
            var tmp_4 = ClazzLogEditAttendanceViewModel$slambda$slambda_2(null);
            suspendResult = this.nvj_1.kqo(tmp_2, VOID, VOID, tmp_3, tmp_4, ClazzLogEditAttendanceViewModel$slambda$lambda(this.nvj_1, this.qvj_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            launch(this.ovj_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda$slambda_4(this.nvj_1, null));
            var currentClazzLogIndexVal = _get_currentClazzLogIndex__yy31c2(this.nvj_1);
            var tmp_5;
            if (!(currentClazzLogIndexVal == null)) {
              tmp_5 = currentClazzLogIndexVal;
            } else if (!(this.pvj_1 == null)) {
              var tmp0_elvis_lhs = this.nvj_1.uvf_1.t2().rvj(this.pvj_1.ga4_1);
              tmp_5 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
            } else if (!this.nvj_1.iqt_1.equals(new Long(0, 0))) {
              var tmp1_elvis_lhs = this.nvj_1.uvf_1.t2().rvj(this.nvj_1.iqt_1);
              tmp_5 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
            } else {
              tmp_5 = this.nvj_1.uvf_1.t2().lvg_1.u() - 1 | 0;
            }

            var startIndex = tmp_5;
            this.nvj_1.svj(this.nvj_1.uvf_1.t2().lvg_1.v(startIndex), true);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda_1(this.nvj_1, completion);
    i.ovj_1 = $this$launchIfHasPermission;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda($clazzLog, this$0, resultContinuation) {
    this.bvk_1 = $clazzLog;
    this.cvk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.evk_1 = 'log_' + this.bvk_1.ga4_1.toString();
            this.hd_1 = 1;
            suspendResult = this.cvk_1.fqo(this.cvk_1.aqn_1, this.evk_1, ListSerializer(Companion_instance_38.n4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.fvk_1 = suspendResult;
            if (this.fvk_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.cvk_1.wqn().l7e().f9y(this.bvk_1.ha4_1, this.bvk_1.ga4_1, this.bvk_1.ia4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.gvk_1 = this.fvk_1;
              this.hd_1 = 8;
              continue $sm;
            }

          case 2:
            this.hvk_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.ivk_1 = this.hvk_1;
            var tmp_1 = this;
            tmp_1.jvk_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.hvk_1, 10));
            this.kvk_1 = this.ivk_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.kvk_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.lvk_1 = this.kvk_1.e();
            var tmp_2 = this;
            tmp_2.mvk_1 = this.lvk_1;
            if (this.mvk_1.x9z_1 == null) {
              this.ovk_1 = this.mvk_1.v9z_1;
              var tmp_3 = this;
              tmp_3.pvk_1 = new ClazzLogAttendanceRecord();
              var tmp_4 = this;
              tmp_4.qvk_1 = this.pvk_1;
              this.hd_1 = 4;
              var tmp_5 = get_doorPrimaryKeyManager(this.cvk_1.uqn());
              suspendResult = tmp_5.o62(15, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_6 = this;
              tmp_6.nvk_1 = this.mvk_1;
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.rvk_1 = suspendResult;
            this.qvk_1.a9z_1 = this.rvk_1;
            var tmp_7 = this.qvk_1;
            var tmp0_safe_receiver = this.mvk_1.v9z_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
            tmp_7.c9z_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.qvk_1.b9z_1 = this.bvk_1.ga4_1;
            this.svk_1 = this.pvk_1;
            this.tvk_1 = this.mvk_1.w9z_1;
            this.nvk_1 = new PersonAndClazzLogAttendanceRecord(this.ovk_1, this.tvk_1, this.svk_1);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.uvk_1 = this.nvk_1;
            this.jvk_1.i1(this.uvk_1);
            this.hd_1 = 3;
            continue $sm;
          case 6:
            this.vvk_1 = this.jvk_1;
            var tmp_8 = this;
            tmp_8.wvk_1 = this.vvk_1;
            this.hd_1 = 7;
            suspendResult = savePersonAndAttendanceRecords(this.cvk_1, this.bvk_1.ga4_1, this.wvk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.gvk_1 = this.vvk_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var personAndAttendanceRecords = this.gvk_1;
            l$ret$1: do {
              var this_0 = this.cvk_1.uvf_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.pvg(personAndAttendanceRecords, VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.cvk_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_9;
                if (!prevValue_0.fq6_1.iq5_1) {
                  var tmp_10 = this.cvk_1.uvf_1.t2().nvg_1;
                  var tmp_11 = this.cvk_1.aqo().moj(strings_getInstance().en3_1);
                  tmp_9 = prevValue_0.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(tmp_10, tmp_11, VOID, ClazzLogEditAttendanceViewModel$onClickSave$ref(this.cvk_1)));
                } else {
                  tmp_9 = prevValue_0;
                }
                var nextValue_0 = tmp_9;
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 9:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 9) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda(this.bvk_1, this.cvk_1, completion);
    i.dvk_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0($clazzLog, this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda($clazzLog, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda($record) {
    return function (it) {
      var tmp0_safe_receiver = it.v9z_1;
      var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
      var tmp1_safe_receiver = $record.v9z_1;
      return equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f96_1);
    };
  }
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this$0, resultContinuation) {
    this.fvl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = commitAttendanceRecordsToState(this.fvl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this.fvl_1, completion);
    i.gvl_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$lambda($status) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.d9z_1 = $status;
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this$0, resultContinuation) {
    this.pvl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = commitAttendanceRecordsToState(this.pvl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this.pvl_1, completion);
    i.qvl_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.zvl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            this.hd_1 = 1;
            suspendResult = delay(new Long(100, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.bvm_1 = this.zvl_1.yvf_1;
            var tmp_1 = this;
            tmp_1.cvm_1 = null;
            this.hd_1 = 2;
            suspendResult = this.bvm_1.a24(this.cvm_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 10;
            var tmp_2 = this;
            tmp_2.evm_1 = ArrayList_init_$Create$();
            var tmp_3 = this;
            tmp_3.fvm_1 = ArrayList_init_$Create$();
            this.hd_1 = 4;
            suspendResult = this.zvl_1.fqo(this.zvl_1.aqn_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.gvm_1 = suspendResult;
            this.hvm_1 = this.gvm_1 == null ? emptyList() : this.gvm_1;
            var tmp_4 = this;
            tmp_4.ivm_1 = this.hvm_1;
            this.jvm_1 = this.ivm_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.jvm_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.kvm_1 = this.jvm_1.e();
            var tmp_5 = this;
            tmp_5.lvm_1 = this.kvm_1;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.zvl_1.uvf_1.t2().lvg_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.ga4_1.equals(this.lvm_1)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
            }
             while (false);
            tmp_6.mvm_1 = tmp$ret$0;
            this.hd_1 = 6;
            suspendResult = this.zvl_1.fqo(this.zvl_1.aqn_1, 'log_' + this.lvm_1.toString(), ListSerializer(Companion_instance_38.n4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.nvm_1 = suspendResult;
            var tmp_7 = this;
            var tmp_8;
            if (this.nvm_1 == null) {
              tmp_8 = null;
            } else {
              var this_0 = this.nvm_1;
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator_0 = this_0.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                var tmp0_safe_receiver = element_0.x9z_1;
                if (tmp0_safe_receiver == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver);
                }
              }
              tmp_8 = destination;
            }

            tmp_7.ovm_1 = tmp_8;
            this.pvm_1 = this.ovm_1 == null ? emptyList() : this.ovm_1;
            var this_1 = this.evm_1;
            var element_1 = shallowCopy_6(this.mvm_1, ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda(this.pvm_1));
            this_1.i1(element_1);
            var this_2 = this.fvm_1;
            var elements = this.pvm_1;
            addAll(this_2, elements);
            this.hd_1 = 5;
            continue $sm;
          case 7:
            this.hd_1 = 8;
            var tmp_9 = this.zvl_1.wqn();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this.zvl_1, this.evm_1, this.fvm_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.dvm_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.id_1 = 11;
            this.bvm_1.l23(this.cvm_1);
            if (!(_get_newClazzLog__zdra0r(this.zvl_1) == null)) {
              this.zvl_1.cqn_1.mq9('ClazzLogEdit', true);
            } else {
              this.zvl_1.lqt(this.zvl_1.uvf_1.t2().avh());
            }

            return Unit_instance;
          case 10:
            this.id_1 = 11;
            var t = this.kd_1;
            this.bvm_1.l23(this.cvm_1);
            throw t;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda(this.zvl_1, completion);
    i.avm_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $savePersonAndAttendanceRecordsCOROUTINE$73(_this__u8e3s4, clazzLogUid, records, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vvh_1 = _this__u8e3s4;
    this.wvh_1 = clazzLogUid;
    this.xvh_1 = records;
  }
  protoOf($savePersonAndAttendanceRecordsCOROUTINE$73).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.yvh_1 = 'log_' + this.wvh_1.toString();
            this.hd_1 = 1;
            suspendResult = this.vvh_1.gqo(this.vvh_1.aqn_1, this.yvh_1, ListSerializer(Companion_instance_38.n4r()), this.xvh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.vvh_1.fqo(this.vvh_1.aqn_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.zvh_1 = suspendResult;
            this.avi_1 = this.zvh_1 == null ? null : toSet(this.zvh_1);
            this.bvi_1 = this.avi_1 == null ? emptySet() : this.avi_1;
            if (!this.bvi_1.a1(this.wvh_1)) {
              this.cvi_1 = plus_2(this.bvi_1, this.wvh_1);
              this.hd_1 = 3;
              suspendResult = this.vvh_1.gqo(this.vvh_1.aqn_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), toList(this.cvi_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $commitAttendanceRecordsToStateCOROUTINE$74(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lvi_1 = _this__u8e3s4;
  }
  protoOf($commitAttendanceRecordsToStateCOROUTINE$74).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            var tmp_0 = this;
            tmp_0.mvi_1 = this.lvi_1.yvf_1;
            var tmp_1 = this;
            tmp_1.nvi_1 = null;
            this.hd_1 = 1;
            suspendResult = this.mvi_1.a24(this.nvi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 5;
            this.hd_1 = 3;
            suspendResult = savePersonAndAttendanceRecords(this.lvi_1, this.lvi_1.uvf_1.t2().avh().ga4_1, this.lvi_1.uvf_1.t2().jvg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.ovi_1 = suspendResult;
            this.id_1 = 6;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.id_1 = 6;
            this.mvi_1.l23(this.nvi_1);
            return Unit_instance;
          case 5:
            this.id_1 = 6;
            var t = this.kd_1;
            this.mvi_1.l23(this.nvi_1);
            throw t;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzLogEditAttendanceViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'EditAttendance');
    this.uvf_1 = MutableStateFlow(new ClazzLogEditAttendanceUiState());
    this.vvf_1 = asStateFlow(this.uvf_1);
    var tmp = this;
    tmp.wvf_1 = lazy_0(ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda(savedStateHandle, this));
    this.xvf_1 = null;
    this.yvf_1 = Mutex();
    var tmp_0 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.zvf_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().tmu_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzLogEditAttendanceViewModel$slambda_0(this, null);
    this.mqo(tmp_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda_2(this, null));
  }
  protoOf(ClazzLogEditAttendanceViewModel).svj = function (clazzLog, forceLoad) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this.uvf_1.t2().lvg_1.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>' call
        if (item.ga4_1.equals(clazzLog.ga4_1)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var logIndex = tmp$ret$1;
    if (!forceLoad ? logIndex === this.uvf_1.t2().kvg_1 : false)
      return Unit_instance;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.uvf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>' call
        _set_currentClazzLogIndex__l00dbq(this, logIndex);
        var tmp$ret$3;
        $l$block_0: {
          // Inline function 'kotlin.collections.indexOfFirst' call
          var index_0 = 0;
          var tmp0_iterator_0 = prevValue.lvg_1.w();
          while (tmp0_iterator_0.f()) {
            var item_0 = tmp0_iterator_0.e();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>.<anonymous>' call
            if (item_0.ga4_1.equals(clazzLog.ga4_1)) {
              tmp$ret$3 = index_0;
              break $l$block_0;
            }
            index_0 = index_0 + 1 | 0;
          }
          tmp$ret$3 = -1;
        }
        var nextValue = prevValue.pvg(VOID, tmp$ret$3, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block_1;
        }
      }
    }
    var tmp0_safe_receiver = this.xvf_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.rqn();
    tmp.xvf_1 = launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0(clazzLog, this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).qvm = function (clazzLog, forceLoad, $super) {
    forceLoad = forceLoad === VOID ? false : forceLoad;
    var tmp;
    if ($super === VOID) {
      this.svj(clazzLog, forceLoad);
      tmp = Unit_instance;
    } else {
      tmp = $super.svj.call(this, clazzLog, forceLoad);
    }
    return tmp;
  };
  protoOf(ClazzLogEditAttendanceViewModel).rvm = function (record) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.uvf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClazzLogAttendanceChanged.<anonymous>' call
        var nextValue = prevValue.pvg(replace_0(prevValue.jvg_1, record, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda(record)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).svm = function (status) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.uvf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickMarkAll.<anonymous>' call
        // Inline function 'kotlin.collections.map' call
        var this_1 = prevValue.jvg_1;
        // Inline function 'kotlin.collections.mapTo' call
        var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
        var tmp0_iterator = this_1.w();
        while (tmp0_iterator.f()) {
          var item = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickMarkAll.<anonymous>.<anonymous>' call
          var tmp0_safe_receiver = item.x9z_1;
          var tmp;
          if (tmp0_safe_receiver == null) {
            tmp = null;
          } else {
            tmp = shallowCopy_7(tmp0_safe_receiver, ClazzLogEditAttendanceViewModel$onClickMarkAll$lambda(status));
          }
          var tmp$ret$0 = item.bka(VOID, VOID, tmp);
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.pvg(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).asa = function () {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda_0(this, null));
  };
  function ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? emptyList() : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? 0 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? emptyList() : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    canEdit = canEdit === VOID ? false : canEdit;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.jvg_1 = clazzLogAttendanceRecordList;
    this.kvg_1 = currentClazzLogIndex;
    this.lvg_1 = clazzLogsList;
    this.mvg_1 = fieldsEnabled;
    this.nvg_1 = canEdit;
    this.ovg_1 = timeZone;
  }
  protoOf(ClazzLogEditAttendanceUiState).rvj = function (clazzLogUid) {
    // Inline function 'kotlin.let' call
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this.lvg_1.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceUiState.indexOfClazzLogUid.<anonymous>' call
        if (item.ga4_1.equals(clazzLogUid)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceUiState.indexOfClazzLogUid.<anonymous>' call
    var it = tmp$ret$1;
    return it >= 0 ? it : null;
  };
  protoOf(ClazzLogEditAttendanceUiState).avh = function () {
    return this.lvg_1.v(this.kvg_1);
  };
  protoOf(ClazzLogEditAttendanceUiState).tvm = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    return new ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).pvg = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone, $super) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? this.jvg_1 : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? this.kvg_1 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? this.lvg_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.mvg_1 : fieldsEnabled;
    canEdit = canEdit === VOID ? this.nvg_1 : canEdit;
    timeZone = timeZone === VOID ? this.ovg_1 : timeZone;
    return $super === VOID ? this.tvm(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) : $super.tvm.call(this, clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).toString = function () {
    return 'ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList=' + this.jvg_1 + ', currentClazzLogIndex=' + this.kvg_1 + ', clazzLogsList=' + this.lvg_1 + ', fieldsEnabled=' + this.mvg_1 + ', canEdit=' + this.nvg_1 + ', timeZone=' + this.ovg_1 + ')';
  };
  protoOf(ClazzLogEditAttendanceUiState).hashCode = function () {
    var result = hashCode(this.jvg_1);
    result = imul(result, 31) + this.kvg_1 | 0;
    result = imul(result, 31) + hashCode(this.lvg_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mvg_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nvg_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ovg_1) | 0;
    return result;
  };
  protoOf(ClazzLogEditAttendanceUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogEditAttendanceUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogEditAttendanceUiState ? other : THROW_CCE();
    if (!equals(this.jvg_1, tmp0_other_with_cast.jvg_1))
      return false;
    if (!(this.kvg_1 === tmp0_other_with_cast.kvg_1))
      return false;
    if (!equals(this.lvg_1, tmp0_other_with_cast.lvg_1))
      return false;
    if (!(this.mvg_1 === tmp0_other_with_cast.mvg_1))
      return false;
    if (!(this.nvg_1 === tmp0_other_with_cast.nvg_1))
      return false;
    if (!(this.ovg_1 === tmp0_other_with_cast.ovg_1))
      return false;
    return true;
  };
  function newClazzLog$factory() {
    return getPropertyCallableRef('newClazzLog', 1, KProperty1, function (receiver) {
      return _get_newClazzLog__zdra0r(receiver);
    }, null);
  }
  function get_stringResource(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.za_1) {
      case 5:
        tmp = strings_getInstance().xno_1;
        break;
      case 4:
        tmp = strings_getInstance().yno_1;
        break;
      case 3:
        tmp = strings_getInstance().zno_1;
        break;
      case 2:
        tmp = strings_getInstance().anp_1;
        break;
      case 1:
        tmp = strings_getInstance().bnp_1;
        break;
      case 0:
        tmp = strings_getInstance().cnp_1;
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function get_contentTypeStringResource(_this__u8e3s4) {
    var tmp;
    if (!_this__u8e3s4.caw_1) {
      tmp = strings_getInstance().end_1;
    } else {
      var tmp0_subject = _this__u8e3s4.haw_1;
      var tmp_0;
      if (tmp0_subject === 1) {
        tmp_0 = strings_getInstance().bmn_1;
      } else {
        if (tmp0_subject === 2) {
          tmp_0 = strings_getInstance().zmm_1;
        } else {
          if (tmp0_subject === 3) {
            tmp_0 = strings_getInstance().amn_1;
          } else {
            if (tmp0_subject === 4) {
              tmp_0 = strings_getInstance().jna_1;
            } else {
              if (tmp0_subject === 5) {
                tmp_0 = strings_getInstance().emn_1;
              } else {
                if (tmp0_subject === 6) {
                  tmp_0 = strings_getInstance().cmn_1;
                } else {
                  if (tmp0_subject === 7) {
                    tmp_0 = strings_getInstance().dmn_1;
                  } else {
                    tmp_0 = strings_getInstance().hmi_1;
                  }
                }
              }
            }
          }
        }
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function Companion_143() {
    Companion_instance_192 = this;
    this.uvm_1 = 'ContentEntry';
    var tmp = this;
    Companion_getInstance_125();
    Companion_getInstance_125();
    Companion_getInstance_125();
    Companion_getInstance_125();
    tmp.vvm_1 = listOf(['entityUid', 'clazzUid', 'parentUid', 'courseBlockUid']);
  }
  var Companion_instance_192;
  function Companion_getInstance_160() {
    if (Companion_instance_192 == null)
      new Companion_143();
    return Companion_instance_192;
  }
  function ContentEntryDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_160();
    DetailViewModel.call(this, di, savedStateHandle, 'ContentEntryDetailOverviewView');
    var tmp = this;
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.detail.ContentEntryDetailViewModel._uiState.<anonymous>' call
    this.oqo(this_0, Companion_getInstance_160().vvm_1);
    var tmp$ret$2 = this_0.f3();
    var tmp_0 = new TabItem('ContentEntryDetailOverviewView', tmp$ret$2, this.aqo().moj(strings_getInstance().yn4_1));
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_1 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.detail.ContentEntryDetailViewModel._uiState.<anonymous>' call
    this.oqo(this_1, Companion_getInstance_160().vvm_1);
    var tmp$ret$5 = this_1.f3();
    tmp.svn_1 = MutableStateFlow(new ContentEntryDetailUiState(listOf([tmp_0, new TabItem('ContentEntryDetailAttemptsPersonList', tmp$ret$5, this.aqo().moj(strings_getInstance().lmn_1))])));
    this.tvn_1 = asStateFlow(this.svn_1);
  }
  function ContentEntryDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.uvn_1 = tabs;
  }
  protoOf(ContentEntryDetailUiState).toString = function () {
    return 'ContentEntryDetailUiState(tabs=' + this.uvn_1 + ')';
  };
  protoOf(ContentEntryDetailUiState).hashCode = function () {
    return hashCode(this.uvn_1);
  };
  protoOf(ContentEntryDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailUiState ? other : THROW_CCE();
    if (!equals(this.uvn_1, tmp0_other_with_cast.uvn_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.dvo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).fvo = function (contentEntry, $completion) {
    var tmp = this.gvo(contentEntry, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.fvo((p1 == null ? true : p1 instanceof ContentEntry) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.dvo_1.eqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.evo_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oav_1;
              var nextValue = prevValue.mq6(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).gvo = function (contentEntry, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this.dvo_1, completion);
    i.evo_1 = contentEntry;
    return i;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (contentEntry, $completion) {
      return i.fvo(contentEntry, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.pvo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.pvo_1.wqn().v7d().yau(this.pvo_1.qvp_1);
            var tmp_1 = ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda_0(this.pvo_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_22(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).l78 = function (completion) {
    return new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this.pvo_1, completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function buildSortOptions($this, db, $completion) {
    var tmp = new $buildSortOptionsCOROUTINE$75($this, db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_144() {
    this.cvq_1 = 'ContentEntryDetailAttemptsPersonList';
  }
  var Companion_instance_193;
  function Companion_getInstance_161() {
    return Companion_instance_193;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_22(function_0) {
    this.dvq_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_22).t1d = function (value, $completion) {
    return this.dvq_1(value, $completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$attemptsPersonListPagingSource$lambda(this$0) {
    return function () {
      return this$0.wqn().j7e().pje(this$0.qvp_1, this$0.sqn(), toQueryLikeParam(this$0.eqn_1.t2().eq6_1.tq5_1), this$0.vqv_1.t2().gvq_1.tqc_1);
    };
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda(this$0, resultContinuation) {
    this.qvq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            tmp_0.svq_1 = filterNotNull(listOf([this.qvq_1.uqn(), this.qvq_1.vqn()]));
            this.tvq_1 = this.svq_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.tvq_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.uvq_1 = this.tvq_1.e();
            var tmp_1 = this;
            tmp_1.vvq_1 = this.uvq_1;
            this.hd_1 = 2;
            suspendResult = buildSortOptions(this.qvq_1, this.vvq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var sortOptions = suspendResult;
            l$ret$1: do {
              var this_0 = this.qvq_1.vqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.wvq(VOID, sortOptions);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda(this.qvq_1, completion);
    i.rvq_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda_1(this$0, resultContinuation) {
    this.fvr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.fvr_1.vqv_1, ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda_0(this.fvr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda_1(this.fvr_1, completion);
    i.gvr_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $buildSortOptionsCOROUTINE$75(_this__u8e3s4, db, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.avq_1 = _this__u8e3s4;
    this.bvq_1 = db;
  }
  protoOf($buildSortOptionsCOROUTINE$75).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.bvq_1.j7e().tje(this.avq_1.qvp_1, this.avq_1.sqn(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var list = suspendResult;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp_0;
              if (isInterface(list, Collection)) {
                tmp_0 = list.c1();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = false;
                break l$ret$1;
              }
              var tmp0_iterator = list.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (!(element.xjf_1 == null)) {
                  tmp$ret$0 = true;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = false;
            }
             while (false);
            var tmp_1 = tmp$ret$0;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp_2;
              if (isInterface(list, Collection)) {
                tmp_2 = list.c1();
              } else {
                tmp_2 = false;
              }
              if (tmp_2) {
                tmp$ret$2 = false;
                break l$ret$3;
              }
              var tmp0_iterator_0 = list.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                if (!(element_0.ijf_1 == null)) {
                  tmp$ret$2 = true;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = false;
            }
             while (false);
            var tmp0_container = new Pair(tmp_1, tmp$ret$2);
            var hasProgressData = tmp0_container.y6();
            var hasScoreData = tmp0_container.z6();
            var this_0 = ArrayList_init_$Create$();
            var tmp_3 = strings_getInstance().cmk_1;
            var tmp_4 = new SortOrderOption(tmp_3, 1, true);
            var tmp_5 = strings_getInstance().cmk_1;
            var tmp_6 = new SortOrderOption(tmp_5, 2, false);
            var tmp_7 = strings_getInstance().bmk_1;
            var tmp_8 = new SortOrderOption(tmp_7, 3, true);
            var tmp_9 = strings_getInstance().bmk_1;
            this_0.m1(listOf([tmp_4, tmp_6, tmp_8, new SortOrderOption(tmp_9, 4, false)]));
            if (hasScoreData) {
              var tmp_10 = strings_getInstance().emk_1;
              var tmp_11 = new SortOrderOption(tmp_10, 5, true);
              var tmp_12 = strings_getInstance().emk_1;
              this_0.m1(listOf([tmp_11, new SortOrderOption(tmp_12, 6, false)]));
            }

            if (hasProgressData) {
              var tmp_13 = strings_getInstance().unq_1;
              var tmp_14 = new SortOrderOption(tmp_13, 7, true);
              var tmp_15 = strings_getInstance().unq_1;
              this_0.m1(listOf([tmp_14, new SortOrderOption(tmp_15, 8, false)]));
            }

            var tmp_16 = strings_getInstance().gnl_1;
            var tmp_17 = new SortOrderOption(tmp_16, 10, null);
            var tmp_18 = strings_getInstance().dmk_1;
            this_0.m1(listOf([tmp_17, new SortOrderOption(tmp_18, 9, null)]));
            return this_0.f3();
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ContentEntryDetailAttemptsPersonListViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'ContentEntryDetailAttemptsPersonList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryDetailAttemptsPersonListUiState(), destinationName);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.qvp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.rvp_1 = ContentEntryDetailAttemptsPersonListViewModel$attemptsPersonListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.eqx());
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.vqv_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.wvq(this.rvp_1);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.rqn();
    launch(tmp_1, VOID, VOID, ContentEntryDetailAttemptsPersonListViewModel$slambda_0(this, null));
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, ContentEntryDetailAttemptsPersonListViewModel$slambda_2(this, null));
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).hvr = function (entry) {
    Companion_getInstance_116();
    var tmp = to('personUid', entry.sjg_1.f96_1.toString());
    Companion_getInstance_116();
    this.cqn_1.rp6('ContentEntryDetailAttemptsSessionList', mapOf([tmp, to('entryid', this.qvp_1.toString())]));
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).pqw = function (searchText) {
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).qqw = function () {
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).nsz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.wvq(VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  function ContentEntryDetailAttemptsPersonListUiState$_init_$lambda_s6nk3z() {
    return new EmptyPagingSource();
  }
  function ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList, sortOptions, sortOption, showSortOptions) {
    var tmp;
    if (attemptsPersonList === VOID) {
      tmp = ContentEntryDetailAttemptsPersonListUiState$_init_$lambda_s6nk3z;
    } else {
      tmp = attemptsPersonList;
    }
    attemptsPersonList = tmp;
    var tmp_0;
    if (sortOptions === VOID) {
      var tmp_1 = strings_getInstance().gnl_1;
      var tmp_2 = new SortOrderOption(tmp_1, 10, null);
      var tmp_3 = strings_getInstance().dmk_1;
      tmp_0 = listOf([tmp_2, new SortOrderOption(tmp_3, 9, null)]);
    } else {
      tmp_0 = sortOptions;
    }
    sortOptions = tmp_0;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    this.evq_1 = attemptsPersonList;
    this.fvq_1 = sortOptions;
    this.gvq_1 = sortOption;
    this.hvq_1 = showSortOptions;
  }
  protoOf(ContentEntryDetailAttemptsPersonListUiState).ivr = function (attemptsPersonList, sortOptions, sortOption, showSortOptions) {
    return new ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).wvq = function (attemptsPersonList, sortOptions, sortOption, showSortOptions, $super) {
    attemptsPersonList = attemptsPersonList === VOID ? this.evq_1 : attemptsPersonList;
    sortOptions = sortOptions === VOID ? this.fvq_1 : sortOptions;
    sortOption = sortOption === VOID ? this.gvq_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.hvq_1 : showSortOptions;
    return $super === VOID ? this.ivr(attemptsPersonList, sortOptions, sortOption, showSortOptions) : $super.ivr.call(this, attemptsPersonList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList=' + this.evq_1 + ', sortOptions=' + this.fvq_1 + ', sortOption=' + this.gvq_1 + ', showSortOptions=' + this.hvq_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).hashCode = function () {
    var result = hashCode(this.evq_1);
    result = imul(result, 31) + hashCode(this.fvq_1) | 0;
    result = imul(result, 31) + this.gvq_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hvq_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailAttemptsPersonListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailAttemptsPersonListUiState ? other : THROW_CCE();
    if (!equals(this.evq_1, tmp0_other_with_cast.evq_1))
      return false;
    if (!equals(this.fvq_1, tmp0_other_with_cast.fvq_1))
      return false;
    if (!this.gvq_1.equals(tmp0_other_with_cast.gvq_1))
      return false;
    if (!(this.hvq_1 === tmp0_other_with_cast.hvq_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.rvr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).tvr = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.tvr((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = firstOrNull_1(this.rvr_1.wqn().n7d().qg4(this.rvr_1.vvs_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this.rvr_1, completion);
    i.svr_1 = $this$async;
    return i;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.tvr($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.fvt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).hvt = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.hvt((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = firstOrNull_1(this.fvt_1.wqn().v7d().yau(this.fvt_1.uvs_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this.fvt_1, completion);
    i.gvt_1 = $this$async;
    return i;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.hvt($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_145() {
    this.ivt_1 = 'ContentEntryDetailAttemptsSessionList';
  }
  var Companion_instance_194;
  function Companion_getInstance_162() {
    return Companion_instance_194;
  }
  function ContentEntryDetailAttemptsSessionListViewModel$attemptsSessionListPagingSource$lambda(this$0) {
    return function () {
      return this$0.wqn().j7e().qje(this$0.uvs_1, this$0.vvs_1, this$0.sqn(), this$0.vqv_1.t2().lvt_1.tqc_1);
    };
  }
  function ContentEntryDetailAttemptsSessionListViewModel$slambda(this$0, resultContinuation) {
    this.vvt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.xvt_1 = async(this.wvt_1, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_0(this.vvt_1, null));
            var tmp_1 = this;
            tmp_1.yvt_1 = async(this.wvt_1, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_2(this.vvt_1, null));
            this.hd_1 = 1;
            suspendResult = this.xvt_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zvt_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.yvt_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var contentEntry = suspendResult;
            var tmp0_safe_receiver = this.zvt_1;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg8_1;
            var tmp1_safe_receiver = this.zvt_1;
            var tmp_3 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ag9_1;
            var tmp3_elvis_lhs = contentEntry == null ? null : contentEntry.oav_1;
            var combinedTitle = '' + tmp_2 + ' ' + tmp_3 + ' - ' + (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs);
            l$ret$1: do {
              var this_0 = this.vvt_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mq6(VOID, VOID, combinedTitle);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda(this.vvt_1, completion);
    i.wvt_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsSessionListViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'ContentEntryDetailAttemptsSessionList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryDetailAttemptsSessionListUiState(), destinationName);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.uvs_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.vvs_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.wvs_1 = ContentEntryDetailAttemptsSessionListViewModel$attemptsSessionListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsSessionListViewModel.<anonymous>' call
        var nextValue = prevValue.avu(this.wvs_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda_0(this, null));
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).bvu = function (entry) {
    Companion_getInstance_116();
    var tmp = to('personUid', this.vvs_1.toString());
    Companion_getInstance_116();
    var tmp_0 = to('entryid', this.uvs_1.toString());
    Companion_getInstance_116();
    var tmp_1 = to('contextRegistrationIdHi', entry.cji_1.toString());
    Companion_getInstance_116();
    this.cqn_1.rp6('ContentEntryDetailAttemptsStatementList', mapOf([tmp, tmp_0, tmp_1, to('contextRegistrationIdLo', entry.dji_1.toString())]));
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).nsz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsSessionListViewModel.onSortOrderChanged.<anonymous>' call
        var tmp0_attemptsSessionList = this.wvs_1;
        var nextValue = prevValue.avu(tmp0_attemptsSessionList, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).pqw = function (searchText) {
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).qqw = function () {
  };
  function ContentEntryDetailAttemptsSessionListUiState$_init_$lambda_970utq() {
    return new EmptyPagingSource();
  }
  function ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList, sortOptions, sortOption, showSortOptions) {
    var tmp;
    if (attemptsSessionList === VOID) {
      tmp = ContentEntryDetailAttemptsSessionListUiState$_init_$lambda_970utq;
    } else {
      tmp = attemptsSessionList;
    }
    attemptsSessionList = tmp;
    var tmp_0;
    if (sortOptions === VOID) {
      var tmp_1 = strings_getInstance().gnl_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, null);
      var tmp_3 = strings_getInstance().dmk_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, null);
      var tmp_5 = strings_getInstance().emk_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, true);
      var tmp_7 = strings_getInstance().emk_1;
      var tmp_8 = new SortOrderOption(tmp_7, 4, false);
      var tmp_9 = strings_getInstance().fmk_1;
      var tmp_10 = new SortOrderOption(tmp_9, 5, true);
      var tmp_11 = strings_getInstance().fmk_1;
      tmp_0 = listOf([tmp_2, tmp_4, tmp_6, tmp_8, tmp_10, new SortOrderOption(tmp_11, 6, false)]);
    } else {
      tmp_0 = sortOptions;
    }
    sortOptions = tmp_0;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    this.jvt_1 = attemptsSessionList;
    this.kvt_1 = sortOptions;
    this.lvt_1 = sortOption;
    this.mvt_1 = showSortOptions;
  }
  protoOf(ContentEntryDetailAttemptsSessionListUiState).cvu = function (attemptsSessionList, sortOptions, sortOption, showSortOptions) {
    return new ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).avu = function (attemptsSessionList, sortOptions, sortOption, showSortOptions, $super) {
    attemptsSessionList = attemptsSessionList === VOID ? this.jvt_1 : attemptsSessionList;
    sortOptions = sortOptions === VOID ? this.kvt_1 : sortOptions;
    sortOption = sortOption === VOID ? this.lvt_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.mvt_1 : showSortOptions;
    return $super === VOID ? this.cvu(attemptsSessionList, sortOptions, sortOption, showSortOptions) : $super.cvu.call(this, attemptsSessionList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList=' + this.jvt_1 + ', sortOptions=' + this.kvt_1 + ', sortOption=' + this.lvt_1 + ', showSortOptions=' + this.mvt_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).hashCode = function () {
    var result = hashCode(this.jvt_1);
    result = imul(result, 31) + hashCode(this.kvt_1) | 0;
    result = imul(result, 31) + this.lvt_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mvt_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailAttemptsSessionListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailAttemptsSessionListUiState ? other : THROW_CCE();
    if (!equals(this.jvt_1, tmp0_other_with_cast.jvt_1))
      return false;
    if (!equals(this.kvt_1, tmp0_other_with_cast.kvt_1))
      return false;
    if (!this.lvt_1.equals(tmp0_other_with_cast.lvt_1))
      return false;
    if (!(this.mvt_1 === tmp0_other_with_cast.mvt_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.lvu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).nvu = function (verbs, $completion) {
    var tmp = this.ovu(verbs, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.nvu((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.lvu_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vvu(VOID, VOID, VOID, VOID, this.mvu_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).ovu = function (verbs, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this.lvu_1, completion);
    i.mvu_1 = verbs;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (verbs, $completion) {
      return i.nvu(verbs, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.evv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).fvo = function (contentEntry, $completion) {
    var tmp = this.gvo(contentEntry, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.fvo((p1 == null ? true : p1 instanceof ContentEntry) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.evv_1.eqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.fvv_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oav_1;
              var nextValue = prevValue.mq6(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).gvo = function (contentEntry, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this.evv_1, completion);
    i.fvv_1 = contentEntry;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (contentEntry, $completion) {
      return i.fvo(contentEntry, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ovv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ovv_1.wqn().j7e().sje(this.ovv_1.rvw_1, this.ovv_1.svw_1, this.ovv_1.qvw_1, this.ovv_1.tvw_1);
            var tmp_1 = ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_0(this.ovv_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this.ovv_1, completion);
    i.pvv_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.evx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.evx_1.wqn().v7d().yau(this.evx_1.tvw_1);
            var tmp_1 = ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_2(this.evx_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1(this.evx_1, completion);
    i.fvx_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.ovx_1 = $this_launch;
    this.pvx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.ovx_1, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_0(this.pvx_1, null));
          launch(this.ovx_1, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_2(this.pvx_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).l78 = function (completion) {
    return new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda(this.ovx_1, this.pvx_1, completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_formatStatementResponseUseCase__m72qwj($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.uvw_1;
    formatStatementResponseUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_146() {
    this.qvx_1 = 'ContentEntryDetailAttemptsStatementList';
  }
  var Companion_instance_195;
  function Companion_getInstance_163() {
    return Companion_instance_195;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_23(function_0) {
    this.rvx_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_23).t1d = function (value, $completion) {
    return this.rvx_1(value, $completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$attemptsStatementListPagingSource$lambda(this$0) {
    return function () {
      return this$0.wqn().j7e().rje(this$0.rvw_1, this$0.svw_1, this$0.sqn(), this$0.qvw_1, this$0.tvw_1, toQueryLikeParam(this$0.eqn_1.t2().eq6_1.tq5_1), this$0.vqv_1.t2().rvu_1.tqc_1, this$0.vqv_1.t2().uvu_1);
    };
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda(this$0, resultContinuation) {
    this.avy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.avy_1.vqv_1, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda_0(this.bvy_1, this.avy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda(this.avy_1, completion);
    i.bvy_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'ContentEntryDetailAttemptsStatementList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryDetailAttemptsStatementListUiState(), destinationName);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.qvw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('contextRegistrationIdHi');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.rvw_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('contextRegistrationIdLo');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    tmp_1.svw_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_2 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_2 = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs_2 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_2.tvw_1 = tmp1_elvis_lhs_2 == null ? new Long(0, 0) : tmp1_elvis_lhs_2;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(FormatStatementResponseUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.uvw_1 = Instance(this_0, tmp$ret$0, null).a5d(this, formatStatementResponseUseCase$factory());
    var tmp_5 = this;
    tmp_5.vvw_1 = ContentEntryDetailAttemptsStatementListViewModel$attemptsStatementListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.vqv_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.<anonymous>' call
        var nextValue = prevValue.vvu(this.vvw_1);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.dqx(true));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.rqn();
    launch(tmp_6, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda_0(this, null));
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).pqw = function (searchText) {
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).nsz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.onSortOrderChanged.<anonymous>' call
        var tmp0_attemptsStatementList = this.vvw_1;
        var nextValue = prevValue.vvu(tmp0_attemptsStatementList, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).cvy = function (verbEntity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.onVerbFilterToggled.<anonymous>' call
        var nextValue = prevValue.vvu(VOID, VOID, VOID, VOID, VOID, toggle(prevValue.uvu_1, verbEntity.tjj_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).qqw = function () {
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).dvy = function (statementEntity) {
    return _get_formatStatementResponseUseCase__m72qwj(this).npx(statementEntity.njj_1, statementEntity.qjj_1);
  };
  function ContentEntryDetailAttemptsStatementListUiState$_init_$lambda_o4i91x() {
    return new EmptyPagingSource();
  }
  function ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) {
    var tmp;
    if (attemptsStatementList === VOID) {
      tmp = ContentEntryDetailAttemptsStatementListUiState$_init_$lambda_o4i91x;
    } else {
      tmp = attemptsStatementList;
    }
    attemptsStatementList = tmp;
    var tmp_0;
    if (sortOptions === VOID) {
      var tmp_1 = strings_getInstance().hmk_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, true);
      var tmp_3 = strings_getInstance().hmk_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, false);
      var tmp_5 = strings_getInstance().emk_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, false);
      var tmp_7 = strings_getInstance().emk_1;
      tmp_0 = listOf([tmp_2, tmp_4, tmp_6, new SortOrderOption(tmp_7, 4, true)]);
    } else {
      tmp_0 = sortOptions;
    }
    sortOptions = tmp_0;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    availableVerbs = availableVerbs === VOID ? emptyList() : availableVerbs;
    deselectedVerbUids = deselectedVerbUids === VOID ? emptyList() : deselectedVerbUids;
    this.pvu_1 = attemptsStatementList;
    this.qvu_1 = sortOptions;
    this.rvu_1 = sortOption;
    this.svu_1 = showSortOptions;
    this.tvu_1 = availableVerbs;
    this.uvu_1 = deselectedVerbUids;
  }
  protoOf(ContentEntryDetailAttemptsStatementListUiState).evy = function (attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) {
    return new ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids);
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).vvu = function (attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids, $super) {
    attemptsStatementList = attemptsStatementList === VOID ? this.pvu_1 : attemptsStatementList;
    sortOptions = sortOptions === VOID ? this.qvu_1 : sortOptions;
    sortOption = sortOption === VOID ? this.rvu_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.svu_1 : showSortOptions;
    availableVerbs = availableVerbs === VOID ? this.tvu_1 : availableVerbs;
    deselectedVerbUids = deselectedVerbUids === VOID ? this.uvu_1 : deselectedVerbUids;
    return $super === VOID ? this.evy(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) : $super.evy.call(this, attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids);
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList=' + this.pvu_1 + ', sortOptions=' + this.qvu_1 + ', sortOption=' + this.rvu_1 + ', showSortOptions=' + this.svu_1 + ', availableVerbs=' + this.tvu_1 + ', deselectedVerbUids=' + this.uvu_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).hashCode = function () {
    var result = hashCode(this.pvu_1);
    result = imul(result, 31) + hashCode(this.qvu_1) | 0;
    result = imul(result, 31) + this.rvu_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.svu_1) | 0;
    result = imul(result, 31) + hashCode(this.tvu_1) | 0;
    result = imul(result, 31) + hashCode(this.uvu_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailAttemptsStatementListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailAttemptsStatementListUiState ? other : THROW_CCE();
    if (!equals(this.pvu_1, tmp0_other_with_cast.pvu_1))
      return false;
    if (!equals(this.qvu_1, tmp0_other_with_cast.qvu_1))
      return false;
    if (!this.rvu_1.equals(tmp0_other_with_cast.rvu_1))
      return false;
    if (!(this.svu_1 === tmp0_other_with_cast.svu_1))
      return false;
    if (!equals(this.tvu_1, tmp0_other_with_cast.tvu_1))
      return false;
    if (!equals(this.uvu_1, tmp0_other_with_cast.uvu_1))
      return false;
    return true;
  };
  function formatStatementResponseUseCase$factory() {
    return getPropertyCallableRef('formatStatementResponseUseCase', 1, KProperty1, function (receiver) {
      return _get_formatStatementResponseUseCase__m72qwj(receiver);
    }, null);
  }
  function formatStatementResponseUseCase$factory_0() {
    return getPropertyCallableRef('formatStatementResponseUseCase', 1, KProperty1, function (receiver) {
      return _get_formatStatementResponseUseCase__m72qwj(receiver);
    }, null);
  }
  function get_statementSummary(_this__u8e3s4) {
    return new StatementSummaryEntity(_this__u8e3s4.wjg_1, _this__u8e3s4.vjg_1);
  }
  function get_statementSummary_0(_this__u8e3s4) {
    return new StatementSummaryEntity(_this__u8e3s4.iji_1, _this__u8e3s4.hji_1);
  }
  function get_verbDisplayName(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.pjj_1;
    var tmp3_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ajk_1;
    var tmp;
    if (tmp3_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.ojj_1;
      var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ujj_1;
      tmp = tmp2_safe_receiver == null ? null : substringAfterLast(tmp2_safe_receiver, '/');
    } else {
      tmp = tmp3_elvis_lhs;
    }
    var tmp4_elvis_lhs = tmp;
    return tmp4_elvis_lhs == null ? '' : tmp4_elvis_lhs;
  }
  function StatementSummaryEntity(successful, completed) {
    this.fvy_1 = successful;
    this.gvy_1 = completed;
  }
  protoOf(StatementSummaryEntity).toString = function () {
    return 'StatementSummaryEntity(successful=' + this.fvy_1 + ', completed=' + this.gvy_1 + ')';
  };
  protoOf(StatementSummaryEntity).hashCode = function () {
    var result = this.fvy_1 == null ? 0 : getBooleanHashCode(this.fvy_1);
    result = imul(result, 31) + getBooleanHashCode(this.gvy_1) | 0;
    return result;
  };
  protoOf(StatementSummaryEntity).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementSummaryEntity))
      return false;
    var tmp0_other_with_cast = other instanceof StatementSummaryEntity ? other : THROW_CCE();
    if (!(this.fvy_1 == tmp0_other_with_cast.fvy_1))
      return false;
    if (!(this.gvy_1 === tmp0_other_with_cast.gvy_1))
      return false;
    return true;
  };
  function get_descriptionStringRes(_this__u8e3s4) {
    return _this__u8e3s4.fvy_1 === true ? strings_getInstance().gmm_1 : _this__u8e3s4.fvy_1 === false ? strings_getInstance().fmm_1 : _this__u8e3s4.gvy_1 ? strings_getInstance().kmm_1 : strings_getInstance().jmm_1;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.pvy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).rvy = function (it, $completion) {
    var tmp = this.svy(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.rvy((p1 == null ? true : p1 instanceof ContentEntryAndDetail) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.pvy_1.pvz_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.uw0(VOID, this.qvy_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).svy = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.pvy_1, completion);
    i.qvy_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.rvy(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.dw1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).jrh = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.jrh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.ew1_1.v7d().uau(this.dw1_1.dw0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).yny = function (db, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this.dw1_1, completion);
    i.ew1_1 = db;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.jrh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda(it) {
    return it == null ? null : it.tax_1;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.nw1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).rw1 = function (contentEntryVersion, $completion) {
    var tmp = this.sw1(contentEntryVersion, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.rw1((p1 == null ? true : p1 instanceof ContentEntryVersion) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            l$ret$1: do {
              var this_0 = this.nw1_1.pvz_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.uw0(VOID, VOID, this.ow1_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            if (!(this.ow1_1 == null)) {
              this.pw1_1 = _get_checkLocalAvailabilityUseCase__5fhzk8(this.nw1_1);
              if (this.pw1_1 == null) {
                this.qw1_1 = null;
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.pw1_1.qpi(this.ow1_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 1:
            this.qw1_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp1_elvis_lhs = this.qw1_1;
            var isAvailable = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
            var this_1 = this.nw1_1.pvz_1;
            var tmp_0;
            if (isAvailable) {
              tmp_0 = this_1;
            } else {
              tmp_0 = null;
            }

            var tmp2_safe_receiver = tmp_0;
            if (tmp2_safe_receiver == null)
              null;
            else {
              l$ret$3: do {
                while (true) {
                  var prevValue_0 = tmp2_safe_receiver.t2();
                  var nextValue_0 = prevValue_0.uw0(VOID, VOID, VOID, VOID, isAvailable);
                  if (tmp2_safe_receiver.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).sw1 = function (contentEntryVersion, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.nw1_1, completion);
    i.ow1_1 = contentEntryVersion;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (contentEntryVersion, $completion) {
      return i.rw1(contentEntryVersion, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.bw2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).dw2 = function (it, $completion) {
    var tmp = this.ew2(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.dw2((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.bw2_1.pvz_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.uw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.cw2_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ew2 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.bw2_1, completion);
    i.cw2_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.dw2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.nw2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).pw2 = function (it, $completion) {
    var tmp = this.qw2(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.pw2((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.nw2_1.pvz_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.uw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ow2_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).qw2 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.nw2_1, completion);
    i.ow2_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.pw2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.zw2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).bw3 = function (it, $completion) {
    var tmp = this.cw3(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).he = function (p1, $completion) {
    return this.bw3((p1 == null ? true : p1 instanceof OfflineItemAndState) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.zw2_1.pvz_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.uw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.aw3_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).cw3 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this.zw2_1, completion);
    i.aw3_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.bw3(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda_0() {
    return 'Could not get list of jobs';
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.lw3_1 = this$0;
    this.mw3_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.lw3_1.wqn().v7d();
            Companion_getInstance_125();
            var tmp0_safe_receiver = this.mw3_1.ba('courseBlockUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp_0.tau(this.lw3_1.uqm_1, this.lw3_1.cw0_1, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.lw3_1.sqn());
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.lw3_1, null);
            suspendResult = tmp_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this.lw3_1, this.mw3_1, completion);
    i.nw3_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ww3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            Companion_getInstance_169();
            if (this.ww3_1.dw0_1.equals(new Long(1, 0))) {
              var tmp_0 = this;
              tmp_0.yw3_1 = this.ww3_1.aqo().moj(strings_getInstance().sni_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.ww3_1.wqn();
              suspendResult = localFirstThenRepoIfNull(tmp_1, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this.ww3_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.yw3_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var parentTitle = this.yw3_1;
            l$ret$1: do {
              var this_0 = this.ww3_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mq6(VOID, VOID, parentTitle);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this.ww3_1, completion);
    i.xw3_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.hw4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.hw4_1.wqn().i7f().hbq(this.hw4_1.uqm_1);
            var tmp_1 = distinctUntilChangedBy(tmp_0, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda);
            suspendResult = collectLatest(tmp_1, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.hw4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this.hw4_1, completion);
    i.iw4_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.rw4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.rw4_1.uqn().j7f();
            var tmp_1 = tmp_0.mic(this.rw4_1.uqm_1, 1);
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.rw4_1, null);
            suspendResult = tmp_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this.rw4_1, completion);
    i.sw4_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.bw5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.bw5_1.uqn().c7f().obb(this.bw5_1.uqm_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.bw5_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this.bw5_1, completion);
    i.cw5_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.lw5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.lw5_1.uqn().l7f().dfr(this.lw5_1.uqm_1, this.lw5_1.nw5().q64_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this.lw5_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this.lw5_1, completion);
    i.mw5_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this$0, resultContinuation) {
    this.ww5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.yw5_1 = _get_httpClient__2ty1zc_0(this.ww5_1);
            var tmp_1 = this;
            tmp_1.zw5_1 = this.ww5_1.qqn().loa().wnt_1 + 'api/contententryimportjob/importjobs';
            var tmp_2 = this;
            tmp_2.aw6_1 = this.yw5_1;
            var tmp_3 = this;
            tmp_3.bw6_1 = this.aw6_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.zw5_1);
            parameter(this_0, 'contententryuid', this.ww5_1.uqm_1.toString());
            header(this_0, 'cache-control', 'no-store');
            tmp_4.cw6_1 = this_0;
            this.cw6_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.dw6_1 = this.bw6_1;
            var tmp_6 = this;
            tmp_6.ew6_1 = this.cw6_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.ew6_1, this.dw6_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.fw6_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = bodyAsDecodedText(this.fw6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var remoteImportJobsJson = suspendResult;
            var remoteImportJobs = this.ww5_1.m4r().s45(ListSerializer(Companion_instance_40.n4r()), remoteImportJobsJson);
            var tmp$ret$0;
            l$ret$1: do {
              var this_1 = this.ww5_1.pvz_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.uw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, remoteImportJobs);
                if (this_1.y1k(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            var state = tmp$ret$0;
            if (!state.ow0_1.c1()) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.id_1 = 6;
            this.hd_1 = 7;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Error) {
              var e = this.kd_1;
              var tmp_8 = Napier_getInstance();
              tmp_8.k5e(VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda_0);
              this.hd_1 = 7;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            throw this.kd_1;
          case 7:
            this.id_1 = 6;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this.ww5_1, completion);
    i.xw5_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda($this_launch, this$0, $savedStateHandle, resultContinuation) {
    this.ow6_1 = $this_launch;
    this.pw6_1 = this$0;
    this.qw6_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.ow6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this.pw6_1, this.qw6_1, null));
          if (this.pw6_1.cw0_1.equals(new Long(0, 0)) ? !this.pw6_1.dw0_1.equals(new Long(0, 0)) : false) {
            launch(this.ow6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this.pw6_1, null));
          }
          launchSetTitleFromClazzUid(this.pw6_1, this.pw6_1.cw0_1, ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this.pw6_1));
          launch(this.ow6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this.pw6_1, null));
          launch(this.ow6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this.pw6_1, null));
          launch(this.ow6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this.pw6_1, null));
          launch(this.ow6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this.pw6_1, null));
          launch(this.ow6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this.pw6_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).l78 = function (completion) {
    return new ContentEntryDetailOverviewViewModel$slambda$slambda(this.ow6_1, this.pw6_1, this.qw6_1, completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda_0($this_launch, this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda($this_launch, this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this$0, resultContinuation) {
    this.zw6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).ip7 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).he = function (p1, $completion) {
    return this.ip7(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.aw7_1.i7f().gbq(this.zw6_1.uqm_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).yny = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this.zw6_1, completion);
    i.aw7_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ip7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda$lambda() {
    return 'ContentEntryDetailoverview: could not dismiss remote error message';
  }
  function _get_makeContentEntryAvailableOfflineUseCase__dvw4p1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qvz_1;
    makeContentEntryAvailableOfflineUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelDownloadUseCase__t8wbc4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rvz_1;
    cancelDownloadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_defaultLaunchContentEntryUseCase__lyydsx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.uvz_1;
    defaultLaunchContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchXapiUseCase__jmtlap($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vvz_1;
    launchXapiUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchEpubUseCase__sunqd7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wvz_1;
    launchEpubUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelImportContentEntryUseCase__kqom1e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yvz_1;
    cancelImportContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelRemoteContentEntryImportUseCase__8yb0xk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zvz_1;
    cancelRemoteContentEntryImportUseCase$factory_0();
    return this_0.t2();
  }
  function _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.aw0_1;
    dismissRemoteContentEntryImportErrorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bw0_1;
    httpClient$factory_2();
    return this_0.t2();
  }
  function _get_checkLocalAvailabilityUseCase__5fhzk8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ew0_1;
    checkLocalAvailabilityUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_147() {
    this.bw7_1 = 'ContentEntryDetailOverviewView';
    this.cw7_1 = 'target';
  }
  var Companion_instance_196;
  function Companion_getInstance_164() {
    return Companion_instance_196;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_24(function_0) {
    this.dw7_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_24).t1d = function (value, $completion) {
    return this.dw7_1(value, $completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.mw7_1 = this$0;
    this.nw7_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.mw7_1.pvz_1, ContentEntryDetailOverviewViewModel$slambda$slambda_0(this.ow7_1, this.mw7_1, this.nw7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda(this.mw7_1, this.nw7_1, completion);
    i.ow7_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this$0, resultContinuation) {
    this.xw7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 6;
            this.id_1 = 5;
            this.xw7_1.cqo(Companion_getInstance_97().tq6_1);
            Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen launched');
            l$ret$1: do {
              var this_0 = this.xw7_1.pvz_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.uw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            var tmp_0 = this.xw7_1.wqn();
            suspendResult = localFirstThenRepoIfNull(tmp_0, ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this.xw7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.aw8_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.xw7_1.xvz_1;
            var tmp_2;
            if (tmp0_safe_receiver == null) {
              tmp_2 = null;
            } else {
              tmp_2 = Companion_instance_99.vmg(tmp0_safe_receiver);
            }

            var tmp1_elvis_lhs = tmp_2;
            tmp_1.bw8_1 = tmp1_elvis_lhs == null ? LinkTarget_DEFAULT_getInstance() : tmp1_elvis_lhs;
            if (!(this.aw8_1 == null)) {
              var tmp_3 = this;
              var tmp2_subject = this.aw8_1.oax_1;
              var tmp_4;
              if (tmp2_subject === 'xapi') {
                tmp_4 = _get_launchXapiUseCase__jmtlap(this.xw7_1);
              } else {
                if (tmp2_subject === 'epub') {
                  tmp_4 = _get_launchEpubUseCase__sunqd7(this.xw7_1);
                } else {
                  tmp_4 = null;
                }
              }
              tmp_3.cw8_1 = tmp_4;
              var tmp_5 = this;
              var tmp3_elvis_lhs = this.cw8_1;
              tmp_5.dw8_1 = tmp3_elvis_lhs == null ? _get_defaultLaunchContentEntryUseCase__lyydsx(this.xw7_1) : tmp3_elvis_lhs;
              Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen : Launching using ' + this.dw8_1);
              this.hd_1 = 3;
              Companion_getInstance_125();
              var tmp4_safe_receiver = this.xw7_1.aqn_1.ba('courseBlockUid');
              var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
              suspendResult = this.dw8_1.sp6(this.aw8_1, this.xw7_1.cqn_1, this.xw7_1.cw0_1, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs, this.bw8_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen: latestContentEntryVersion = null');
              this.xw7_1.yqn().bq7(new Snack(this.xw7_1.aqo().moj(strings_getInstance().qnm_1)));
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.zw7_1 = Unit_instance;
            this.id_1 = 7;
            this.hd_1 = 8;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Error) {
              var e = this.kd_1;
              var tmp_7 = this;
              this.xw7_1.yqn().bq7(new Snack(this.xw7_1.aqo().moj(strings_getInstance().qmi_1) + (':' + e.message)));
              Napier_getInstance().m5e('ContentEntryDetailOverview: Exception opening content', e);
              tmp_7.zw7_1 = Unit_instance;
              this.id_1 = 7;
              this.hd_1 = 8;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            this.id_1 = 7;
            var t = this.kd_1;
            this.xw7_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$5: do {
              var this_1 = this.xw7_1.pvz_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.uw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 7:
            throw this.kd_1;
          case 8:
            this.id_1 = 7;
            this.xw7_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$7: do {
              var this_2 = this.xw7_1.pvz_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.uw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 7) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this.xw7_1, completion);
    i.yw7_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this$0, $jobUid, resultContinuation) {
    this.mw8_1 = this$0;
    this.nw8_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_cancelRemoteContentEntryImportUseCase__8yb0xk(this.mw8_1).vp4(this.nw8_1, this.mw8_1.sqn(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.mw8_1.yqn().bq7(new Snack(this.mw8_1.aqo().moj(strings_getInstance().jmj_1)));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              this.mw8_1.yqn().bq7(new Snack(this.mw8_1.aqo().moj(strings_getInstance().qmi_1)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this.mw8_1, this.nw8_1, completion);
    i.ow8_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this$0, $jobUid, resultContinuation) {
    this.xw8_1 = this$0;
    this.yw8_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(this.xw8_1).vp4(this.yw8_1, this.xw8_1.sqn(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              var tmp_1 = Napier_getInstance();
              tmp_1.o5e(VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda$lambda);
              this.xw8_1.yqn().bq7(new Snack(this.xw8_1.aqo().moj(strings_getInstance().qmi_1)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this.xw8_1, this.yw8_1, completion);
    i.zw8_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'ContentEntryDetailOverviewView');
    this.pvz_1 = MutableStateFlow(new ContentEntryDetailOverviewUiState());
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(MakeContentEntryAvailableOfflineUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.qvz_1 = Instance(this_0, tmp$ret$0, null).a5d(this, makeContentEntryAvailableOfflineUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(CancelDownloadUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.rvz_1 = Instance(this_1, tmp$ret$2, null).a5d(this, cancelDownloadUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(NodeIdAndAuth), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.svz_1 = Instance(this_2, tmp$ret$4, null).a5d(this, nodeIdAndAuth$factory());
    this.tvz_1 = asStateFlow(this.pvz_1);
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_3 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(LaunchContentEntryVersionUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.uvz_1 = Instance(this_3, tmp$ret$6, null).a5d(this, defaultLaunchContentEntryUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_4 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(LaunchXapiUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.vvz_1 = InstanceOrNull(this_4, tmp$ret$8, null).a5d(this, launchXapiUseCase$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_5 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(LaunchEpubUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.wvz_1 = InstanceOrNull(this_5, tmp$ret$10, null).a5d(this, launchEpubUseCase$factory());
    this.xvz_1 = savedStateHandle.ba('target');
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_6 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(CancelImportContentEntryUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.yvz_1 = InstanceOrNull(this_6, tmp$ret$12, null).a5d(this, cancelImportContentEntryUseCase$factory());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_7 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.zvz_1 = Instance(this_7, tmp$ret$14, null).a5d(this, cancelRemoteContentEntryImportUseCase$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_8 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.aw0_1 = Instance(this_8, tmp$ret$16, null).a5d(this, dismissRemoteContentEntryImportErrorUseCase$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.bw0_1 = Instance(di, tmp$ret$18, null).a5d(this, httpClient$factory_1());
    var tmp_19 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_19.cw0_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_20 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('parentUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_20.dw0_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_21 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_9 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_22 = typeToken(createKType(getKClass(CheckContentLocalAvailabilityUseCase), arrayOf([]), false));
    var tmp$ret$20 = isInterface(tmp_22, TypeToken) ? tmp_22 : THROW_CCE();
    tmp_21.ew0_1 = InstanceOrNull(this_9, tmp$ret$20, null).a5d(this, checkLocalAvailabilityUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_10 = this.pvz_1;
      while (true) {
        var prevValue = this_10.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>' call
        var nextValue = prevValue.uw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.sqn());
        if (this_10.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_23 = this.rqn();
    launch(tmp_23, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ContentEntryDetailOverviewViewModel).nw5 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.svz_1;
    nodeIdAndAuth$factory_0();
    return this_0.t2();
  };
  protoOf(ContentEntryDetailOverviewViewModel).aw9 = function () {
    Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen');
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).bw9 = function (jobUid) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this, jobUid, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).cw9 = function (jobUid) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda_0(this, jobUid, null));
  };
  function ContentEntryDetailOverviewUiState(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, availableLocally) {
    scoreProgress = scoreProgress === VOID ? null : scoreProgress;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? null : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? null : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? false : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? false : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? false : translationVisibile;
    availableTranslations = availableTranslations === VOID ? emptyList() : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? emptyList() : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? emptyList() : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? emptyList() : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? null : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? true : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    availableLocally = availableLocally === VOID ? false : availableLocally;
    this.fw0_1 = scoreProgress;
    this.gw0_1 = contentEntry;
    this.hw0_1 = latestContentEntryVersion;
    this.iw0_1 = contentEntryButtons;
    this.jw0_1 = locallyAvailable;
    this.kw0_1 = markCompleteVisible;
    this.lw0_1 = translationVisibile;
    this.mw0_1 = availableTranslations;
    this.nw0_1 = activeImportJobs;
    this.ow0_1 = remoteImportJobs;
    this.pw0_1 = activeUploadJobs;
    this.qw0_1 = offlineItemAndState;
    this.rw0_1 = openButtonEnabled;
    this.sw0_1 = activeUserPersonUid;
    this.tw0_1 = availableLocally;
  }
  protoOf(ContentEntryDetailOverviewUiState).dw9 = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.gw0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hax_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rav_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).ew9 = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.gw0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hax_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.sav_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).fw9 = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.gw0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hax_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.uav_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).gw9 = function () {
    return false;
  };
  protoOf(ContentEntryDetailOverviewUiState).hw9 = function () {
    return !(this.fw0_1 == null);
  };
  protoOf(ContentEntryDetailOverviewUiState).iw9 = function () {
    var tmp0_safe_receiver = this.hw0_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewUiState.<get-compressedSizeVisible>.<anonymous>' call
      tmp = (tmp0_safe_receiver.uax_1.c7(new Long(0, 0)) > 0 ? tmp0_safe_receiver.uax_1.c7(new Long(0, 0)) > 0 : false) ? tmp0_safe_receiver.uax_1.c7(tmp0_safe_receiver.vax_1) < 0 : false;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).jw9 = function () {
    var tmp0_safe_receiver = this.hw0_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewUiState.<get-sizeVisible>.<anonymous>' call
      tmp = tmp0_safe_receiver.uax_1.c7(new Long(0, 0)) > 0;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).kw9 = function (importJobProgress) {
    return importJobProgress.ubb_1.equals(this.sw0_1);
  };
  protoOf(ContentEntryDetailOverviewUiState).lw9 = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, availableLocally) {
    return new ContentEntryDetailOverviewUiState(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, availableLocally);
  };
  protoOf(ContentEntryDetailOverviewUiState).uw0 = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, availableLocally, $super) {
    scoreProgress = scoreProgress === VOID ? this.fw0_1 : scoreProgress;
    contentEntry = contentEntry === VOID ? this.gw0_1 : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? this.hw0_1 : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? this.iw0_1 : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? this.jw0_1 : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? this.kw0_1 : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? this.lw0_1 : translationVisibile;
    availableTranslations = availableTranslations === VOID ? this.mw0_1 : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? this.nw0_1 : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? this.ow0_1 : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? this.pw0_1 : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? this.qw0_1 : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? this.rw0_1 : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.sw0_1 : activeUserPersonUid;
    availableLocally = availableLocally === VOID ? this.tw0_1 : availableLocally;
    return $super === VOID ? this.lw9(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, availableLocally) : $super.lw9.call(this, scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, availableLocally);
  };
  protoOf(ContentEntryDetailOverviewUiState).toString = function () {
    return 'ContentEntryDetailOverviewUiState(scoreProgress=' + this.fw0_1 + ', contentEntry=' + this.gw0_1 + ', latestContentEntryVersion=' + this.hw0_1 + ', contentEntryButtons=' + this.iw0_1 + ', locallyAvailable=' + this.jw0_1 + ', markCompleteVisible=' + this.kw0_1 + ', translationVisibile=' + this.lw0_1 + ', availableTranslations=' + this.mw0_1 + ', activeImportJobs=' + this.nw0_1 + ', remoteImportJobs=' + this.ow0_1 + ', activeUploadJobs=' + this.pw0_1 + ', offlineItemAndState=' + this.qw0_1 + ', openButtonEnabled=' + this.rw0_1 + ', activeUserPersonUid=' + this.sw0_1.toString() + ', availableLocally=' + this.tw0_1 + ')';
  };
  protoOf(ContentEntryDetailOverviewUiState).hashCode = function () {
    var result = this.fw0_1 == null ? 0 : this.fw0_1.hashCode();
    result = imul(result, 31) + (this.gw0_1 == null ? 0 : this.gw0_1.hashCode()) | 0;
    result = imul(result, 31) + (this.hw0_1 == null ? 0 : this.hw0_1.hashCode()) | 0;
    result = imul(result, 31) + (this.iw0_1 == null ? 0 : hashCode(this.iw0_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jw0_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kw0_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lw0_1) | 0;
    result = imul(result, 31) + hashCode(this.mw0_1) | 0;
    result = imul(result, 31) + hashCode(this.nw0_1) | 0;
    result = imul(result, 31) + hashCode(this.ow0_1) | 0;
    result = imul(result, 31) + hashCode(this.pw0_1) | 0;
    result = imul(result, 31) + (this.qw0_1 == null ? 0 : this.qw0_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rw0_1) | 0;
    result = imul(result, 31) + this.sw0_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tw0_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.fw0_1, tmp0_other_with_cast.fw0_1))
      return false;
    if (!equals(this.gw0_1, tmp0_other_with_cast.gw0_1))
      return false;
    if (!equals(this.hw0_1, tmp0_other_with_cast.hw0_1))
      return false;
    if (!equals(this.iw0_1, tmp0_other_with_cast.iw0_1))
      return false;
    if (!(this.jw0_1 === tmp0_other_with_cast.jw0_1))
      return false;
    if (!(this.kw0_1 === tmp0_other_with_cast.kw0_1))
      return false;
    if (!(this.lw0_1 === tmp0_other_with_cast.lw0_1))
      return false;
    if (!equals(this.mw0_1, tmp0_other_with_cast.mw0_1))
      return false;
    if (!equals(this.nw0_1, tmp0_other_with_cast.nw0_1))
      return false;
    if (!equals(this.ow0_1, tmp0_other_with_cast.ow0_1))
      return false;
    if (!equals(this.pw0_1, tmp0_other_with_cast.pw0_1))
      return false;
    if (!equals(this.qw0_1, tmp0_other_with_cast.qw0_1))
      return false;
    if (!(this.rw0_1 === tmp0_other_with_cast.rw0_1))
      return false;
    if (!this.sw0_1.equals(tmp0_other_with_cast.sw0_1))
      return false;
    if (!(this.tw0_1 === tmp0_other_with_cast.tw0_1))
      return false;
    return true;
  };
  function makeContentEntryAvailableOfflineUseCase$factory() {
    return getPropertyCallableRef('makeContentEntryAvailableOfflineUseCase', 1, KProperty1, function (receiver) {
      return _get_makeContentEntryAvailableOfflineUseCase__dvw4p1(receiver);
    }, null);
  }
  function cancelDownloadUseCase$factory() {
    return getPropertyCallableRef('cancelDownloadUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelDownloadUseCase__t8wbc4(receiver);
    }, null);
  }
  function nodeIdAndAuth$factory() {
    return getPropertyCallableRef('nodeIdAndAuth', 1, KProperty1, function (receiver) {
      return receiver.nw5();
    }, null);
  }
  function defaultLaunchContentEntryUseCase$factory() {
    return getPropertyCallableRef('defaultLaunchContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_defaultLaunchContentEntryUseCase__lyydsx(receiver);
    }, null);
  }
  function launchXapiUseCase$factory() {
    return getPropertyCallableRef('launchXapiUseCase', 1, KProperty1, function (receiver) {
      return _get_launchXapiUseCase__jmtlap(receiver);
    }, null);
  }
  function launchEpubUseCase$factory() {
    return getPropertyCallableRef('launchEpubUseCase', 1, KProperty1, function (receiver) {
      return _get_launchEpubUseCase__sunqd7(receiver);
    }, null);
  }
  function cancelImportContentEntryUseCase$factory() {
    return getPropertyCallableRef('cancelImportContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelImportContentEntryUseCase__kqom1e(receiver);
    }, null);
  }
  function cancelRemoteContentEntryImportUseCase$factory() {
    return getPropertyCallableRef('cancelRemoteContentEntryImportUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelRemoteContentEntryImportUseCase__8yb0xk(receiver);
    }, null);
  }
  function dismissRemoteContentEntryImportErrorUseCase$factory() {
    return getPropertyCallableRef('dismissRemoteContentEntryImportErrorUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(receiver);
    }, null);
  }
  function httpClient$factory_1() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_0(receiver);
    }, null);
  }
  function checkLocalAvailabilityUseCase$factory() {
    return getPropertyCallableRef('checkLocalAvailabilityUseCase', 1, KProperty1, function (receiver) {
      return _get_checkLocalAvailabilityUseCase__5fhzk8(receiver);
    }, null);
  }
  function makeContentEntryAvailableOfflineUseCase$factory_0() {
    return getPropertyCallableRef('makeContentEntryAvailableOfflineUseCase', 1, KProperty1, function (receiver) {
      return _get_makeContentEntryAvailableOfflineUseCase__dvw4p1(receiver);
    }, null);
  }
  function cancelDownloadUseCase$factory_0() {
    return getPropertyCallableRef('cancelDownloadUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelDownloadUseCase__t8wbc4(receiver);
    }, null);
  }
  function nodeIdAndAuth$factory_0() {
    return getPropertyCallableRef('nodeIdAndAuth', 1, KProperty1, function (receiver) {
      return receiver.nw5();
    }, null);
  }
  function defaultLaunchContentEntryUseCase$factory_0() {
    return getPropertyCallableRef('defaultLaunchContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_defaultLaunchContentEntryUseCase__lyydsx(receiver);
    }, null);
  }
  function launchXapiUseCase$factory_0() {
    return getPropertyCallableRef('launchXapiUseCase', 1, KProperty1, function (receiver) {
      return _get_launchXapiUseCase__jmtlap(receiver);
    }, null);
  }
  function launchEpubUseCase$factory_0() {
    return getPropertyCallableRef('launchEpubUseCase', 1, KProperty1, function (receiver) {
      return _get_launchEpubUseCase__sunqd7(receiver);
    }, null);
  }
  function cancelImportContentEntryUseCase$factory_0() {
    return getPropertyCallableRef('cancelImportContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelImportContentEntryUseCase__kqom1e(receiver);
    }, null);
  }
  function cancelRemoteContentEntryImportUseCase$factory_0() {
    return getPropertyCallableRef('cancelRemoteContentEntryImportUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelRemoteContentEntryImportUseCase__8yb0xk(receiver);
    }, null);
  }
  function dismissRemoteContentEntryImportErrorUseCase$factory_0() {
    return getPropertyCallableRef('dismissRemoteContentEntryImportErrorUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(receiver);
    }, null);
  }
  function httpClient$factory_2() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_0(receiver);
    }, null);
  }
  function checkLocalAvailabilityUseCase$factory_0() {
    return getPropertyCallableRef('checkLocalAvailabilityUseCase', 1, KProperty1, function (receiver) {
      return _get_checkLocalAvailabilityUseCase__5fhzk8(receiver);
    }, null);
  }
  function get_progress(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4.rbb_1.c7(new Long(0, 0)) > 0) {
      tmp = _this__u8e3s4.qbb_1.zc() / _this__u8e3s4.rbb_1.zc();
    } else {
      tmp = 0.0;
    }
    return tmp;
  }
  function ContentEntryEditViewModel$slambda$slambda$lambda($newContentEntryUid, this$0, $savedStateHandle) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.nav_1 = $newContentEntryUid;
      var tmp;
      if (this$0.owa_1) {
        var tmp_0 = $this$shallowCopy;
        tmp_0.jaw_1 = 2;
        var tmp_1 = $this$shallowCopy;
        Companion_getInstance_125();
        var tmp0_safe_receiver = $savedStateHandle.ba('clazzUid');
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        tmp_1.iaw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
        tmp = Unit_instance;
      } else {
        var tmp_2 = $this$shallowCopy;
        tmp_2.jaw_1 = 1;
        $this$shallowCopy.iaw_1 = this$0.sqn();
        tmp = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda($newDecription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.pav_1 = $newDecription;
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.xwa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).qqa = function (it, $completion) {
    var tmp = this.rqa(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.ywa_1.xq9_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newDecription = tmp_1;
          var tmp1_safe_receiver = this.xwa_1.lwa_1.t2().zwa_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ok7_1;
          var tmp_2;
          if (tmp2_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_8(tmp2_safe_receiver, ContentEntryEditViewModel$slambda$slambda$slambda$lambda(newDecription));
          }
          this.xwa_1.lwb(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).rqa = function (it, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this.xwa_1, completion);
    i.ywa_1 = it;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.qqa(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack) {
    return function (it) {
      return it.wog_1 === $newSubtitleTrack.wog_1;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda_0($newSubtitleTrack) {
    return function (prev) {
      return replaceOrAppend(prev, $newSubtitleTrack, ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack));
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.uwb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).qqa = function (navResult, $completion) {
    var tmp = this.rqa(navResult, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.vwb_1.xq9_1;
          var tmp0_elvis_lhs = tmp_0 instanceof SubtitleTrack ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newSubtitleTrack = tmp_1;
          updateSubtitles(this.uwb_1, ContentEntryEditViewModel$slambda$slambda$slambda$lambda_0(newSubtitleTrack));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).rqa = function (navResult, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this.uwb_1, completion);
    i.vwb_1 = navResult;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (navResult, $completion) {
      return i.qqa(navResult, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.ewc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda).iwc = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.iwc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.fwc_1;
            var tmp_1;
            if (!this.ewc_1.iqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.gwc_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7d();
            if (this.gwc_1 == null) {
              this.hwc_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.gwc_1.sau(this.ewc_1.iqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hwc_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp2_safe_receiver = this.hwc_1;
            var tmp_2;
            if (tmp2_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var tmp_3;
              if (!(tmp2_safe_receiver.bax_1 == null)) {
                var tmp_4 = tmp2_safe_receiver.bax_1;
                var tmp0_elvis_lhs = tmp2_safe_receiver.cax_1;
                tmp_3 = new ContentEntryAndContentJob(tmp_4, VOID, VOID, tmp0_elvis_lhs == null ? new ContentEntryPicture2(this.ewc_1.iqt_1) : tmp0_elvis_lhs);
              } else {
                tmp_3 = null;
              }
              tmp_2 = tmp_3;
            }

            return tmp_2;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).yny = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this.ewc_1, completion);
    i.fwc_1 = db;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.iwc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.rwc_1 = this$0;
    this.swc_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).uwc = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.uwc($completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = get_doorPrimaryKeyManager(this.rwc_1.uqn());
            tmp_0.twc_1 = tmp_1.n62(42);
            this.hd_1 = 1;
            suspendResult = this.rwc_1.fqo(this.swc_1, 'metadata', Companion_instance_81.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var importedMetaData = suspendResult;
            var tmp_2;
            if (!(importedMetaData == null)) {
              var tmp0_safe_receiver = importedMetaData.joh_1;
              var pictureUri = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fax_1;
              if (!(pictureUri == null)) {
                Companion_getInstance_123();
                this.swc_1.dqj('initPicUri', '');
              }
              var tmp_3 = shallowCopy_8(importedMetaData.goh_1, ContentEntryEditViewModel$slambda$slambda$lambda(this.twc_1, this.rwc_1, this.swc_1));
              var tmp1_cjiPluginId = importedMetaData.hoh_1;
              var tmp2_sourceUri = importedMetaData.goh_1.wav_1;
              var tmp3_cjiOriginalFilename = importedMetaData.ioh_1;
              var tmp4_cjiOwnerPersonUid = this.rwc_1.sqn();
              var tmp_4 = new ContentEntryImportJob(VOID, tmp2_sourceUri, tmp3_cjiOriginalFilename, this.twc_1, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_cjiPluginId, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_cjiOwnerPersonUid);
              var tmp5_safe_receiver = importedMetaData.joh_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.eki(this.twc_1);
              var this_0 = new ContentEntryAndContentJob(tmp_3, VOID, tmp_4, tmp6_elvis_lhs == null ? new ContentEntryPicture2(this.twc_1) : tmp6_elvis_lhs);
              var tmp_5 = this.rwc_1.aqo();
              var tmp_6 = strings_getInstance().knc_1;
              var tmp0_elvis_lhs = importedMetaData.ioh_1;
              var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? importedMetaData.goh_1.wav_1 : tmp0_elvis_lhs;
              this.swc_1.dqj('savedTitle', tmp_5.noj(tmp_6, [tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs]));
              tmp_2 = this_0;
            } else {
              var this_1 = new ContentEntry();
              this_1.nav_1 = this.twc_1;
              var tmp_7 = this_1;
              var tmp0_safe_receiver_0 = this.swc_1.ba('leaf');
              tmp_7.caw_1 = (tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0)) === true;
              this_1.iaw_1 = this.rwc_1.sqn();
              tmp_2 = new ContentEntryAndContentJob(this_1, VOID, VOID, new ContentEntryPicture2(this.twc_1));
            }

            return tmp_2;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ContentEntryEditViewModel$slambda$slambda_1(this.rwc_1, this.swc_1, completion);
  };
  function ContentEntryEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.uwc($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.lwa_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp1_safe_receiver = it == null ? null : it.qk7_1;
          var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramSubtitles(tmp1_safe_receiver, this$0.m4r());
          var nextValue = prevValue.vwc(it, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.ewd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ewd_1.eqo(this.ewd_1.xqn(), 'contentEntryDesc');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_0(this.ewd_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_25(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_3(this.ewd_1, completion);
    i.fwd_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.owd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.owd_1.eqo(this.owd_1.xqn(), 'subtitleKey');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_2(this.owd_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_25(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_5(this.owd_1, completion);
    i.pwd_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function updateSubtitles($this, function_0) {
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = $this.lwa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.updateSubtitles.<anonymous>' call
        var updatedSubtitles = function_0(prevValue.kwb_1);
        var tmp0_safe_receiver = prevValue.zwa_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qk7_1;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramMap(tmp1_safe_receiver, $this.m4r());
        var prevContentJobParamMap = tmp2_elvis_lhs == null ? emptyMap() : tmp2_elvis_lhs;
        // Inline function 'kotlin.also' call
        var this_1 = toMutableMap(prevContentJobParamMap);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.updateSubtitles.<anonymous>.<anonymous>' call
        // Inline function 'kotlin.collections.set' call
        var key = 'subtitles';
        var value = $this.m4r().r45(ListSerializer(Companion_instance_80.n4r()), updatedSubtitles);
        this_1.s(key, value);
        var contentJobParam = this_1;
        var tmp4_safe_receiver = prevValue.zwa_1;
        var tmp;
        if (tmp4_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp3_safe_receiver = prevValue.zwa_1.qk7_1;
          tmp = tmp4_safe_receiver.tk7(VOID, VOID, tmp3_safe_receiver == null ? null : tmp3_safe_receiver.tkh(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.m4r().r45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), contentJobParam)));
        }
        var tmp5_entity = tmp;
        var nextValue = prevValue.vwc(tmp5_entity, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, updatedSubtitles);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$2 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$2;
    scheduleEntityCommit($this, updatedState.zwa_1);
  }
  function scheduleEntityCommit($this, entity) {
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_41.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = $this.hqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = $this;
    var tmp_0 = $this.rqn();
    tmp.hqt_1 = launch(tmp_0, VOID, VOID, ContentEntryEditViewModel$scheduleEntityCommit$slambda_0(commitDelay, entity, $this, key, serializer, null));
  }
  function hasErrors_2(_this__u8e3s4, $this) {
    return !(_this__u8e3s4.gwb_1 == null);
  }
  function Companion_148() {
    this.qwd_1 = 'leaf';
    this.rwd_1 = 'courseBlock';
    this.swd_1 = 'ContentEntryEdit';
    this.twd_1 = 'metadata';
    this.uwd_1 = 'savedTitle';
    this.vwd_1 = 'goToOnContentEntryDone';
    this.wwd_1 = 'contentEntryDesc';
    this.xwd_1 = 'subtitleKey';
    this.ywd_1 = 1;
    this.zwd_1 = 2;
  }
  var Companion_instance_197;
  function Companion_getInstance_165() {
    return Companion_instance_197;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_25(function_0) {
    this.awe_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_25).t1d = function (value, $completion) {
    return this.awe_1(value, $completion);
  };
  function ContentEntryEditViewModel$slambda(this$0, resultContinuation) {
    this.jwe_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda).msc = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.jwe_1.owa_1) {
              this.lwe_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = this.kwe_1.p7f();
              var tmp_1 = this.jwe_1.sqn();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.ti0(tmp_1, new Long(65536, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.lwe_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.lwe_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda).yny = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda(this.jwe_1, completion);
    i.kwe_1 = db;
    return i;
  };
  function ContentEntryEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.msc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.uwe_1 = this$0;
    this.vwe_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_41.n4r();
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda_0(this.uwe_1, null);
            var tmp_2 = ContentEntryEditViewModel$slambda$slambda_2(this.uwe_1, this.vwe_1, null);
            suspendResult = this.uwe_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ContentEntryEditViewModel$slambda$lambda(this.uwe_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            Companion_getInstance_123();
            var tmp1_safe_receiver = it == null ? null : it.rk7_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.fax_1;
            setIfNoValueSetYet(this.vwe_1, 'initPicUri', tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            var tmp0_safe_receiver = this.uwe_1.lwa_1.t2().zwa_1;
            var tmp1_safe_receiver_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ok7_1;
            var isLeaf = (tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.caw_1) === true;
            var savedStateTitle = this.vwe_1.ba('savedTitle');
            var title = !(savedStateTitle == null) ? savedStateTitle : (this.uwe_1.iqt_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.uwe_1.aqo().moj(strings_getInstance().kna_1) : (!this.uwe_1.iqt_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.uwe_1.aqo().moj(strings_getInstance().qnl_1) : this.uwe_1.aqo().moj(strings_getInstance().pnl_1);
            l$ret$1: do {
              var this_0 = this.uwe_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.uwe_1.aqo();
                var tmp0_subject = this.uwe_1.nwa_1;
                var tmp_4 = tmp_3.moj(tmp0_subject === 1 ? strings_getInstance().vmj_1 : tmp0_subject === 2 ? strings_getInstance().qmr_1 : strings_getInstance().en3_1);
                var nextValue = prevValue.mq6(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_4, VOID, ContentEntryEditViewModel$onClickSave$ref(this.uwe_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.uwe_1.lwa_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.vwc(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.wwe_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_4(this.uwe_1, null));
            launch(this.wwe_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_6(this.uwe_1, null));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ContentEntryEditViewModel$slambda_1(this.uwe_1, this.vwe_1, completion);
    i.wwe_1 = $this$launchIfHasPermission;
    return i;
  };
  function ContentEntryEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$scheduleEntityCommit$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.fwf_1 = $commitDelay;
    this.gwf_1 = $entity;
    this.hwf_1 = $this;
    this.iwf_1 = $key;
    this.jwf_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.fwf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.gwf_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.hwf_1.gqo(this.hwf_1.aqn_1, this.iwf_1, this.jwf_1, this.gwf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$scheduleEntityCommit$slambda(this.fwf_1, this.gwf_1, this.hwf_1, this.iwf_1, this.jwf_1, completion);
    i.kwf_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$scheduleEntityCommit$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ContentEntryEditViewModel$scheduleEntityCommit$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda($subtitleTrack) {
    return function (prev) {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = prev.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickDeleteSubtitleTrack.<anonymous>.<anonymous>' call
        if (!(element.wog_1 === $subtitleTrack.wog_1)) {
          destination.i1(element);
        }
      }
      return destination;
    };
  }
  function ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    this.twf_1 = this$0;
    this.uwf_1 = $contentEntryVal;
    this.vwf_1 = $entityVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            Companion_getInstance_125();
            var tmp0_safe_receiver = this.twf_1.aqn_1.ba('parentUid');
            tmp_0.xwf_1 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            this.hd_1 = 1;
            var tmp_1 = this.twf_1.iqt_1.equals(new Long(0, 0)) ? this.xwf_1 : null;
            Companion_getInstance_123();
            suspendResult = this.twf_1.jwa_1.lpb(this.uwf_1, tmp_1, this.vwf_1.rk7_1, this.twf_1.aqn_1.ba('initPicUri'), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ywf_1 = this.vwf_1.qk7_1;
            if (!(this.ywf_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.twf_1.kwa_1.sp5(this.ywf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            Companion_getInstance_125();
            var popUpToOnFinish = this.twf_1.aqn_1.ba('popUpToOnFinish');
            if (!(this.twf_1.bqo() == null)) {
              this.twf_1.lqt(this.uwf_1);
            } else {
              this.twf_1.cqn_1.mq9(popUpToOnFinish == null ? this.twf_1.bqn_1 : popUpToOnFinish, true);
            }

            if (hasErrors_2(this.twf_1.lwa_1.t2(), this.twf_1)) {
              this.twf_1.cqo(Companion_getInstance_97().uq6_1);
              l$ret$1: do {
                var this_0 = this.twf_1.lwa_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.vwc(VOID, VOID, VOID, VOID, true);
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              return Unit_instance;
            }

            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$onClickSave$slambda(this.twf_1, this.uwf_1, this.vwf_1, completion);
    i.wwf_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$onClickSave$slambda_0(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    var i = new ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel(di, savedStateHandle, saveContentEntryUseCase, enqueueContentEntryImportUseCase) {
    var tmp;
    if (saveContentEntryUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      tmp = tmp_0.d58(tmp$ret$0, null);
    } else {
      tmp = saveContentEntryUseCase;
    }
    saveContentEntryUseCase = tmp;
    var tmp_2;
    if (enqueueContentEntryImportUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0_0 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      tmp_2 = tmp_3.d58(tmp$ret$0_0, null);
    } else {
      tmp_2 = enqueueContentEntryImportUseCase;
    }
    enqueueContentEntryImportUseCase = tmp_2;
    UstadEditViewModel.call(this, di, savedStateHandle, 'ContentEntryEdit');
    this.jwa_1 = saveContentEntryUseCase;
    this.kwa_1 = enqueueContentEntryImportUseCase;
    this.lwa_1 = MutableStateFlow(new ContentEntryEditUiState());
    this.mwa_1 = asStateFlow(this.lwa_1);
    var tmp_5 = this;
    var tmp0_safe_receiver = savedStateHandle.ba('goToOnContentEntryDone');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    tmp_5.nwa_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    this.owa_1 = this.nwa_1 === 1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_6 = ContentEntryEditViewModel$slambda_0(this, null);
    this.mqo(tmp_6, VOID, VOID, ContentEntryEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ContentEntryEditViewModel).lwb = function (contentEntry) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.lwa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onContentEntryChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.zwa_1;
        var nextValue = prevValue.vwc(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tk7(contentEntry));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.zwa_1);
  };
  protoOf(ContentEntryEditViewModel).du8 = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.lwa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.zwa_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.zwa_1.rk7_1;
          tmp = tmp1_safe_receiver.tk7(VOID, VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eki(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.vwc(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.zwa_1);
  };
  protoOf(ContentEntryEditViewModel).zwf = function (compressionLevel) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.lwa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onSetCompressionLevel.<anonymous>' call
        var tmp1_safe_receiver = prevValue.zwa_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.zwa_1.qk7_1;
          tmp = tmp1_safe_receiver.tk7(VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tkh(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, compressionLevel.hp2_1));
        }
        var nextValue = prevValue.vwc(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryEditViewModel).awg = function (uri, fileName) {
    var tmp = Companion_instance_80.n4r();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onSubtitleFileAdded.<anonymous>' call
    // Inline function 'kotlin.collections.set' call
    this_0.s('uri', uri);
    // Inline function 'kotlin.collections.set' call
    var key = 'filename';
    this_0.s(key, fileName);
    var tmp$ret$2 = this_0.f3();
    this.iqo('GetSubtitle', 'subtitleKey', null, tmp, tmp$ret$2);
  };
  protoOf(ContentEntryEditViewModel).bwg = function (subtitleTrack) {
    this.iqo('SubtitleEdit', 'subtitleKey', subtitleTrack, Companion_instance_80.n4r());
  };
  protoOf(ContentEntryEditViewModel).cwg = function (subtitleTrack) {
    updateSubtitles(this, ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda(subtitleTrack));
  };
  protoOf(ContentEntryEditViewModel).asa = function () {
    var entityVal = this.lwa_1.t2().zwa_1;
    var tmp0_safe_receiver = this.lwa_1.t2().zwa_1;
    var contentEntry = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ok7_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.lwa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
        var tmp;
        // Inline function 'kotlin.text.isNullOrBlank' call
        var this_1 = contentEntry == null ? null : contentEntry.oav_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : isBlank(this_1)) {
          tmp = this.aqo().moj(strings_getInstance().wnl_1);
        } else {
          tmp = null;
        }
        var nextValue = prevValue.vwc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_2(this.lwa_1.t2(), this)) {
      this.cqo(Companion_getInstance_97().uq6_1);
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.lwa_1;
        while (true) {
          var prevValue_0 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.vwc(VOID, VOID, VOID, VOID, true);
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_instance;
    }
    var tmp2_elvis_lhs = entityVal == null ? null : entityVal.ok7_1;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var contentEntryVal = tmp_0;
    if (!this.lwa_1.t2().dwb_1) {
      return Unit_instance;
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.lwa_1;
      while (true) {
        var prevValue_1 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
        var nextValue_1 = prevValue_1.vwc(VOID, VOID, VOID, VOID, false);
        if (this_3.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (this.nwa_1 === 1) {
      Companion_getInstance_174();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_4 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
      // Inline function 'kotlin.collections.set' call
      Companion_getInstance_174();
      var key = 'SelectedContentEntry';
      var value = this.m4r().r45(Companion_instance_41.n4r(), entityVal);
      this_4.s(key, value);
      this.oqo(this_4, Companion_getInstance_174().jwg_1);
      var tmp$ret$9 = this_4.f3();
      this.cqn_1.rp6('CourseBlockEdit', tmp$ret$9);
    } else if (this.nwa_1 === 2) {
      this.lqt(entityVal);
    } else {
      var tmp_1 = this.rqn();
      launch(tmp_1, VOID, VOID, ContentEntryEditViewModel$onClickSave$slambda_0(this, contentEntryVal, entityVal, null));
    }
  };
  function ContentEntryEditUiState(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) {
    entity = entity === VOID ? null : entity;
    licenceOptions = licenceOptions === VOID ? emptyList() : licenceOptions;
    storageOptions = storageOptions === VOID ? emptyList() : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? new CourseBlockEditUiState() : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? false : updateContentVisible;
    importError = importError === VOID ? null : importError;
    titleError = titleError === VOID ? null : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? null : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? null : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? false : compressionEnabled;
    subtitles = subtitles === VOID ? emptyList() : subtitles;
    this.zwa_1 = entity;
    this.awb_1 = licenceOptions;
    this.bwb_1 = storageOptions;
    this.cwb_1 = courseBlockEditUiState;
    this.dwb_1 = fieldsEnabled;
    this.ewb_1 = updateContentVisible;
    this.fwb_1 = importError;
    this.gwb_1 = titleError;
    this.hwb_1 = selectedContainerStorageDir;
    this.iwb_1 = metadataResult;
    this.jwb_1 = compressionEnabled;
    this.kwb_1 = subtitles;
  }
  protoOf(ContentEntryEditUiState).kwg = function () {
    var tmp0_safe_receiver = this.zwa_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qk7_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vbc_1;
    return tmp === 101;
  };
  protoOf(ContentEntryEditUiState).lwg = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) {
    return new ContentEntryEditUiState(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).vwc = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles, $super) {
    entity = entity === VOID ? this.zwa_1 : entity;
    licenceOptions = licenceOptions === VOID ? this.awb_1 : licenceOptions;
    storageOptions = storageOptions === VOID ? this.bwb_1 : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.cwb_1 : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? this.dwb_1 : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? this.ewb_1 : updateContentVisible;
    importError = importError === VOID ? this.fwb_1 : importError;
    titleError = titleError === VOID ? this.gwb_1 : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? this.hwb_1 : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? this.iwb_1 : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? this.jwb_1 : compressionEnabled;
    subtitles = subtitles === VOID ? this.kwb_1 : subtitles;
    return $super === VOID ? this.lwg(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) : $super.lwg.call(this, entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).toString = function () {
    return 'ContentEntryEditUiState(entity=' + this.zwa_1 + ', licenceOptions=' + this.awb_1 + ', storageOptions=' + this.bwb_1 + ', courseBlockEditUiState=' + this.cwb_1 + ', fieldsEnabled=' + this.dwb_1 + ', updateContentVisible=' + this.ewb_1 + ', importError=' + this.fwb_1 + ', titleError=' + this.gwb_1 + ', selectedContainerStorageDir=' + this.hwb_1 + ', metadataResult=' + this.iwb_1 + ', compressionEnabled=' + this.jwb_1 + ', subtitles=' + this.kwb_1 + ')';
  };
  protoOf(ContentEntryEditUiState).hashCode = function () {
    var result = this.zwa_1 == null ? 0 : this.zwa_1.hashCode();
    result = imul(result, 31) + hashCode(this.awb_1) | 0;
    result = imul(result, 31) + hashCode(this.bwb_1) | 0;
    result = imul(result, 31) + this.cwb_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dwb_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ewb_1) | 0;
    result = imul(result, 31) + (this.fwb_1 == null ? 0 : getStringHashCode(this.fwb_1)) | 0;
    result = imul(result, 31) + (this.gwb_1 == null ? 0 : getStringHashCode(this.gwb_1)) | 0;
    result = imul(result, 31) + (this.hwb_1 == null ? 0 : hashCode(this.hwb_1)) | 0;
    result = imul(result, 31) + (this.iwb_1 == null ? 0 : this.iwb_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jwb_1) | 0;
    result = imul(result, 31) + hashCode(this.kwb_1) | 0;
    return result;
  };
  protoOf(ContentEntryEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryEditUiState ? other : THROW_CCE();
    if (!equals(this.zwa_1, tmp0_other_with_cast.zwa_1))
      return false;
    if (!equals(this.awb_1, tmp0_other_with_cast.awb_1))
      return false;
    if (!equals(this.bwb_1, tmp0_other_with_cast.bwb_1))
      return false;
    if (!this.cwb_1.equals(tmp0_other_with_cast.cwb_1))
      return false;
    if (!(this.dwb_1 === tmp0_other_with_cast.dwb_1))
      return false;
    if (!(this.ewb_1 === tmp0_other_with_cast.ewb_1))
      return false;
    if (!(this.fwb_1 == tmp0_other_with_cast.fwb_1))
      return false;
    if (!(this.gwb_1 == tmp0_other_with_cast.gwb_1))
      return false;
    if (!equals(this.hwb_1, tmp0_other_with_cast.hwb_1))
      return false;
    if (!equals(this.iwb_1, tmp0_other_with_cast.iwb_1))
      return false;
    if (!(this.jwb_1 === tmp0_other_with_cast.jwb_1))
      return false;
    if (!equals(this.kwb_1, tmp0_other_with_cast.kwb_1))
      return false;
    return true;
  };
  function ContentEntryGetMetadataViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.iwh_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.getmetadata.ContentEntryGetMetadataViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.lwh(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_149() {
    this.mwh_1 = 'uri';
    this.nwh_1 = 'filename';
    this.owh_1 = 'ContentEntryGetMetadata';
  }
  var Companion_instance_198;
  function Companion_getInstance_166() {
    return Companion_instance_198;
  }
  function ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation) {
    this.xwh_1 = this$0;
    this.ywh_1 = $uriArg;
    this.zwh_1 = $fileName;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryGetMetadataViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.bwi_1 = this.xwh_1.hwh_1;
            this.cwi_1 = Companion_getInstance_3().o2r(this.ywh_1);
            this.dwi_1 = this.xwh_1.qqn().loa();
            this.hd_1 = 1;
            suspendResult = this.bwi_1.lp3(this.cwi_1, this.zwh_1, this.dwi_1, ContentEntryGetMetadataViewModel$slambda$lambda(this.xwh_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var metadataResult = suspendResult;
            var this_0 = LinkedHashMap_init_$Create$();
            this_0.s('metadata', this.xwh_1.m4r().r45(Companion_instance_81.n4r(), metadataResult));
            this.xwh_1.oqo(this_0, Companion_getInstance_174().jwg_1);
            Companion_getInstance_116();
            this.xwh_1.nqo(this_0, 'result_viewname');
            Companion_getInstance_116();
            this.xwh_1.nqo(this_0, 'result_key');
            Companion_getInstance_125();
            this.xwh_1.nqo(this_0, 'parentUid');
            this.xwh_1.cqn_1.lq9('ContentEntryEdit', this_0.f3(), new UstadGoOptions('ContentEntryGetMetadata', true));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              var tmp_1;
              if (e instanceof InvalidContentException) {
                tmp_1 = this.xwh_1.aqo().moj(strings_getInstance().vmt_1) + ' : ' + e.message;
              } else {
                if (e instanceof UnsupportedContentException) {
                  var tmp_2 = this.xwh_1.aqo();
                  var tmp_3 = strings_getInstance().xmt_1;
                  var tmp3_elvis_lhs = e.message;
                  tmp_1 = tmp_2.noj(tmp_3, [tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs]);
                } else {
                  tmp_1 = this.xwh_1.aqo().moj(strings_getInstance().qmi_1) + ' : other: ' + e.message;
                }
              }
              var errorMessage = tmp_1;
              l$ret$1: do {
                var this_1 = this.xwh_1.iwh_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.lwh(prevValue.kwh_1.sp3(VOID, errorMessage));
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryGetMetadataViewModel$slambda(this.xwh_1, this.ywh_1, this.zwh_1, completion);
    i.awi_1 = $this$launch;
    return i;
  };
  function ContentEntryGetMetadataViewModel$slambda_0(this$0, $uriArg, $fileName, resultContinuation) {
    var i = new ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryGetMetadataViewModel(di, savedStateHandle, contentEntryGetMetaDataFromUriUseCase) {
    var tmp;
    if (contentEntryGetMetaDataFromUriUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      tmp = tmp_0.d58(tmp$ret$0, null);
    } else {
      tmp = contentEntryGetMetaDataFromUriUseCase;
    }
    contentEntryGetMetaDataFromUriUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'ContentEntryGetMetadata');
    this.hwh_1 = contentEntryGetMetaDataFromUriUseCase;
    this.iwh_1 = MutableStateFlow(new ContentEntryGetMetadataUiState());
    this.jwh_1 = asStateFlow(this.iwh_1);
    var tmp0_elvis_lhs = savedStateHandle.ba('uri');
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No uri');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    var uriArg = tmp_2;
    var fileName = savedStateHandle.ba('filename');
    var tmp_3 = this.rqn();
    launch(tmp_3, VOID, VOID, ContentEntryGetMetadataViewModel$slambda_0(this, uriArg, fileName, null));
  }
  function ContentEntryGetMetadataUiState(status) {
    status = status === VOID ? new ContentEntryGetMetadataStatus() : status;
    this.kwh_1 = status;
  }
  protoOf(ContentEntryGetMetadataUiState).lwh = function (status) {
    return new ContentEntryGetMetadataUiState(status);
  };
  protoOf(ContentEntryGetMetadataUiState).toString = function () {
    return 'ContentEntryGetMetadataUiState(status=' + this.kwh_1 + ')';
  };
  protoOf(ContentEntryGetMetadataUiState).hashCode = function () {
    return this.kwh_1.hashCode();
  };
  protoOf(ContentEntryGetMetadataUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryGetMetadataUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryGetMetadataUiState ? other : THROW_CCE();
    if (!this.kwh_1.equals(tmp0_other_with_cast.kwh_1))
      return false;
    return true;
  };
  function _get_getSubtitleTrackUseCase__ux9onr($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bwj_1;
    getSubtitleTrackUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_150() {
    this.cwj_1 = 'GetSubtitle';
  }
  var Companion_instance_199;
  function Companion_getInstance_167() {
    return Companion_instance_199;
  }
  function GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.lwj_1 = this$0;
    this.mwj_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetSubtitleViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(GetSubtitleViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(GetSubtitleViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_getSubtitleTrackUseCase__ux9onr(this.lwj_1);
            var tmp_1 = Companion_getInstance_3();
            var tmp_2 = tmp_1.o2r(require_0(this.mwj_1, 'uri'));
            suspendResult = tmp_0.yp3(tmp_2, require_0(this.mwj_1, 'filename'), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var subtitleTrack = suspendResult;
            var this_0 = LinkedHashMap_init_$Create$();
            Companion_getInstance_125();
            this_0.s('entityState', this.lwj_1.m4r().r45(Companion_instance_80.n4r(), subtitleTrack));
            Companion_getInstance_125();
            this.lwj_1.nqo(this_0, 'result_viewname');
            Companion_getInstance_125();
            this.lwj_1.nqo(this_0, 'result_key');
            this.lwj_1.cqn_1.lq9('SubtitleEdit', this_0.f3(), new UstadGoOptions('GetSubtitle', true));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              var e = this.kd_1;
              l$ret$1: do {
                var this_1 = this.lwj_1.zwi_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.pwj(this.lwj_1.aqo().moj(strings_getInstance().qmi_1) + ': ' + e.message);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(GetSubtitleViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new GetSubtitleViewModel$slambda(this.lwj_1, this.mwj_1, completion);
    i.nwj_1 = $this$launch;
    return i;
  };
  function GetSubtitleViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function GetSubtitleViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'GetSubtitle');
    this.zwi_1 = MutableStateFlow(new GetSubtitleUiState());
    this.awj_1 = asStateFlow(this.zwi_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.qqn().loa();
    var trigger = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.bwj_1 = Instance(this_0, tmp$ret$3, null).a5d(this, getSubtitleTrackUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.getsubtitle.GetSubtitleViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().knc_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.rqn();
    launch(tmp_3, VOID, VOID, GetSubtitleViewModel$slambda_0(this, savedStateHandle, null));
  }
  function GetSubtitleUiState(error) {
    error = error === VOID ? null : error;
    this.owj_1 = error;
  }
  protoOf(GetSubtitleUiState).pwj = function (error) {
    return new GetSubtitleUiState(error);
  };
  protoOf(GetSubtitleUiState).toString = function () {
    return 'GetSubtitleUiState(error=' + this.owj_1 + ')';
  };
  protoOf(GetSubtitleUiState).hashCode = function () {
    return this.owj_1 == null ? 0 : getStringHashCode(this.owj_1);
  };
  protoOf(GetSubtitleUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof GetSubtitleUiState))
      return false;
    var tmp0_other_with_cast = other instanceof GetSubtitleUiState ? other : THROW_CCE();
    if (!(this.owj_1 == tmp0_other_with_cast.owj_1))
      return false;
    return true;
  };
  function getSubtitleTrackUseCase$factory() {
    return getPropertyCallableRef('getSubtitleTrackUseCase', 1, KProperty1, function (receiver) {
      return _get_getSubtitleTrackUseCase__ux9onr(receiver);
    }, null);
  }
  function getSubtitleTrackUseCase$factory_0() {
    return getPropertyCallableRef('getSubtitleTrackUseCase', 1, KProperty1, function (receiver) {
      return _get_getSubtitleTrackUseCase__ux9onr(receiver);
    }, null);
  }
  function _get_httpClient__2ty1zc_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nwk_1;
    httpClient$factory_4();
    return this_0.t2();
  }
  function Companion_151() {
    this.qwk_1 = 'ContentEntryImportLink';
    this.rwk_1 = 'importUrl';
  }
  var Companion_instance_200;
  function Companion_getInstance_168() {
    return Companion_instance_200;
  }
  function ContentEntryImportLinkViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.swk();
      return Unit_instance;
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation) {
    this.bwl_1 = this$0;
    this.cwl_1 = $url;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.bwl_1.aqn_1.dqj('importUrl', this.cwl_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryImportLinkViewModel$onChangeLink$slambda(this.bwl_1, this.cwl_1, completion);
    i.dwl_1 = $this$launch;
    return i;
  };
  function ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this$0, $url, resultContinuation) {
    var i = new ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryImportLinkViewModel$onClickNext$slambda(this$0, resultContinuation) {
    this.mwl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 8;
            this.id_1 = 7;
            var tmp_0 = this;
            tmp_0.qwl_1 = _get_httpClient__2ty1zc_1(this.mwl_1);
            var tmp_1 = this;
            tmp_1.rwl_1 = this.qwl_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.mwl_1.qqn().loa().wnt_1 + 'api/import/validateLink');
            parameter(this_0, 'url', this.mwl_1.lwk_1.t2().xwl_1);
            set_expectSuccess(this_0, false);
            tmp_2.swl_1 = this_0;
            this.swl_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_3 = this;
            tmp_3.twl_1 = this.rwl_1;
            var tmp_4 = this;
            tmp_4.uwl_1 = this.swl_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.uwl_1, this.twl_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.vwl_1 = suspendResult;
            if (!this.vwl_1.j3b().equals(Companion_getInstance_0().f2y_1)) {
              l$ret$1: do {
                var this_1 = this.mwl_1.lwk_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.awm(VOID, this.mwl_1.aqo().moj(strings_getInstance().umt_1), true);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.pwl_1 = Unit_instance;
              this.id_1 = 9;
              this.hd_1 = 6;
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            var tmp_5 = this;
            tmp_5.wwl_1 = this.mwl_1.m4r();
            this.hd_1 = 5;
            suspendResult = bodyAsText(this.vwl_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var string = suspendResult;
            var this_2 = this.wwl_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(MetadataResult), arrayOf([]), false));
            var metadataResult = this.wwl_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), string);
            var tmp_6 = this;
            var tmp_7;
            if (this.mwl_1.pwk_1 === 'ContentEntryEdit') {
              var this_4 = LinkedHashMap_init_$Create$();
              this_4.s('metadata', this.mwl_1.m4r().r45(Companion_instance_81.n4r(), metadataResult));
              this.mwl_1.nqo(this_4, 'courseBlock');
              this.mwl_1.nqo(this_4, 'goToOnContentEntryDone');
              Companion_getInstance_116();
              this.mwl_1.nqo(this_4, 'result_viewname');
              Companion_getInstance_116();
              this.mwl_1.nqo(this_4, 'result_key');
              Companion_getInstance_125();
              this.mwl_1.nqo(this_4, 'parentUid');
              Companion_getInstance_125();
              this_4.s('popUpToOnFinish', 'ContentEntryImportLink');
              this.mwl_1.cqn_1.rp6('ContentEntryEdit', this_4.f3());
              tmp_7 = Unit_instance;
            } else {
              this.mwl_1.lqt(metadataResult);
              tmp_7 = Unit_instance;
            }

            tmp_6.owl_1 = tmp_7;
            this.id_1 = 9;
            this.hd_1 = 10;
            continue $sm;
          case 6:
            this.id_1 = 9;
            l$ret$9: do {
              var this_5 = this.mwl_1.lwk_1;
              while (true) {
                var prevValue_0 = this_5.t2();
                var nextValue_0 = prevValue_0.awm(VOID, VOID, true);
                if (this_5.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 7:
            this.id_1 = 8;
            var tmp_8 = this.kd_1;
            if (tmp_8 instanceof Exception) {
              var e = this.kd_1;
              var tmp_9 = this;
              this.mwl_1.yqn().bq7(new Snack(this.mwl_1.aqo().moj(strings_getInstance().qmi_1) + (': ' + e)));
              tmp_9.owl_1 = Unit_instance;
              this.id_1 = 9;
              this.hd_1 = 10;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 9;
            var t = this.kd_1;
            l$ret$7: do {
              var this_6 = this.mwl_1.lwk_1;
              while (true) {
                var prevValue_1 = this_6.t2();
                var nextValue_1 = prevValue_1.awm(VOID, VOID, true);
                if (this_6.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            throw t;
          case 9:
            throw this.kd_1;
          case 10:
            this.id_1 = 9;
            l$ret$11: do {
              var this_7 = this.mwl_1.lwk_1;
              while (true) {
                var prevValue_2 = this_7.t2();
                var nextValue_2 = prevValue_2.awm(VOID, VOID, true);
                if (this_7.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 9) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryImportLinkViewModel$onClickNext$slambda(this.mwl_1, completion);
    i.nwl_1 = $this$launch;
    return i;
  };
  function ContentEntryImportLinkViewModel$onClickNext$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryImportLinkViewModel$onClickNext$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryImportLinkViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'ContentEntryImportLink');
    this.lwk_1 = MutableStateFlow(new ContentEntryImportLinkUiState());
    this.mwk_1 = asStateFlow(this.lwk_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.nwk_1 = Instance(this, tmp$ret$0, null).a5d(this, httpClient$factory_3());
    this.owk_1 = null;
    var tmp_1 = this;
    Companion_getInstance_125();
    tmp_1.pwk_1 = savedStateHandle.ba('next');
    var tmp_2 = this.aqo().moj(strings_getInstance().imt_1);
    var tmp_3 = this.aqo().moj(strings_getInstance().vmj_1);
    this.eqn_1.x1k(new AppUiState(VOID, VOID, tmp_2, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ContentEntryImportLinkViewModel$onClickNext$ref(this))));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.lwk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba('importUrl');
        var nextValue = prevValue.awm(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(ContentEntryImportLinkViewModel).bwm = function (url) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.lwk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onChangeLink.<anonymous>' call
        var nextValue = prevValue.awm(url, !(url === prevValue.xwl_1) ? null : prevValue.ywl_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.owk_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.rqn();
    tmp.owk_1 = launch(tmp_0, VOID, VOID, ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this, url, null));
  };
  protoOf(ContentEntryImportLinkViewModel).swk = function () {
    if (!this.lwk_1.t2().zwl_1) {
      return Unit_instance;
    }
    if (isBlank(this.lwk_1.t2().xwl_1)) {
      Napier_getInstance().i5e('link is blank');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.lwk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.awm(VOID, this.aqo().moj(strings_getInstance().vmn_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.lwk_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
        var nextValue_0 = prevValue_0.awm(VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.owk_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    this.aqn_1.dqj('importUrl', this.lwk_1.t2().xwl_1);
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, ContentEntryImportLinkViewModel$onClickNext$slambda_0(this, null));
  };
  function ContentEntryImportLinkUiState(url, linkError, fieldsEnabled) {
    url = url === VOID ? '' : url;
    linkError = linkError === VOID ? null : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.xwl_1 = url;
    this.ywl_1 = linkError;
    this.zwl_1 = fieldsEnabled;
  }
  protoOf(ContentEntryImportLinkUiState).cwm = function (url, linkError, fieldsEnabled) {
    return new ContentEntryImportLinkUiState(url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).awm = function (url, linkError, fieldsEnabled, $super) {
    url = url === VOID ? this.xwl_1 : url;
    linkError = linkError === VOID ? this.ywl_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.zwl_1 : fieldsEnabled;
    return $super === VOID ? this.cwm(url, linkError, fieldsEnabled) : $super.cwm.call(this, url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).toString = function () {
    return 'ContentEntryImportLinkUiState(url=' + this.xwl_1 + ', linkError=' + this.ywl_1 + ', fieldsEnabled=' + this.zwl_1 + ')';
  };
  protoOf(ContentEntryImportLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.xwl_1);
    result = imul(result, 31) + (this.ywl_1 == null ? 0 : getStringHashCode(this.ywl_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zwl_1) | 0;
    return result;
  };
  protoOf(ContentEntryImportLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryImportLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryImportLinkUiState ? other : THROW_CCE();
    if (!(this.xwl_1 === tmp0_other_with_cast.xwl_1))
      return false;
    if (!(this.ywl_1 == tmp0_other_with_cast.ywl_1))
      return false;
    if (!(this.zwl_1 === tmp0_other_with_cast.zwl_1))
      return false;
    return true;
  };
  function httpClient$factory_3() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_1(receiver);
    }, null);
  }
  function httpClient$factory_4() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_1(receiver);
    }, null);
  }
  function _ContentEntryListItemUiState___init__impl__r5o9qy(contentEntry) {
    return contentEntry;
  }
  function _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2($this) {
    return $this;
  }
  function _ContentEntryListItemUiState___get_descriptionVisible__impl__xyu083($this) {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2($this).pav_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  }
  function _ContentEntryListItemUiState___get_mimetypeVisible__impl__l8r8g7($this) {
    return _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2($this).caw_1;
  }
  function ContentEntryListItemUiState__toString_impl_2mjydu($this) {
    return 'ContentEntryListItemUiState(contentEntry=' + $this + ')';
  }
  function ContentEntryListItemUiState__hashCode_impl_odpv6p($this) {
    return $this.hashCode();
  }
  function ContentEntryListItemUiState__equals_impl_d3bksl($this, other) {
    if (!(other instanceof ContentEntryListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListItemUiState ? other.dwm_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function ContentEntryListItemUiState(contentEntry) {
    this.dwm_1 = contentEntry;
  }
  protoOf(ContentEntryListItemUiState).toString = function () {
    return ContentEntryListItemUiState__toString_impl_2mjydu(this.dwm_1);
  };
  protoOf(ContentEntryListItemUiState).hashCode = function () {
    return ContentEntryListItemUiState__hashCode_impl_odpv6p(this.dwm_1);
  };
  protoOf(ContentEntryListItemUiState).equals = function (other) {
    return ContentEntryListItemUiState__equals_impl_d3bksl(this.dwm_1, other);
  };
  function get_listItemUiState_0(_this__u8e3s4) {
    return _ContentEntryListItemUiState___init__impl__r5o9qy(_this__u8e3s4);
  }
  function ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mwm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).lqf = function (hasNewContentPermission, $completion) {
    var tmp = this.mqf(hasNewContentPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.mwm_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (!(prevValue.dwn_1 === this.nwm_1)) {
                tmp_0 = prevValue.fwn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nwm_1);
              } else {
                tmp_0 = prevValue;
              }
              var nextValue = tmp_0;
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.mwm_1.eqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.mq6(prevValue_0.xq5_1.sq6(this.nwm_1 ? !this.mwm_1.lwo_1 : false));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).mqf = function (hasNewContentPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this.mwm_1, completion);
    i.nwm_1 = hasNewContentPermission;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasNewContentPermission, $completion) {
      return i.lqf(hasNewContentPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation) {
    this.wwo_1 = this$0;
    this.xwo_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!this.wwo_1.hwo_1) {
              this.hd_1 = 2;
              var tmp_0 = ContentEntryListViewModel$slambda$slambda$slambda_0(this.wwo_1, null);
              suspendResult = this.xwo_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(tmp_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            return Unit_instance;
          case 2:
            throwKotlinNothingValueException();
            break;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).l78 = function (completion) {
    return new ContentEntryListViewModel$slambda$slambda(this.wwo_1, this.xwo_1, completion);
  };
  function ContentEntryListViewModel$slambda$slambda_0(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.gwp_1 = $savedStateHandle;
    this.hwp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_1).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.iwp_1.xq9_1;
            var tmp0_elvis_lhs = tmp_1 instanceof ContentEntry ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.jwp_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_safe_receiver = this.gwp_1.ba('entriesToMove');
            var tmp_4;
            if (tmp1_safe_receiver == null) {
              tmp_4 = null;
            } else {
              tmp_4 = this.hwp_1.m4r().s45(ListSerializer(Companion_instance_203.n4r()), tmp1_safe_receiver);
            }

            var tmp2_elvis_lhs = tmp_4;
            var tmp_5;
            if (tmp2_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_5 = tmp2_elvis_lhs;
            }

            tmp_3.kwp_1 = tmp_5;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_moveContentEntriesUseCase__fb3hfi(this.hwp_1).epa(this.jwp_1, toSet(this.kwp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hwp_1.yqn().bq7(new Snack(this.hwp_1.aqo().noj(strings_getInstance().on9_1, [this.kwp_1.u().toString()])));
            this.id_1 = 4;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.id_1 = 4;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().m5e('Could not move entries', e);
              var tmp_7 = this.hwp_1.yqn();
              var tmp3_elvis_lhs = e.message;
              tmp_7.bq7(new Snack(tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs));
              this.hd_1 = 3;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            this.id_1 = 4;
            setSelectedItems(this.hwp_1, emptySet());
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 4) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).rqa = function (result, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_1(this.gwp_1, this.hwp_1, completion);
    i.iwp_1 = result;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$onClickMoveAction$ref($boundThis) {
    var l = function () {
      onClickMoveAction($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickMoveAction';
    return l;
  }
  function ContentEntryListViewModel$onClickDeleteAction$ref($boundThis) {
    var l = function () {
      onClickDeleteAction($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickDeleteAction';
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_3).vwp = function (uiState, hasPermission, $completion) {
    var tmp = this.wwp(uiState, hasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).um = function (p1, p2, $completion) {
    var tmp = p1 instanceof ContentEntryListUiState ? p1 : THROW_CCE();
    return this.vwp(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Pair(this.twp_1, this.uwp_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).wwp = function (uiState, hasPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(completion);
    i.twp_1 = uiState;
    i.uwp_1 = hasPermission;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_4(resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(resultContinuation);
    var l = function (uiState, hasPermission, $completion) {
      return i.vwp(uiState, hasPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.fwq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_5).hwq = function (it, $completion) {
    var tmp = this.iwq(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.hwq(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0;
          if (!this.gwq_1.w6_1.awn_1.c1()) {
            tmp_0 = this.gwq_1.x6_1;
          } else {
            tmp_0 = false;
          }
          var showMoveIcon = tmp_0;
          if (!(showMoveIcon === !this.fwq_1.eqn_1.t2().iq6_1.c1())) {
            l$ret$1: do {
              var this_0 = this.fwq_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (showMoveIcon) {
                  var tmp_2 = AppStateIcon_MOVE_getInstance();
                  var tmp_3 = this.fwq_1.aqo().moj(strings_getInstance().fmn_1);
                  var tmp_4 = new AppActionButton(tmp_2, tmp_3, ContentEntryListViewModel$onClickMoveAction$ref(this.fwq_1), 'action_move');
                  var tmp_5 = AppStateIcon_DELETE_getInstance();
                  var tmp_6 = this.fwq_1.aqo().moj(strings_getInstance().kmj_1);
                  tmp_1 = listOf([tmp_4, new AppActionButton(tmp_5, tmp_6, ContentEntryListViewModel$onClickDeleteAction$ref(this.fwq_1), 'action_delete')]);
                } else {
                  tmp_1 = emptyList();
                }
                var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).iwq = function (it, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this.fwq_1, completion);
    i.gwq_1 = it;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.hwq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_moveContentEntriesUseCase__fb3hfi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mwo_1;
    moveContentEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deleteEntriesUseCase__hkwqc9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nwo_1;
    deleteEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function setSelectedItems($this, selectedEntries) {
    $this.aqn_1.dqj('selectedEntries', $this.m4r().r45(ListSerializer(Companion_instance_203.n4r()), toList(selectedEntries)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var nextValue = prevValue.fwn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, selectedEntries);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var numItemsSelected = $this.vqv_1.t2().awn_1.u();
    var hasSelectedItems = numItemsSelected > 0;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = $this.eqn_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var tmp0_userAccountIconVisible = !hasSelectedItems;
        var tmp;
        if (hasSelectedItems) {
          tmp = $this.aqo().jwq(plurals_getInstance().wns_1, numItemsSelected);
        } else {
          tmp = $this.kwo_1;
        }
        var tmp1_title = tmp;
        var tmp_0;
        if (hasSelectedItems) {
          var tmp_1 = AppStateIcon_CLOSE_getInstance();
          var tmp_2 = $this.aqo().moj(strings_getInstance().wnm_1);
          tmp_0 = new AppActionButton(tmp_1, tmp_2, ContentEntryListViewModel$setSelectedItems$lambda($this), 'clear_selection');
        } else {
          tmp_0 = null;
        }
        var tmp2_leadingActionButton = tmp_0;
        var tmp3_appBarColors = hasSelectedItems ? AppBarColors_SELECTION_MODE_getInstance() : AppBarColors_STANDARD_getInstance();
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp1_title, VOID, VOID, hasSelectedItems, tmp0_userAccountIconVisible, VOID, VOID, VOID, VOID, VOID, tmp2_leadingActionButton, tmp3_appBarColors);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  function selectDestinationToMoveEntries($this, entries) {
    $this.aqn_1.dqj('entriesToMove', $this.m4r().r45(ListSerializer(Companion_instance_203.n4r()), toList(entries)));
    var tmp = Companion_instance_28.n4r();
    $this.iqo('PickContentEntry', 'moveToDestinationResult', null, tmp, mapOf([to('listMode', ListViewMode_PICKER_getInstance().zqj_1), to('selectFolder', 'true')]));
  }
  function onClickMoveAction($this) {
    selectDestinationToMoveEntries($this, $this.vqv_1.t2().awn_1);
  }
  function launchDeleteEntries($this, entries) {
    var tmp = $this.rqn();
    launch(tmp, VOID, VOID, ContentEntryListViewModel$launchDeleteEntries$slambda_0($this, entries, null));
  }
  function onClickDeleteAction($this) {
    launchDeleteEntries($this, $this.vqv_1.t2().awn_1);
  }
  function Companion_152() {
    Companion_instance_201 = this;
    this.kwq_1 = 'ContentEntries';
    this.lwq_1 = 'ContentEntryListHome';
    this.mwq_1 = 'PickContentEntry';
    this.nwq_1 = listOf(['ContentEntries', 'ContentEntryListHome', 'PickContentEntry']);
    this.owq_1 = 'filter';
    this.pwq_1 = 1;
    this.qwq_1 = 2;
    this.rwq_1 = 3;
    this.swq_1 = 4;
    this.twq_1 = new Long(1, 0);
    this.uwq_1 = 'chipId';
    this.vwq_1 = 'moveToDestinationResult';
    this.wwq_1 = 'selectFolder';
    this.xwq_1 = 'selectedEntries';
    this.ywq_1 = 'entriesToMove';
  }
  var Companion_instance_201;
  function Companion_getInstance_169() {
    if (Companion_instance_201 == null)
      new Companion_152();
    return Companion_instance_201;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_26(function_0) {
    this.zwq_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_26).t1d = function (value, $completion) {
    return this.zwq_1(value, $completion);
  };
  function createContextMenuItemsForEntry$entriesToAction(this$0, rightClickedItem) {
    var selectedEntries = this$0.vqv_1.t2().awn_1;
    var tmp;
    var tmp_0;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!selectedEntries.c1()) {
      tmp_0 = !selectedEntries.a1(rightClickedItem);
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      // Inline function 'kotlin.also' call
      var this_0 = toSet(plus_2(selectedEntries, rightClickedItem));
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.createContextMenuItemsForEntry.entriesToAction.<anonymous>' call
      setSelectedItems(this$0, this_0);
      tmp = this_0;
    } else {
      if (selectedEntries.c1()) {
        tmp = setOf_0(rightClickedItem);
      } else {
        tmp = selectedEntries;
      }
    }
    return tmp;
  }
  function ContentEntryListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      var tmp;
      switch (this$0.vqv_1.t2().qwm_1) {
        case 2:
          tmp = this$0.wqn().v7d().xau(this$0.sqn());
          break;
        case 3:
          tmp = this$0.wqn().v7d().wau(this$0.sqn());
          break;
        case 4:
          tmp = this$0.wqn().v7d().vau(this$0.sqn(), this$0.gwo_1, new Long(0, 0), new Long(0, 0), this$0.vqv_1.t2().vwm_1.tqc_1, false);
          break;
        case 1:
          tmp = this$0.wqn().v7d().vau(this$0.sqn(), this$0.gwo_1, new Long(0, 0), new Long(0, 0), this$0.vqv_1.t2().vwm_1.tqc_1, false);
          break;
        default:
          tmp = new EmptyPagingSource();
          break;
      }
      return tmp;
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$ref($boundThis) {
    var l = function (p0) {
      return $boundThis.awr(p0);
    };
    l.callableName = 'createContextMenuItemsForEntry';
    return l;
  }
  function ContentEntryListViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.vqv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.fwn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$slambda(this$0, resultContinuation) {
    this.jwr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!(this.jwr_1.bqo() == null) ? !this.jwr_1.iwo_1 : false) {
              this.lwr_1 = this.jwr_1.aqo().moj(strings_getInstance().fne_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              if (this.jwr_1.gwo_1.equals(new Long(1, 0))) {
                this.lwr_1 = this.jwr_1.aqo().moj(strings_getInstance().sni_1);
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.jwr_1.wqn().v7d().uau(this.jwr_1.gwo_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp0_elvis_lhs = suspendResult;
            this.lwr_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.lwr_1;
            this.jwr_1.kwo_1 = ARGUMENT;
            l$ret$1: do {
              var this_0 = this.jwr_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mq6(VOID, VOID, this.jwr_1.kwo_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda(this.jwr_1, completion);
    i.kwr_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_1(this$0, $hasPermissionFlow, resultContinuation) {
    this.uwr_1 = this$0;
    this.vwr_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.uwr_1.vqv_1, ContentEntryListViewModel$slambda$slambda_0(this.uwr_1, this.vwr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_1(this.uwr_1, this.vwr_1, completion);
    i.wwr_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_2(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_1(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_3(this$0, $savedStateHandle, resultContinuation) {
    this.fws_1 = this$0;
    this.gws_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.fws_1.eqo(this.fws_1.zqn(), 'moveToDestinationResult');
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_2(this.gws_1, this.fws_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_3(this.fws_1, this.gws_1, completion);
    i.hws_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_4(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_3(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_5(this$0, $hasPermissionFlow, resultContinuation) {
    this.qws_1 = this$0;
    this.rws_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.qws_1.vqv_1, this.rws_1, ContentEntryListViewModel$slambda$slambda_4(null));
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_6(this.qws_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_5(this.qws_1, this.rws_1, completion);
    i.sws_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_6(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_5(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this$0, $rightClickedItem) {
    return function () {
      selectDestinationToMoveEntries(this$0, createContextMenuItemsForEntry$entriesToAction(this$0, $rightClickedItem));
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this$0, $rightClickedItem) {
    return function () {
      launchDeleteEntries(this$0, createContextMenuItemsForEntry$entriesToAction(this$0, $rightClickedItem));
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$setSelectedItems$lambda(this$0) {
    return function () {
      setSelectedItems(this$0, emptySet());
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$launchDeleteEntries$slambda(this$0, $entries, resultContinuation) {
    this.bwt_1 = this$0;
    this.cwt_1 = $entries;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_deleteEntriesUseCase__hkwqc9(this.bwt_1).jp3(this.cwt_1, this.bwt_1.sqn(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            setSelectedItems(this.bwt_1, emptySet());
            this.bwt_1.yqn().bq7(new Snack(this.bwt_1.aqo().jwq(plurals_getInstance().xns_1, this.cwt_1.u())));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$launchDeleteEntries$slambda(this.bwt_1, this.cwt_1, completion);
    i.dwt_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$launchDeleteEntries$slambda_0(this$0, $entries, resultContinuation) {
    var i = new ContentEntryListViewModel$launchDeleteEntries$slambda(this$0, $entries, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_169();
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryListUiState(), destName);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('parentUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.gwo_1 = tmp1_elvis_lhs == null ? new Long(1, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('goToOnContentEntryDone');
    var tmp_1 = tmp0_safe_receiver_0 == null ? null : toInt(tmp0_safe_receiver_0);
    tmp_0.hwo_1 = tmp_1 === 1;
    var tmp_2 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.ba('selectFolder');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : toBoolean(tmp0_safe_receiver_1);
    tmp_2.iwo_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    tmp_3.jwo_1 = ContentEntryListViewModel$pagingSourceFactory$lambda(this);
    this.kwo_1 = '';
    this.lwo_1 = this.iwo_1 ? this.aqw().equals(ListViewMode_PICKER_getInstance()) : false;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.mwo_1 = Instance(this_0, tmp$ret$0, null).a5d(this, moveContentEntriesUseCase$factory());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.nwo_1 = Instance(this_1, tmp$ret$2, null).a5d(this, deleteEntriesUseCase$factory());
    var tmp0_safe_receiver_2 = savedStateHandle.ba('selectedEntries');
    var tmp_8;
    if (tmp0_safe_receiver_2 == null) {
      tmp_8 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
      tmp_8 = this.m4r().s45(ListSerializer(Companion_instance_203.n4r()), tmp0_safe_receiver_2);
    }
    var tmp1_safe_receiver = tmp_8;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toSet(tmp1_safe_receiver);
    var savedStateSelectedEntries = tmp2_elvis_lhs == null ? emptySet() : tmp2_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.vqv_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp0_contentEntryList = this.jwo_1;
        var tmp1_showSelectFolderButton = this.lwo_1;
        var tmp2_contextMenuItems = ContentEntryListViewModel$createContextMenuItemsForEntry$ref(this);
        var nextValue = prevValue.fwn(VOID, tmp0_contentEntryList, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, savedStateSelectedEntries, tmp1_showSelectFolderButton, tmp2_contextMenuItems);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp_9 = this.aqo().moj(strings_getInstance().fn4_1);
        var tmp_10 = FabIcon_ADD_getInstance();
        var nextValue_0 = prevValue_0.mq6(new FabUiState(false, tmp_9, tmp_10, ContentEntryListViewModel$lambda(this)), VOID, VOID, VOID, this.aqw().equals(ListViewMode_PICKER_getInstance()));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    if (this.hwo_1 ? this.gwo_1.equals(new Long(1, 0)) : false) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.vqv_1;
        while (true) {
          var prevValue_1 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
          var tmp0_safe_receiver_3 = savedStateHandle.ba('chipId');
          var tmp1_elvis_lhs_1 = tmp0_safe_receiver_3 == null ? null : toInt(tmp0_safe_receiver_3);
          var tmp2_selectedChipId = tmp1_elvis_lhs_1 == null ? 2 : tmp1_elvis_lhs_1;
          var tmp3_filterOptions = listOf([new MessageIdOption2(strings_getInstance().tnd_1, 2), new MessageIdOption2(strings_getInstance().qnk_1, 3), new MessageIdOption2(strings_getInstance().sni_1, 4)]);
          var nextValue_1 = prevValue_1.fwn(VOID, VOID, tmp2_selectedChipId, tmp3_filterOptions, VOID, VOID, VOID, VOID, false, true, true);
          if (this_4.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    var tmp_11 = this.wqn().p7f();
    var tmp_12 = this.qqn().joa().vky_1;
    PermissionFlags_getInstance();
    var hasPermissionFlow = shareIn(tmp_11.ui0(tmp_12, new Long(65536, 0)), this.rqn(), Companion_getInstance_12().v1h());
    var tmp_13 = this.rqn();
    launch(tmp_13, VOID, VOID, ContentEntryListViewModel$slambda_0(this, null));
    var tmp_14 = this.rqn();
    launch(tmp_14, VOID, VOID, ContentEntryListViewModel$slambda_2(this, hasPermissionFlow, null));
    var tmp_15 = this.rqn();
    launch(tmp_15, VOID, VOID, ContentEntryListViewModel$slambda_4(this, savedStateHandle, null));
    var tmp_16 = this.rqn();
    launch(tmp_16, VOID, VOID, ContentEntryListViewModel$slambda_6(this, hasPermissionFlow, null));
  }
  protoOf(ContentEntryListViewModel).awr = function (entry) {
    var uiStateVal = this.vqv_1.t2();
    var tmp;
    if (uiStateVal.dwn_1 ? this.aqw().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var rightClickedItem = asSelectedItem(entry);
      if (!uiStateVal.awn_1.a1(rightClickedItem)) {
        setSelectedItems(this, emptySet());
      }
      var tmp_0 = this.aqo().moj(strings_getInstance().ann_1);
      var tmp_1 = new UstadContextMenuItem(tmp_0, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this, rightClickedItem));
      var tmp_2 = this.aqo().moj(strings_getInstance().kmj_1);
      tmp = listOf([tmp_1, new UstadContextMenuItem(tmp_2, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this, rightClickedItem))]);
    } else {
      tmp = emptyList();
    }
    return tmp;
  };
  protoOf(ContentEntryListViewModel).pqw = function (searchText) {
  };
  protoOf(ContentEntryListViewModel).qqw = function () {
  };
  protoOf(ContentEntryListViewModel).hvb = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.fwn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).ewt = function () {
    this.hvb();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickNewFolder.<anonymous>' call
    this_0.s('leaf', 'false');
    Companion_getInstance_125();
    this_0.s('parentUid', this.gwo_1.toString());
    var tmp$ret$2 = this_0.f3();
    this.iqx('ContentEntryEdit', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).fwt = function () {
    this.hvb();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickImportFromLink.<anonymous>' call
    this_0.s('leaf', 'true');
    Companion_getInstance_125();
    this_0.s('parentUid', this.gwo_1.toString());
    Companion_getInstance_125();
    this_0.s('next', 'ContentEntryEdit');
    this.oqo(this_0, Companion_getInstance_174().jwg_1);
    var tmp$ret$2 = this_0.f3();
    this.iqx('ContentEntryImportLink', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).gwt = function (fileUri, fileName) {
    this.hvb();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onImportFile.<anonymous>' call
    this_0.s('uri', fileUri);
    this_0.s('filename', fileName);
    Companion_getInstance_125();
    this_0.s('parentUid', this.gwo_1.toString());
    this.oqo(this_0, Companion_getInstance_174().jwg_1);
    var tmp$ret$2 = this_0.f3();
    this.iqx('ContentEntryGetMetadata', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).hwt = function (entry) {
    if (entry == null)
      return Unit_instance;
    var tmp0_safe_receiver = this.aqn_1.ba('goToOnContentEntryDone');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    var goToOnContentEntryEdit = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    if (entry.caw_1 ? this.lwo_1 : false)
      return Unit_instance;
    else {
      var tmp;
      if (this.aqw().equals(ListViewMode_PICKER_getInstance()) ? entry.caw_1 : false) {
        tmp = goToOnContentEntryEdit === 1;
      } else {
        tmp = false;
      }
      if (tmp) {
        Companion_getInstance_174();
        var tmp2_nextViewName = 'CourseBlockEdit';
        var tmp3_key = 'courseblock';
        var tmp4_serializer = Companion_getInstance_13().n4r();
        // Inline function 'kotlin.collections.buildMap' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'kotlin.collections.buildMapInternal' call
        // Inline function 'kotlin.apply' call
        var this_0 = LinkedHashMap_init_$Create$();
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickEntry.<anonymous>' call
        this.oqo(this_0, Companion_getInstance_174().jwg_1);
        Companion_getInstance_174();
        this_0.s('SelectedContentEntry', this.m4r().r45(Companion_instance_41.n4r(), new ContentEntryAndContentJob(entry)));
        var tmp5_args = this_0.f3();
        this.iqo(tmp2_nextViewName, tmp3_key, null, tmp4_serializer, tmp5_args, VOID, false);
      } else {
        if (entry.caw_1) {
          Companion_getInstance_160();
          Companion_getInstance_116();
          var tmp_0 = to('entityUid', entry.nav_1.toString());
          Companion_getInstance_125();
          this.cqn_1.rp6('ContentEntry', mapOf([tmp_0, to('parentUid', this.gwo_1.toString())]));
        } else {
          var tmp_1;
          if (this.bqn_1 === 'ContentEntryListHome') {
            tmp_1 = 'ContentEntries';
          } else {
            tmp_1 = this.bqn_1;
          }
          var tmp_2 = tmp_1;
          // Inline function 'kotlin.collections.buildMap' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'kotlin.collections.buildMapInternal' call
          // Inline function 'kotlin.apply' call
          var this_1 = LinkedHashMap_init_$Create$();
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickEntry.<anonymous>' call
          this_1.s('filter', '1');
          Companion_getInstance_125();
          this_1.s('parentUid', entry.nav_1.toString());
          Companion_getInstance_116();
          this.nqo(this_1, 'result_key');
          Companion_getInstance_116();
          this.nqo(this_1, 'result_viewname');
          this.nqo(this_1, 'selectFolder');
          this.nqo(this_1, 'goToOnContentEntryDone');
          var tmp$ret$5 = this_1.f3();
          this.cqn_1.rp6(tmp_2, tmp$ret$5);
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).iwt = function () {
    // Inline function 'kotlin.apply' call
    var this_0 = new ContentEntry();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickSelectThisFolder.<anonymous>' call
    this_0.nav_1 = this.gwo_1;
    this.lqt(this_0);
  };
  protoOf(ContentEntryListViewModel).jwt = function (entry, selected) {
    var currentSelection = this.vqv_1.t2().awn_1;
    var tmp;
    if (selected) {
      tmp = toSet(plus_2(currentSelection, asSelectedItem(entry)));
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = currentSelection.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onSetSelected.<anonymous>' call
        var tmp0_safe_receiver = entry.qay_1;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nav_1;
        if (!element.gp3_1.equals(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.i1(element);
        }
      }
      tmp = toSet(destination);
    }
    setSelectedItems(this, tmp);
  };
  protoOf(ContentEntryListViewModel).osz = function (filterOption) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.vqv_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickFilterChip.<anonymous>' call
    if (!(this_0.t2().qwm_1 === filterOption.pq7_1)) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        while (true) {
          var prevValue = tmp0_safe_receiver.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickFilterChip.<anonymous>' call
          var nextValue = prevValue.fwn(VOID, VOID, filterOption.pq7_1);
          if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    this.aqn_1.dqj('chipId', filterOption.pq7_1.toString());
    this.xqv_1.i1h(new RefreshCommand());
  };
  function Companion_153() {
    Companion_instance_202 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().xmm_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().xmm_1;
    tmp.kwt_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_202;
  function Companion_getInstance_170() {
    if (Companion_instance_202 == null)
      new Companion_153();
    return Companion_instance_202;
  }
  function ContentEntryListUiState$_init_$lambda_76lpy3() {
    return new EmptyPagingSource();
  }
  function ContentEntryListUiState$_init_$lambda_76lpy3_0(it) {
    return emptyList();
  }
  function ContentEntryListUiState(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) {
    Companion_getInstance_170();
    filterMode = filterMode === VOID ? 1 : filterMode;
    var tmp;
    if (contentEntryList === VOID) {
      tmp = ContentEntryListUiState$_init_$lambda_76lpy3;
    } else {
      tmp = contentEntryList;
    }
    contentEntryList = tmp;
    selectedChipId = selectedChipId === VOID ? 1 : selectedChipId;
    var tmp_0;
    if (filterOptions === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_0 = emptyList();
    } else {
      tmp_0 = filterOptions;
    }
    filterOptions = tmp_0;
    showHiddenEntries = showHiddenEntries === VOID ? false : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? false : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? Companion_getInstance_170().kwt_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? first_0(sortOptions) : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? false : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? false : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? false : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? emptySet() : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? false : showSelectFolderButton;
    var tmp_1;
    if (contextMenuItems === VOID) {
      tmp_1 = ContentEntryListUiState$_init_$lambda_76lpy3_0;
    } else {
      tmp_1 = contextMenuItems;
    }
    contextMenuItems = tmp_1;
    hasWritePermission = hasWritePermission === VOID ? false : hasWritePermission;
    this.owm_1 = filterMode;
    this.pwm_1 = contentEntryList;
    this.qwm_1 = selectedChipId;
    this.rwm_1 = filterOptions;
    this.swm_1 = showHiddenEntries;
    this.twm_1 = onlyFolderFilter;
    this.uwm_1 = sortOptions;
    this.vwm_1 = activeSortOption;
    this.wwm_1 = createNewFolderItemVisible;
    this.xwm_1 = importFromLinkItemVisible;
    this.ywm_1 = importFromFileItemVisible;
    this.zwm_1 = createNewOptionsVisible;
    this.awn_1 = selectedEntries;
    this.bwn_1 = showSelectFolderButton;
    this.cwn_1 = contextMenuItems;
    this.dwn_1 = hasWritePermission;
    var tmp_2 = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.awn_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListUiState.selectedEntryUids.<anonymous>' call
      var tmp$ret$1 = item.gp3_1;
      destination.i1(tmp$ret$1);
    }
    tmp_2.ewn_1 = toSet(destination);
  }
  protoOf(ContentEntryListUiState).lwt = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.rwm_1.c1();
  };
  protoOf(ContentEntryListUiState).mwt = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) {
    return new ContentEntryListUiState(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission);
  };
  protoOf(ContentEntryListUiState).fwn = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission, $super) {
    filterMode = filterMode === VOID ? this.owm_1 : filterMode;
    contentEntryList = contentEntryList === VOID ? this.pwm_1 : contentEntryList;
    selectedChipId = selectedChipId === VOID ? this.qwm_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.rwm_1 : filterOptions;
    showHiddenEntries = showHiddenEntries === VOID ? this.swm_1 : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? this.twm_1 : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? this.uwm_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? this.vwm_1 : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? this.wwm_1 : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? this.xwm_1 : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? this.ywm_1 : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.zwm_1 : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? this.awn_1 : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? this.bwn_1 : showSelectFolderButton;
    contextMenuItems = contextMenuItems === VOID ? this.cwn_1 : contextMenuItems;
    hasWritePermission = hasWritePermission === VOID ? this.dwn_1 : hasWritePermission;
    return $super === VOID ? this.mwt(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) : $super.mwt.call(this, filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission);
  };
  protoOf(ContentEntryListUiState).toString = function () {
    return 'ContentEntryListUiState(filterMode=' + this.owm_1 + ', contentEntryList=' + this.pwm_1 + ', selectedChipId=' + this.qwm_1 + ', filterOptions=' + this.rwm_1 + ', showHiddenEntries=' + this.swm_1 + ', onlyFolderFilter=' + this.twm_1 + ', sortOptions=' + this.uwm_1 + ', activeSortOption=' + this.vwm_1 + ', createNewFolderItemVisible=' + this.wwm_1 + ', importFromLinkItemVisible=' + this.xwm_1 + ', importFromFileItemVisible=' + this.ywm_1 + ', createNewOptionsVisible=' + this.zwm_1 + ', selectedEntries=' + this.awn_1 + ', showSelectFolderButton=' + this.bwn_1 + ', contextMenuItems=' + this.cwn_1 + ', hasWritePermission=' + this.dwn_1 + ')';
  };
  protoOf(ContentEntryListUiState).hashCode = function () {
    var result = this.owm_1;
    result = imul(result, 31) + hashCode(this.pwm_1) | 0;
    result = imul(result, 31) + this.qwm_1 | 0;
    result = imul(result, 31) + hashCode(this.rwm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.swm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.twm_1) | 0;
    result = imul(result, 31) + hashCode(this.uwm_1) | 0;
    result = imul(result, 31) + this.vwm_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wwm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xwm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ywm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zwm_1) | 0;
    result = imul(result, 31) + hashCode(this.awn_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bwn_1) | 0;
    result = imul(result, 31) + hashCode(this.cwn_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dwn_1) | 0;
    return result;
  };
  protoOf(ContentEntryListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListUiState ? other : THROW_CCE();
    if (!(this.owm_1 === tmp0_other_with_cast.owm_1))
      return false;
    if (!equals(this.pwm_1, tmp0_other_with_cast.pwm_1))
      return false;
    if (!(this.qwm_1 === tmp0_other_with_cast.qwm_1))
      return false;
    if (!equals(this.rwm_1, tmp0_other_with_cast.rwm_1))
      return false;
    if (!(this.swm_1 === tmp0_other_with_cast.swm_1))
      return false;
    if (!(this.twm_1 === tmp0_other_with_cast.twm_1))
      return false;
    if (!equals(this.uwm_1, tmp0_other_with_cast.uwm_1))
      return false;
    if (!this.vwm_1.equals(tmp0_other_with_cast.vwm_1))
      return false;
    if (!(this.wwm_1 === tmp0_other_with_cast.wwm_1))
      return false;
    if (!(this.xwm_1 === tmp0_other_with_cast.xwm_1))
      return false;
    if (!(this.ywm_1 === tmp0_other_with_cast.ywm_1))
      return false;
    if (!(this.zwm_1 === tmp0_other_with_cast.zwm_1))
      return false;
    if (!equals(this.awn_1, tmp0_other_with_cast.awn_1))
      return false;
    if (!(this.bwn_1 === tmp0_other_with_cast.bwn_1))
      return false;
    if (!equals(this.cwn_1, tmp0_other_with_cast.cwn_1))
      return false;
    if (!(this.dwn_1 === tmp0_other_with_cast.dwn_1))
      return false;
    return true;
  };
  function Companion_154() {
  }
  protoOf(Companion_154).n4r = function () {
    return $serializer_getInstance_74();
  };
  var Companion_instance_203;
  function Companion_getInstance_171() {
    return Companion_instance_203;
  }
  function $serializer_62() {
    $serializer_instance_62 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListSelectedItem', this, 3);
    tmp0_serialDesc.t4f('contentEntryUid', false);
    tmp0_serialDesc.t4f('contentEntryParentChildJoinUid', false);
    tmp0_serialDesc.t4f('parentContentEntryUid', false);
    this.nwt_1 = tmp0_serialDesc;
  }
  protoOf($serializer_62).q44 = function () {
    return this.nwt_1;
  };
  protoOf($serializer_62).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [LongSerializer_getInstance(), LongSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_62).s44 = function (decoder) {
    var tmp0_desc = this.nwt_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = new Long(0, 0);
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = new Long(0, 0);
    var tmp7_input = decoder.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.o48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.o48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.o48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.o48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return ContentEntryListSelectedItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_62).owt = function (encoder, value) {
    var tmp0_desc = this.nwt_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.s49(tmp0_desc, 0, value.gp3_1);
    tmp1_output.s49(tmp0_desc, 1, value.hp3_1);
    tmp1_output.s49(tmp0_desc, 2, value.ip3_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_62).r44 = function (encoder, value) {
    return this.owt(encoder, value instanceof ContentEntryListSelectedItem ? value : THROW_CCE());
  };
  var $serializer_instance_62;
  function $serializer_getInstance_74() {
    if ($serializer_instance_62 == null)
      new $serializer_62();
    return $serializer_instance_62;
  }
  function ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_74().nwt_1);
    }
    $this.gp3_1 = contentEntryUid;
    $this.hp3_1 = contentEntryParentChildJoinUid;
    $this.ip3_1 = parentContentEntryUid;
    return $this;
  }
  function ContentEntryListSelectedItem_init_$Create$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker) {
    return ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, objectCreate(protoOf(ContentEntryListSelectedItem)));
  }
  function ContentEntryListSelectedItem(contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid) {
    this.gp3_1 = contentEntryUid;
    this.hp3_1 = contentEntryParentChildJoinUid;
    this.ip3_1 = parentContentEntryUid;
  }
  protoOf(ContentEntryListSelectedItem).toString = function () {
    return 'ContentEntryListSelectedItem(contentEntryUid=' + this.gp3_1.toString() + ', contentEntryParentChildJoinUid=' + this.hp3_1.toString() + ', parentContentEntryUid=' + this.ip3_1.toString() + ')';
  };
  protoOf(ContentEntryListSelectedItem).hashCode = function () {
    var result = this.gp3_1.hashCode();
    result = imul(result, 31) + this.hp3_1.hashCode() | 0;
    result = imul(result, 31) + this.ip3_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryListSelectedItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryListSelectedItem))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListSelectedItem ? other : THROW_CCE();
    if (!this.gp3_1.equals(tmp0_other_with_cast.gp3_1))
      return false;
    if (!this.hp3_1.equals(tmp0_other_with_cast.hp3_1))
      return false;
    if (!this.ip3_1.equals(tmp0_other_with_cast.ip3_1))
      return false;
    return true;
  };
  function asSelectedItem(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.qay_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nav_1;
    var tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp2_safe_receiver = _this__u8e3s4.say_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.xay_1;
    var tmp_0 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    var tmp4_safe_receiver = _this__u8e3s4.say_1;
    var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.uay_1;
    return new ContentEntryListSelectedItem(tmp, tmp_0, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs);
  }
  function moveContentEntriesUseCase$factory() {
    return getPropertyCallableRef('moveContentEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_moveContentEntriesUseCase__fb3hfi(receiver);
    }, null);
  }
  function deleteEntriesUseCase$factory() {
    return getPropertyCallableRef('deleteEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_deleteEntriesUseCase__hkwqc9(receiver);
    }, null);
  }
  function moveContentEntriesUseCase$factory_0() {
    return getPropertyCallableRef('moveContentEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_moveContentEntriesUseCase__fb3hfi(receiver);
    }, null);
  }
  function deleteEntriesUseCase$factory_0() {
    return getPropertyCallableRef('deleteEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_deleteEntriesUseCase__hkwqc9(receiver);
    }, null);
  }
  function SubtitleEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda).ywt = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.ywt(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).yny = function (db, completion) {
    var i = new SubtitleEditViewModel$slambda$slambda(completion);
    i.xwt_1 = db;
    return i;
  };
  function SubtitleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.ywt(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.hwu_1 = $savedStateHandle;
    this.iwu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda_1).jwu = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.jwu($completion);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_elvis_lhs = this.hwu_1.ba('uri');
          var tmp2_uri = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
          var tmp1_elvis_lhs = this.hwu_1.ba('filename');
          var tmp3_title = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
          var tmp4_langCode = _get_supportedLanguagesConfig__bd0744(this.iwu_1).qpm_1;
          return new SubtitleTrack(tmp2_uri, 'text/vtt', tmp4_langCode, tmp3_title);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new SubtitleEditViewModel$slambda$slambda_1(this.hwu_1, this.iwu_1, completion);
  };
  function SubtitleEditViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($completion) {
      return i.jwu($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SubtitleEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.iwv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nwv(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_supportedLanguagesConfig__bd0744($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hwv_1;
    supportedLanguagesConfig$factory_0();
    return this_0.t2();
  }
  function Companion_155() {
    this.owv_1 = 'uri';
    this.pwv_1 = 'filename';
    this.qwv_1 = 'SubtitleEdit';
  }
  var Companion_instance_204;
  function Companion_getInstance_172() {
    return Companion_instance_204;
  }
  function SubtitleEditViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.rwv();
      return Unit_instance;
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.aww_1 = this$0;
    this.bww_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_80.n4r();
            var tmp_1 = SubtitleEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SubtitleEditViewModel$slambda$slambda_2(this.bww_1, this.aww_1, null);
            suspendResult = this.aww_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, SubtitleEditViewModel$slambda$lambda(this.aww_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.aww_1.iwv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nwv(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.aww_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.fq6_1.nq5(true));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SubtitleEditViewModel$slambda(this.aww_1, this.bww_1, completion);
    i.cww_1 = $this$launch;
    return i;
  };
  function SubtitleEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.lww_1 = $commitDelay;
    this.mww_1 = $entity;
    this.nww_1 = $this;
    this.oww_1 = $key;
    this.pww_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.lww_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.mww_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.nww_1.gqo(this.nww_1.aqn_1, this.oww_1, this.pww_1, this.mww_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SubtitleEditViewModel$onEntityChanged$slambda(this.lww_1, this.mww_1, this.nww_1, this.oww_1, this.pww_1, completion);
    i.qww_1 = $this$launch;
    return i;
  };
  function SubtitleEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SubtitleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SubtitleEdit');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.hwv_1 = Instance(this, tmp$ret$0, null).a5d(this, supportedLanguagesConfig$factory());
    this.iwv_1 = MutableStateFlow(new SubtitleEditUiState());
    this.jwv_1 = asSharedFlow(this.iwv_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>' call
        var tmp_1 = this.aqo().moj(strings_getInstance().snq_1);
        var tmp_2 = this.aqo().moj(strings_getInstance().qmr_1);
        var nextValue = prevValue.mq6(VOID, VOID, tmp_1, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(VOID, tmp_2, VOID, SubtitleEditViewModel$onClickDone$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.rqn();
    launch(tmp_3, VOID, VOID, SubtitleEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(SubtitleEditViewModel).rww = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iwv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.nwv(entity);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_80.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.hqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.rqn();
    tmp.hqt_1 = launch(tmp_0, VOID, VOID, SubtitleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SubtitleEditViewModel).rwv = function () {
    this.lqt(this.iwv_1.t2().kwv_1);
  };
  function SubtitleEditUiState(entity, titleError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    titleError = titleError === VOID ? null : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.kwv_1 = entity;
    this.lwv_1 = titleError;
    this.mwv_1 = fieldsEnabled;
  }
  protoOf(SubtitleEditUiState).sww = function (entity, titleError, fieldsEnabled) {
    return new SubtitleEditUiState(entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).nwv = function (entity, titleError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.kwv_1 : entity;
    titleError = titleError === VOID ? this.lwv_1 : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.mwv_1 : fieldsEnabled;
    return $super === VOID ? this.sww(entity, titleError, fieldsEnabled) : $super.sww.call(this, entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).toString = function () {
    return 'SubtitleEditUiState(entity=' + this.kwv_1 + ', titleError=' + this.lwv_1 + ', fieldsEnabled=' + this.mwv_1 + ')';
  };
  protoOf(SubtitleEditUiState).hashCode = function () {
    var result = this.kwv_1 == null ? 0 : this.kwv_1.hashCode();
    result = imul(result, 31) + (this.lwv_1 == null ? 0 : getStringHashCode(this.lwv_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mwv_1) | 0;
    return result;
  };
  protoOf(SubtitleEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubtitleEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SubtitleEditUiState ? other : THROW_CCE();
    if (!equals(this.kwv_1, tmp0_other_with_cast.kwv_1))
      return false;
    if (!(this.lwv_1 == tmp0_other_with_cast.lwv_1))
      return false;
    if (!(this.mwv_1 === tmp0_other_with_cast.mwv_1))
      return false;
    return true;
  };
  function supportedLanguagesConfig$factory() {
    return getPropertyCallableRef('supportedLanguagesConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLanguagesConfig__bd0744(receiver);
    }, null);
  }
  function supportedLanguagesConfig$factory_0() {
    return getPropertyCallableRef('supportedLanguagesConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLanguagesConfig__bd0744(receiver);
    }, null);
  }
  function _get_$cachedSerializer__te6jhj_2($this) {
    return $this.tww_1.t2();
  }
  function CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9() {
    return createSimpleEnumSerializer('com.ustadmobile.core.viewmodel.courseblock.CourseBlockViewModelConstants.CompletionCriteria', values_4());
  }
  var CompletionCriteria_AUTOMATIC_instance;
  var CompletionCriteria_MIN_SCORE_instance;
  var CompletionCriteria_STUDENT_SELF_MARKS_instance;
  var CompletionCriteria_ASSIGNMENT_SUBMITTED_instance;
  var CompletionCriteria_ASSIGNMENT_GRADED_instance;
  function Companion_156() {
    Companion_instance_205 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.tww_1 = lazy(tmp_0, CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9);
  }
  protoOf(Companion_156).nkb = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var indexedObject = values_4();
      var inductionVariable = 0;
      var last = indexedObject.length;
      while (inductionVariable < last) {
        var element = indexedObject[inductionVariable];
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.Companion.valueOf.<anonymous>' call
        if (element.xww_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? first_2(values_4()) : tmp0_elvis_lhs;
  };
  protoOf(Companion_156).n4r = function () {
    return _get_$cachedSerializer__te6jhj_2(this);
  };
  protoOf(Companion_156).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_205;
  function Companion_getInstance_173() {
    CompletionCriteria_initEntries();
    if (Companion_instance_205 == null)
      new Companion_156();
    return Companion_instance_205;
  }
  function values_4() {
    return [CompletionCriteria_AUTOMATIC_getInstance(), CompletionCriteria_MIN_SCORE_getInstance(), CompletionCriteria_STUDENT_SELF_MARKS_getInstance(), CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()];
  }
  var CompletionCriteria_entriesInitialized;
  function CompletionCriteria_initEntries() {
    if (CompletionCriteria_entriesInitialized)
      return Unit_instance;
    CompletionCriteria_entriesInitialized = true;
    var tmp = strings_getInstance().gn6_1;
    CompletionCriteria_AUTOMATIC_instance = new CompletionCriteria('AUTOMATIC', 0, tmp, 0);
    var tmp_0 = strings_getInstance().fn6_1;
    CompletionCriteria_MIN_SCORE_instance = new CompletionCriteria('MIN_SCORE', 1, tmp_0, 1);
    var tmp_1 = strings_getInstance().hn6_1;
    CompletionCriteria_STUDENT_SELF_MARKS_instance = new CompletionCriteria('STUDENT_SELF_MARKS', 2, tmp_1, 2);
    var tmp_2 = strings_getInstance().mn6_1;
    CompletionCriteria_ASSIGNMENT_SUBMITTED_instance = new CompletionCriteria('ASSIGNMENT_SUBMITTED', 3, tmp_2, 100);
    var tmp_3 = strings_getInstance().wng_1;
    CompletionCriteria_ASSIGNMENT_GRADED_instance = new CompletionCriteria('ASSIGNMENT_GRADED', 4, tmp_3, 102);
    Companion_getInstance_173();
  }
  function CompletionCriteria(name, ordinal, stringResource, value) {
    Enum.call(this, name, ordinal);
    this.www_1 = stringResource;
    this.xww_1 = value;
  }
  function CompletionCriteria_AUTOMATIC_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_AUTOMATIC_instance;
  }
  function CompletionCriteria_MIN_SCORE_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_MIN_SCORE_instance;
  }
  function CompletionCriteria_STUDENT_SELF_MARKS_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_STUDENT_SELF_MARKS_instance;
  }
  function CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_ASSIGNMENT_SUBMITTED_instance;
  }
  function CompletionCriteria_ASSIGNMENT_GRADED_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_ASSIGNMENT_GRADED_instance;
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.gwx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.hwx_1.xq9_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var descriptionHtml = tmp_1;
          var tmp1_safe_receiver = this.gwx_1.fwy_1.t2().cu0_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.nk8_1;
          this.gwx_1.hwy(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hkm(VOID, VOID, VOID, VOID, VOID, descriptionHtml));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).rqa = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this.gwx_1, completion);
    i.hwx_1 = result;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.qwy_1 = this$0;
    this.rwy_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.swy_1.xq9_1;
          var tmp0_elvis_lhs = tmp_0 instanceof ContentEntryAndContentJob ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var contentEntryResult = tmp_1;
          l$ret$1: do {
            var this_0 = this.qwy_1.fwy_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.cu0_1;
              var nextValue = prevValue.nu0(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk8(VOID, VOID, contentEntryResult.ok7_1, VOID, contentEntryResult.qk7_1, contentEntryResult.pk7_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          this.rwy_1.dqj('SavedSelectedContentEntry', this.qwy_1.m4r().r45(Companion_instance_41.n4r(), contentEntryResult));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).rqa = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this.qwy_1, this.rwy_1, completion);
    i.swy_1 = result;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda).vu1 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.vu1(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).yny = function (it, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda(completion);
    i.bwz_1 = it;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.vu1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    this.kwz_1 = this$0;
    this.lwz_1 = $savedStateHandle;
    this.mwz_1 = $selectedContentEntry;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).fu2 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.fu2($completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = get_doorPrimaryKeyManager(this.kwz_1.uqn());
            suspendResult = tmp_0.o62(124, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newUid = suspendResult;
            var this_0 = new CourseBlock();
            this_0.t7x_1 = newUid;
            this_0.j7y_1 = true;
            var tmp_1 = this_0;
            var tmp0_safe_receiver = this.lwz_1.ba('blockType');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
            var tmp_2;
            if (tmp1_elvis_lhs == null) {
              tmp_2 = 100;
            } else {
              tmp_2 = tmp1_elvis_lhs;
            }

            tmp_1.u7x_1 = tmp_2;
            var tmp_3 = this_0;
            var tmp2_safe_receiver = this.mwz_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ok7_1;
            tmp_3.x7x_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.oav_1;
            var tmp_4 = this_0;
            var tmp4_safe_receiver = this.mwz_1;
            var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.ok7_1;
            tmp_4.y7x_1 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.pav_1;
            if (!(this.mwz_1 == null)) {
              var tmp_5 = this_0;
              var tmp6_safe_receiver = this.mwz_1.ok7_1;
              var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.nav_1;
              tmp_5.l7y_1 = tmp7_elvis_lhs == null ? new Long(0, 0) : tmp7_elvis_lhs;
              var tmp_6 = this_0;
              tmp_6.u7x_1 = 104;
            }

            var tmp0_safe_receiver_0 = this.mwz_1;
            var tmp5_contentEntry = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.ok7_1;
            var tmp3_safe_receiver_0 = this.mwz_1;
            var tmp6_contentJob = tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.pk7_1;
            var tmp2_safe_receiver_0 = this.mwz_1;
            var tmp7_contentJobItem = tmp2_safe_receiver_0 == null ? null : tmp2_safe_receiver_0.qk7_1;
            var tmp8_courseBlockPicture = new CourseBlockPicture(newUid);
            var tmp1_safe_receiver = this.mwz_1;
            var tmp9_contentEntryPicture = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rk7_1;
            return new CourseBlockAndEditEntities(this_0, tmp8_courseBlockPicture, tmp5_contentEntry, tmp9_contentEntryPicture, tmp7_contentJobItem, tmp6_contentJob);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new CourseBlockEditViewModel$slambda$slambda_1(this.kwz_1, this.lwz_1, this.mwz_1, completion);
  };
  function CourseBlockEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation);
    var l = function ($completion) {
      return i.fu2($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseBlockEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.fwy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nu0(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseBlockEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.vwz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.vwz_1.eqo(this.vwz_1.zqn(), 'courseBlockDesc');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_0(this.vwz_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_27(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda_3(this.vwz_1, completion);
    i.wwz_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_5(this$0, $savedStateHandle, resultContinuation) {
    this.fx0_1 = this$0;
    this.gx0_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.fx0_1.eqo(this.fx0_1.zqn(), 'courseBlockEditContentEntry');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_2(this.fx0_1, this.gx0_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_27(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda_5(this.fx0_1, this.gx0_1, completion);
    i.hx0_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_6(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_5(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_157() {
    Companion_instance_206 = this;
    this.dwg_1 = 'CourseBlockEdit';
    this.ewg_1 = 'SelectedContentEntry';
    this.fwg_1 = 'blockType';
    this.gwg_1 = 'courseBlockDesc';
    this.hwg_1 = 'courseBlockEditContentEntry';
    this.iwg_1 = 'SavedSelectedContentEntry';
    var tmp = this;
    Companion_getInstance_125();
    Companion_getInstance_116();
    Companion_getInstance_116();
    tmp.jwg_1 = listOf(['blockType', 'clazzUid', 'goToOnContentEntryDone', 'blockType', 'result_viewname', 'result_key', 'listMode']);
  }
  var Companion_instance_206;
  function Companion_getInstance_174() {
    if (Companion_instance_206 == null)
      new Companion_157();
    return Companion_instance_206;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_27(function_0) {
    this.ix0_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_27).t1d = function (value, $completion) {
    return this.ix0_1(value, $completion);
  };
  function CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.rx0_1 = this$0;
    this.sx0_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            suspendResult = this.rx0_1.fqo(this.sx0_1, 'SelectedContentEntry', Companion_instance_41.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ux0_1 = suspendResult;
            this.vx0_1 = Companion_getInstance_13().n4r();
            this.hd_1 = 2;
            var tmp_0 = CourseBlockEditViewModel$slambda$slambda_0(null);
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda_2(this.rx0_1, this.sx0_1, this.ux0_1, null);
            suspendResult = this.rx0_1.kqo(this.vx0_1, VOID, VOID, tmp_0, tmp_1, CourseBlockEditViewModel$slambda$lambda(this.rx0_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.wx0_1 = suspendResult;
            var tmp_2 = this;
            var tmp1_safe_receiver = this.wx0_1;
            tmp_2.xx0_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pk8_1;
            var tmp_3 = this;
            var tmp2_safe_receiver = this.wx0_1;
            tmp_3.yx0_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.nk8_1;
            if (!(this.xx0_1 == null) ? !(this.yx0_1 == null) : false) {
              Companion_getInstance_115();
              if (this.sx0_1.ba('entity') == null) {
                this.zx0_1 = false;
                this.hd_1 = 4;
                continue $sm;
              } else {
                var tmp_4;
                var tmp_5 = this.xx0_1.jaw_1;
                if (tmp_5 === 2) {
                  tmp_4 = this.xx0_1.iaw_1.equals(this.yx0_1.t7x_1);
                } else {
                  tmp_4 = false;
                }
                if (tmp_4) {
                  var tmp_6 = this;
                  tmp_6.zx0_1 = true;
                  this.hd_1 = 4;
                  continue $sm;
                } else {
                  var tmp_7 = this.xx0_1.jaw_1;
                  if (tmp_7 === 2) {
                    this.hd_1 = 3;
                    var tmp_8 = this.rx0_1.wqn().o7f();
                    var tmp_9 = this.rx0_1.sqn();
                    var tmp_10 = this.xx0_1.iaw_1;
                    PermissionFlags_getInstance();
                    suspendResult = tmp_8.jdk(tmp_9, tmp_10, new Long(2, 0), this);
                    if (suspendResult === get_COROUTINE_SUSPENDED()) {
                      return suspendResult;
                    }
                    continue $sm;
                  } else {
                    this.zx0_1 = false;
                    this.hd_1 = 4;
                    continue $sm;
                  }
                }
              }
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 3:
            this.zx0_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var canEditContentEntry = this.zx0_1;
            l$ret$1: do {
              var this_0 = this.rx0_1.fwy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nu0(VOID, canEditContentEntry);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            l$ret$3: do {
              var this_1 = this.rx0_1.fwy_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.nu0(VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            l$ret$5: do {
              var this_2 = this.rx0_1.eqn_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var tmp0_safe_receiver = this.yx0_1;
                var tmp1_subject = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u7x_1;
                var tmp_11;
                if (tmp1_subject === 100) {
                  tmp_11 = this.rx0_1.kqu(strings_getInstance().fnj_1, strings_getInstance().qnh_1);
                } else {
                  if (tmp1_subject === 102) {
                    tmp_11 = this.rx0_1.kqu(strings_getInstance().enh_1, strings_getInstance().enj_1);
                  } else {
                    if (tmp1_subject === 105) {
                      tmp_11 = this.rx0_1.kqu(strings_getInstance().gnk_1, strings_getInstance().hnk_1);
                    } else {
                      if (tmp1_subject === 104) {
                        tmp_11 = this.rx0_1.aqo().moj(strings_getInstance().vno_1);
                      } else {
                        tmp_11 = '';
                      }
                    }
                  }
                }
                var tmp_12 = tmp_11;
                var tmp_13 = this.rx0_1.aqo().moj(strings_getInstance().qmr_1);
                var nextValue_1 = prevValue_1.mq6(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_13, VOID, CourseBlockEditViewModel$onClickSave$ref(this.rx0_1)));
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            launch(this.tx0_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_4(this.rx0_1, null));
            launch(this.tx0_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_6(this.rx0_1, this.sx0_1, null));
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda(this.rx0_1, this.sx0_1, completion);
    i.tx0_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.ix1_1 = $commitDelay;
    this.jx1_1 = $entity;
    this.kx1_1 = $this;
    this.lx1_1 = $key;
    this.mx1_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.ix1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.jx1_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.kx1_1.gqo(this.kx1_1.aqn_1, this.lx1_1, this.mx1_1, this.jx1_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$onEntityChanged$slambda(this.ix1_1, this.jx1_1, this.kx1_1, this.lx1_1, this.mx1_1, completion);
    i.nx1_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseBlockEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.wx1_1 = $commitDelay;
    this.xx1_1 = $entity;
    this.yx1_1 = $this;
    this.zx1_1 = $key;
    this.ax2_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.wx1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.xx1_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.yx1_1.gqo(this.yx1_1.aqn_1, this.zx1_1, this.ax2_1, this.xx1_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$onPictureChanged$slambda(this.wx1_1, this.xx1_1, this.yx1_1, this.zx1_1, this.ax2_1, completion);
    i.bx2_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$onPictureChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseBlockEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel(di, savedStateHandle) {
    Companion_getInstance_174();
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseBlockEdit');
    this.fwy_1 = MutableStateFlow(new CourseBlockEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_getInstance_9().xmh().ymg()));
    this.gwy_1 = asStateFlow(this.fwy_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, CourseBlockEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(CourseBlockEditViewModel).hwy = function (courseBlock) {
    if (courseBlock == null)
      return Unit_instance;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.fwy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.cu0_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk8(courseBlock);
        var tmp1_safe_receiver = prevValue.cu0_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.nk8_1;
        var nextValue = prevValue.nu0(tmp, VOID, VOID, VOID, VOID, this.lqu(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.x7x_1, courseBlock.x7x_1, prevValue.hu0_1));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.cu0_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_13().n4r();
    Companion_getInstance_115();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.rqn();
    tmp_0.hqt_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onEntityChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).cx2 = function () {
    var tmp0_safe_receiver = this.fwy_1.t2().cu0_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xk8();
    var tmp_0 = Companion_instance_41.n4r();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickEditContentEntry.<anonymous>' call
    var tmp0_safe_receiver_0 = this.fwy_1.t2().cu0_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickEditContentEntry.<anonymous>.<anonymous>' call
      // Inline function 'kotlin.collections.set' call
      var key = 'courseBlock';
      var value = this.m4r().r45(Companion_instance_14.n4r(), tmp0_safe_receiver_0.nk8_1);
      this_0.s(key, value);
      // Inline function 'kotlin.collections.set' call
      var key_0 = 'goToOnContentEntryDone';
      var value_0 = (2).toString();
      this_0.s(key_0, value_0);
    }
    var tmp$ret$3 = this_0.f3();
    this.iqo('ContentEntryEdit', 'courseBlockEditContentEntry', tmp, tmp_0, tmp$ret$3);
  };
  protoOf(CourseBlockEditViewModel).du8 = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.fwy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.cu0_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.cu0_1.ok8_1;
          tmp = tmp1_safe_receiver.zk8(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lkm(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.nu0(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.cu0_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_13().n4r();
    Companion_getInstance_115();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.rqn();
    tmp_0.hqt_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onPictureChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).asa = function () {
    var tmp0_elvis_lhs = this.fwy_1.t2().cu0_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var courseBlockVal = tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = courseBlockVal.nk8_1.x7x_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : isBlank(this_0)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.fwy_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.nu0(VOID, VOID, VOID, VOID, VOID, this.aqo().moj(strings_getInstance().wnl_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (this.fwy_1.t2().ru4())
      return Unit_instance;
    this.lqt(this.fwy_1.t2().cu0_1);
  };
  function Companion_158() {
    Companion_instance_207 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.dx2_1 = [null, null, new ArrayListSerializer(Companion_getInstance_173().n4r()), null, null, null, null, null, null, null, null];
  }
  var Companion_instance_207;
  function Companion_getInstance_175() {
    if (Companion_instance_207 == null)
      new Companion_158();
    return Companion_instance_207;
  }
  function $serializer_63() {
    $serializer_instance_63 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditUiState', this, 11);
    tmp0_serialDesc.t4f('block', true);
    tmp0_serialDesc.t4f('canEditSelectedContentEntry', true);
    tmp0_serialDesc.t4f('completionCriteriaOptions', true);
    tmp0_serialDesc.t4f('fieldsEnabled', true);
    tmp0_serialDesc.t4f('caHideUntilDateError', true);
    tmp0_serialDesc.t4f('caTitleError', true);
    tmp0_serialDesc.t4f('caDeadlineError', true);
    tmp0_serialDesc.t4f('caMaxPointsError', true);
    tmp0_serialDesc.t4f('maxPointsRequired', true);
    tmp0_serialDesc.t4f('caGracePeriodError', true);
    tmp0_serialDesc.t4f('timeZone', true);
    this.ex2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_63).q44 = function () {
    return this.ex2_1;
  };
  protoOf($serializer_63).k4g = function () {
    var tmp0_cached = Companion_getInstance_175().dx2_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable($serializer_getInstance_7()), BooleanSerializer_getInstance(), tmp0_cached[2], BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_63).s44 = function (decoder) {
    var tmp0_desc = this.ex2_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = false;
    var tmp6_local2 = null;
    var tmp7_local3 = false;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = false;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_input = decoder.i48(tmp0_desc);
    var tmp16_cached = Companion_getInstance_175().dx2_1;
    if (tmp15_input.x48()) {
      tmp4_local0 = tmp15_input.w48(tmp0_desc, 0, $serializer_getInstance_7(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp15_input.k48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp15_input.u48(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp15_input.k48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp15_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp15_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp15_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp15_input.w48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp15_input.k48(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp15_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp15_input.s48(tmp0_desc, 10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp15_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp15_input.w48(tmp0_desc, 0, $serializer_getInstance_7(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp15_input.k48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp15_input.u48(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp15_input.k48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp15_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp15_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp15_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp15_input.w48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp15_input.k48(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp15_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp15_input.s48(tmp0_desc, 10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp15_input.j48(tmp0_desc);
    return CourseBlockEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, null);
  };
  protoOf($serializer_63).fx2 = function (encoder, value) {
    var tmp0_desc = this.ex2_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_175().dx2_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.cu0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, $serializer_getInstance_7(), value.cu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.du0_1 === false)) {
      tmp1_output.o49(tmp0_desc, 1, value.du0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !equals(value.eu0_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.eu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.fu0_1 === false)) {
      tmp1_output.o49(tmp0_desc, 3, value.fu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.gu0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.gu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.hu0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.hu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.iu0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, StringSerializer_getInstance(), value.iu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.ju0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, StringSerializer_getInstance(), value.ju0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.ku0_1 === false)) {
      tmp1_output.o49(tmp0_desc, 8, value.ku0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.lu0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, StringSerializer_getInstance(), value.lu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 10) ? true : !(value.mu0_1 === 'UTC')) {
      tmp1_output.w49(tmp0_desc, 10, value.mu0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_63).r44 = function (encoder, value) {
    return this.fx2(encoder, value instanceof CourseBlockEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_63;
  function $serializer_getInstance_75() {
    if ($serializer_instance_63 == null)
      new $serializer_63();
    return $serializer_instance_63;
  }
  function CourseBlockEditUiState_init_$Init$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_75().ex2_1);
    }
    if (0 === (seen1 & 1))
      $this.cu0_1 = null;
    else
      $this.cu0_1 = block;
    if (0 === (seen1 & 2))
      $this.du0_1 = false;
    else
      $this.du0_1 = canEditSelectedContentEntry;
    if (0 === (seen1 & 4))
      $this.eu0_1 = emptyList();
    else
      $this.eu0_1 = completionCriteriaOptions;
    if (0 === (seen1 & 8))
      $this.fu0_1 = false;
    else
      $this.fu0_1 = fieldsEnabled;
    if (0 === (seen1 & 16))
      $this.gu0_1 = null;
    else
      $this.gu0_1 = caHideUntilDateError;
    if (0 === (seen1 & 32))
      $this.hu0_1 = null;
    else
      $this.hu0_1 = caTitleError;
    if (0 === (seen1 & 64))
      $this.iu0_1 = null;
    else
      $this.iu0_1 = caDeadlineError;
    if (0 === (seen1 & 128))
      $this.ju0_1 = null;
    else
      $this.ju0_1 = caMaxPointsError;
    if (0 === (seen1 & 256))
      $this.ku0_1 = false;
    else
      $this.ku0_1 = maxPointsRequired;
    if (0 === (seen1 & 512))
      $this.lu0_1 = null;
    else
      $this.lu0_1 = caGracePeriodError;
    if (0 === (seen1 & 1024))
      $this.mu0_1 = 'UTC';
    else
      $this.mu0_1 = timeZone;
    return $this;
  }
  function CourseBlockEditUiState_init_$Create$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker) {
    return CourseBlockEditUiState_init_$Init$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker, objectCreate(protoOf(CourseBlockEditUiState)));
  }
  function CourseBlockEditUiState(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) {
    Companion_getInstance_175();
    block = block === VOID ? null : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? false : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? emptyList() : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? null : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? null : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? null : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? null : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? false : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? null : caGracePeriodError;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.cu0_1 = block;
    this.du0_1 = canEditSelectedContentEntry;
    this.eu0_1 = completionCriteriaOptions;
    this.fu0_1 = fieldsEnabled;
    this.gu0_1 = caHideUntilDateError;
    this.hu0_1 = caTitleError;
    this.iu0_1 = caDeadlineError;
    this.ju0_1 = caMaxPointsError;
    this.ku0_1 = maxPointsRequired;
    this.lu0_1 = caGracePeriodError;
    this.mu0_1 = timeZone;
  }
  protoOf(CourseBlockEditUiState).gx2 = function () {
    var tmp0_safe_receiver = this.cu0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z7x_1;
    return tmp === 1;
  };
  protoOf(CourseBlockEditUiState).hx2 = function () {
    var tmp;
    if (this.ix2()) {
      var tmp0_safe_receiver = this.cu0_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b7y_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).htw = function () {
    var tmp;
    if (this.hx2()) {
      var tmp0_safe_receiver = this.cu0_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.d7y_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).jx2 = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.eu0_1.c1();
  };
  protoOf(CourseBlockEditUiState).ix2 = function () {
    var tmp;
    var tmp0_safe_receiver = this.cu0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
    var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u7x_1;
    if (tmp_0 === 103) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.cu0_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.nk8_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.u7x_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).kx2 = function () {
    var tmp;
    var tmp0_safe_receiver = this.cu0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
    var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u7x_1;
    if (tmp_0 === 103) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.cu0_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.nk8_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.u7x_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).ru4 = function () {
    return ((!(this.hu0_1 == null) ? true : !(this.iu0_1 == null)) ? true : !(this.lu0_1 == null)) ? true : !(this.ju0_1 == null);
  };
  protoOf(CourseBlockEditUiState).lx2 = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) {
    return new CourseBlockEditUiState(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).nu0 = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, $super) {
    block = block === VOID ? this.cu0_1 : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? this.du0_1 : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? this.eu0_1 : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? this.fu0_1 : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? this.gu0_1 : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? this.hu0_1 : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? this.iu0_1 : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? this.ju0_1 : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? this.ku0_1 : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? this.lu0_1 : caGracePeriodError;
    timeZone = timeZone === VOID ? this.mu0_1 : timeZone;
    return $super === VOID ? this.lx2(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) : $super.lx2.call(this, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).toString = function () {
    return 'CourseBlockEditUiState(block=' + this.cu0_1 + ', canEditSelectedContentEntry=' + this.du0_1 + ', completionCriteriaOptions=' + this.eu0_1 + ', fieldsEnabled=' + this.fu0_1 + ', caHideUntilDateError=' + this.gu0_1 + ', caTitleError=' + this.hu0_1 + ', caDeadlineError=' + this.iu0_1 + ', caMaxPointsError=' + this.ju0_1 + ', maxPointsRequired=' + this.ku0_1 + ', caGracePeriodError=' + this.lu0_1 + ', timeZone=' + this.mu0_1 + ')';
  };
  protoOf(CourseBlockEditUiState).hashCode = function () {
    var result = this.cu0_1 == null ? 0 : this.cu0_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.du0_1) | 0;
    result = imul(result, 31) + hashCode(this.eu0_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fu0_1) | 0;
    result = imul(result, 31) + (this.gu0_1 == null ? 0 : getStringHashCode(this.gu0_1)) | 0;
    result = imul(result, 31) + (this.hu0_1 == null ? 0 : getStringHashCode(this.hu0_1)) | 0;
    result = imul(result, 31) + (this.iu0_1 == null ? 0 : getStringHashCode(this.iu0_1)) | 0;
    result = imul(result, 31) + (this.ju0_1 == null ? 0 : getStringHashCode(this.ju0_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ku0_1) | 0;
    result = imul(result, 31) + (this.lu0_1 == null ? 0 : getStringHashCode(this.lu0_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.mu0_1) | 0;
    return result;
  };
  protoOf(CourseBlockEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseBlockEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseBlockEditUiState ? other : THROW_CCE();
    if (!equals(this.cu0_1, tmp0_other_with_cast.cu0_1))
      return false;
    if (!(this.du0_1 === tmp0_other_with_cast.du0_1))
      return false;
    if (!equals(this.eu0_1, tmp0_other_with_cast.eu0_1))
      return false;
    if (!(this.fu0_1 === tmp0_other_with_cast.fu0_1))
      return false;
    if (!(this.gu0_1 == tmp0_other_with_cast.gu0_1))
      return false;
    if (!(this.hu0_1 == tmp0_other_with_cast.hu0_1))
      return false;
    if (!(this.iu0_1 == tmp0_other_with_cast.iu0_1))
      return false;
    if (!(this.ju0_1 == tmp0_other_with_cast.ju0_1))
      return false;
    if (!(this.ku0_1 === tmp0_other_with_cast.ku0_1))
      return false;
    if (!(this.lu0_1 == tmp0_other_with_cast.lu0_1))
      return false;
    if (!(this.mu0_1 === tmp0_other_with_cast.mu0_1))
      return false;
    return true;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ux2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).wx2 = function (it, $completion) {
    var tmp = this.xx2(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wx2((p1 == null ? true : p1 instanceof CourseBlockAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ux2_1.ux3_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yx3(this.vx2_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).xx2 = function (it, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this.ux2_1, completion);
    i.vx2_1 = it;
    return i;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.wx2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.hx4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.hx4_1.wqn().p7d().gcl(this.hx4_1.uqm_1);
            var tmp_1 = TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this.hx4_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_28(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda(this.hx4_1, completion);
    i.ix4_1 = $this$launch;
    return i;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.textblockdetail.TextBlockDetailViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function TextBlockDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.rx4_1 = $this_launch;
    this.sx4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.rx4_1, VOID, VOID, TextBlockDetailViewModel$slambda$slambda$slambda_0(this.sx4_1, null));
          launchSetTitleFromClazzUid(this.sx4_1, this.sx4_1.wx3_1, TextBlockDetailViewModel$slambda$slambda$lambda(this.sx4_1));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new TextBlockDetailViewModel$slambda$slambda(this.rx4_1, this.sx4_1, completion);
  };
  function TextBlockDetailViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_159() {
    this.tx4_1 = 'CourseText';
  }
  var Companion_instance_208;
  function Companion_getInstance_176() {
    return Companion_instance_208;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_28(function_0) {
    this.ux4_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_28).t1d = function (value, $completion) {
    return this.ux4_1(value, $completion);
  };
  function TextBlockDetailViewModel$slambda(this$0, resultContinuation) {
    this.dx5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.dx5_1.ux3_1, TextBlockDetailViewModel$slambda$slambda_0(this.ex5_1, this.dx5_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new TextBlockDetailViewModel$slambda(this.dx5_1, completion);
    i.ex5_1 = $this$launch;
    return i;
  };
  function TextBlockDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseText');
    this.ux3_1 = MutableStateFlow(new TextBlockDetailUiState());
    this.vx3_1 = asStateFlow(this.ux3_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.wx3_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, TextBlockDetailViewModel$slambda_0(this, null));
  }
  function TextBlockDetailUiState(courseBlock) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    this.xx3_1 = courseBlock;
  }
  protoOf(TextBlockDetailUiState).yx3 = function (courseBlock) {
    return new TextBlockDetailUiState(courseBlock);
  };
  protoOf(TextBlockDetailUiState).toString = function () {
    return 'TextBlockDetailUiState(courseBlock=' + this.xx3_1 + ')';
  };
  protoOf(TextBlockDetailUiState).hashCode = function () {
    return this.xx3_1 == null ? 0 : this.xx3_1.hashCode();
  };
  protoOf(TextBlockDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TextBlockDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof TextBlockDetailUiState ? other : THROW_CCE();
    if (!equals(this.xx3_1, tmp0_other_with_cast.xx3_1))
      return false;
    return true;
  };
  function CourseGroupSetDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.ex6();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).px6 = function (entity, permissionPair, $completion) {
    var tmp = this.qx6(entity, permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.px6(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return to(this.nx6_1, this.ox6_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).qx6 = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.nx6_1 = entity;
    i.ox6_1 = permissionPair;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissionPair, $completion) {
      return i.px6(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.zx6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).bx7 = function (it, $completion) {
    var tmp = this.cx7(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.bx7(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.ax7_1.x6_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasManageStudentPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.zx6_1.bx6_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.ax7_1.w6_1;
              var tmp_0;
              if (hasCourseViewPermission) {
                tmp_0 = this_1;
              } else {
                tmp_0 = null;
              }
              var tmp0_elvis_lhs = tmp_0;
              var nextValue = prevValue.fx7(VOID, tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.zx6_1.eqn_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_1 = this.zx6_1.aqo().moj(strings_getInstance().qmv_1);
              var tmp_2 = FabIcon_EDIT_getInstance();
              var nextValue_0 = prevValue_0.mq6(new FabUiState(hasManageStudentPermission, tmp_1, tmp_2, CourseGroupSetDetailViewModel$onClickEdit$ref(this.zx6_1)));
              if (this_2.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).cx7 = function (it, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this.zx6_1, completion);
    i.ax7_1 = it;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.bx7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).qx7 = function (entity, permissionPair, $completion) {
    var tmp = this.rx7(entity, permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof CourseGroupSet) ? p1 : THROW_CCE();
    return this.qx7(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.ox7_1;
          var tmp_0;
          if (this.px7_1.hdn_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).rx7 = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(completion);
    i.ox7_1 = entity;
    i.px7_1 = permissionPair;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(resultContinuation);
    var l = function (entity, permissionPair, $completion) {
      return i.qx7(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.ax8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).cx8 = function (courseGroupSet, $completion) {
    var tmp = this.dx8(courseGroupSet, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.cx8((p1 == null ? true : p1 instanceof CourseGroupSet) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ax8_1.bx6_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.fx7(this.bx8_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.ax8_1.eqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver = this.bx8_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7z_1;
              var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).dx8 = function (courseGroupSet, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this.ax8_1, completion);
    i.bx8_1 = courseGroupSet;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (courseGroupSet, $completion) {
      return i.cx8(courseGroupSet, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    this.mx8_1 = $memberListFlow;
    this.nx8_1 = $permissionsFlow;
    this.ox8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.mx8_1, this.nx8_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this.ox8_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_29(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda(this.mx8_1, this.nx8_1, this.ox8_1, completion);
    i.px8_1 = $this$launch;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_0($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_1($entityFlow, $permissionsFlow, this$0, resultContinuation) {
    this.yx8_1 = $entityFlow;
    this.zx8_1 = $permissionsFlow;
    this.ax9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.yx8_1, this.zx8_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(null));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this.ax9_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_29(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda_1(this.yx8_1, this.zx8_1, this.ax9_1, completion);
    i.bx9_1 = $this$launch;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_2($entityFlow, $permissionsFlow, this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda_1($entityFlow, $permissionsFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation) {
    this.kx9_1 = $this_launch;
    this.lx9_1 = $memberListFlow;
    this.mx9_1 = $permissionsFlow;
    this.nx9_1 = this$0;
    this.ox9_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.kx9_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_0(this.lx9_1, this.mx9_1, this.nx9_1, null));
          launch(this.kx9_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_2(this.ox9_1, this.mx9_1, this.nx9_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new CourseGroupSetDetailViewModel$slambda$slambda(this.kx9_1, this.lx9_1, this.mx9_1, this.nx9_1, this.ox9_1, completion);
  };
  function CourseGroupSetDetailViewModel$slambda$slambda_0($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_160() {
    this.px9_1 = 'CourseGroupSet';
  }
  var Companion_instance_209;
  function Companion_getInstance_177() {
    return Companion_instance_209;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_29(function_0) {
    this.qx9_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_29).t1d = function (value, $completion) {
    return this.qx9_1(value, $completion);
  };
  function CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation) {
    this.zx9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.zx9_1.wqn().o7f();
            var tmp_2 = this.zx9_1.sqn();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(1, 0);
            PermissionFlags_getInstance();
            tmp_0.bxa_1 = shareIn(tmp_1.gdk(tmp_2, this.zx9_1.dx6_1, tmp_3, new Long(8, 0)), this.zx9_1.rqn(), Companion_getInstance_12().v1h());
            this.cxa_1 = this.zx9_1.wqn().s7d().td3(this.zx9_1.uqm_1, this.zx9_1.dx6_1, systemTimeInMillis(), 0, this.zx9_1.sqn());
            this.dxa_1 = this.zx9_1.wqn().r7d().t8c(this.zx9_1.uqm_1);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.zx9_1.bx6_1, CourseGroupSetDetailViewModel$slambda$slambda_0(this.axa_1, this.cxa_1, this.bxa_1, this.zx9_1, this.dxa_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda(this.zx9_1, completion);
    i.axa_1 = $this$launch;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseGroupSet');
    this.bx6_1 = MutableStateFlow(new CourseGroupSetDetailUiState());
    this.cx6_1 = asStateFlow(this.bx6_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.dx6_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, CourseGroupSetDetailViewModel$slambda_0(this, null));
  }
  protoOf(CourseGroupSetDetailViewModel).ex6 = function () {
    Companion_getInstance_116();
    var tmp = to('entityUid', this.uqm_1.toString());
    Companion_getInstance_125();
    this.cqn_1.rp6('CourseGroupsEdit', mapOf([tmp, to('clazzUid', this.dx6_1.toString())]));
  };
  function CourseGroupSetDetailUiState(courseGroupSet, membersList) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    this.dx7_1 = courseGroupSet;
    this.ex7_1 = membersList;
  }
  protoOf(CourseGroupSetDetailUiState).exa = function (courseGroupSet, membersList) {
    return new CourseGroupSetDetailUiState(courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).fx7 = function (courseGroupSet, membersList, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.dx7_1 : courseGroupSet;
    membersList = membersList === VOID ? this.ex7_1 : membersList;
    return $super === VOID ? this.exa(courseGroupSet, membersList) : $super.exa.call(this, courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).toString = function () {
    return 'CourseGroupSetDetailUiState(courseGroupSet=' + this.dx7_1 + ', membersList=' + this.ex7_1 + ')';
  };
  protoOf(CourseGroupSetDetailUiState).hashCode = function () {
    var result = this.dx7_1 == null ? 0 : hashCode(this.dx7_1);
    result = imul(result, 31) + hashCode(this.ex7_1) | 0;
    return result;
  };
  protoOf(CourseGroupSetDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetDetailUiState ? other : THROW_CCE();
    if (!equals(this.dx7_1, tmp0_other_with_cast.dx7_1))
      return false;
    if (!equals(this.ex7_1, tmp0_other_with_cast.ex7_1))
      return false;
    return true;
  };
  function appendGroupNumIfNotInList(_this__u8e3s4, assignedGroupNum) {
    var tmp;
    var tmp0_elvis_lhs = lastOrNull(_this__u8e3s4);
    if ((tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) < assignedGroupNum) {
      tmp = plus(_this__u8e3s4, listOf_0(assignedGroupNum));
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.nxa_1 = this$0;
    this.oxa_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).bxb = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.bxb(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            suspendResult = this.pxa_1.s7d().sd3(this.nxa_1.iqt_1, this.nxa_1.bxc_1, systemTimeInMillis(), 0, this.nxa_1.sqn(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qxa_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.rxa_1 = this.qxa_1;
            var tmp_1 = this;
            tmp_1.sxa_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.qxa_1, 10));
            this.txa_1 = this.rxa_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.txa_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.uxa_1 = this.txa_1.e();
            var tmp_2 = this;
            tmp_2.vxa_1 = this.uxa_1;
            if (this.vxa_1.hd5_1 == null) {
              var tmp_3 = this;
              tmp_3.xxa_1 = new CourseGroupMemberAndName();
              var tmp_4 = this;
              tmp_4.yxa_1 = this.xxa_1;
              this.yxa_1.id5_1 = this.vxa_1.id5_1;
              this.yxa_1.kd5_1 = this.vxa_1.kd5_1;
              this.yxa_1.jd5_1 = this.vxa_1.jd5_1;
              this.yxa_1.ld5_1 = this.vxa_1.ld5_1;
              var tmp_5 = this;
              tmp_5.zxa_1 = new CourseGroupMember();
              var tmp_6 = this;
              tmp_6.axb_1 = this.zxa_1;
              this.hd_1 = 3;
              var tmp_7 = get_doorPrimaryKeyManager(this.nxa_1.uqn());
              suspendResult = tmp_7.o62(243, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.wxa_1 = this.vxa_1;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.axb_1.pd4_1 = ARGUMENT;
            this.axb_1.qd4_1 = this.oxa_1;
            this.axb_1.sd4_1 = this.vxa_1.jd5_1;
            var ARGUMENT_0 = this.zxa_1;
            this.yxa_1.hd5_1 = ARGUMENT_0;
            this.wxa_1 = this.xxa_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var ARGUMENT_1 = this.wxa_1;
            this.sxa_1.i1(ARGUMENT_1);
            this.hd_1 = 2;
            continue $sm;
          case 5:
            return this.sxa_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).yny = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this.nxa_1, this.oxa_1, completion);
    i.pxa_1 = db;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_0(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation);
    var l = function (db, $completion) {
      return i.bxb(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).kxc = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.kxc($completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).l78 = function (completion) {
    return new CourseGroupSetEditViewModel$slambda$slambda$slambda_1(completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_2(resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.kxc($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$lambda(this$0) {
    return function (memberList) {
      var tmp;
      if (!(memberList == null)) {
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_0 = this$0.zxb_1;
          while (true) {
            var prevValue = this_0.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
            var nextValue = prevValue.qxc(VOID, memberList);
            if (this_0.y1k(prevValue, nextValue)) {
              tmp$ret$1 = Unit_instance;
              break $l$block;
            }
          }
        }
        tmp = tmp$ret$1;
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.zxc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).dxd = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.dxd(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.axd_1;
            var tmp_1;
            if (!this.zxc_1.iqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.bxd_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r7d();
            if (this.bxd_1 == null) {
              this.cxd_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.bxd_1.pdc(this.zxc_1.iqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.cxd_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.cxd_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).yny = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this.zxc_1, completion);
    i.axd_1 = db;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.dxd(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation) {
    this.mxd_1 = $courseGroupSetUid;
    this.nxd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).rdg = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).m78 = function ($completion) {
    return this.rdg($completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new CourseGroupSet();
          this_0.a7z_1 = this.mxd_1;
          this_0.e7z_1 = this.nxd_1.bxc_1;
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).l78 = function (completion) {
    return new CourseGroupSetEditViewModel$slambda$slambda$slambda_5(this.mxd_1, this.nxd_1, completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_6($courseGroupSetUid, this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation);
    var l = function ($completion) {
      return i.rdg($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.zxb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.qxc(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.wxd_1 = this$0;
    this.xxd_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).zxd = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.zxd((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_instance_43.n4r());
            var tmp_1 = listOf_0('courseGroupMembers');
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_0(this.wxd_1, this.xxd_1, null);
            var tmp_3 = CourseGroupSetEditViewModel$slambda$slambda$slambda_2(null);
            suspendResult = this.wxd_1.kqo(tmp_0, tmp_1, VOID, tmp_2, tmp_3, CourseGroupSetEditViewModel$slambda$slambda$lambda(this.wxd_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda(this.wxd_1, this.xxd_1, completion);
    i.yxd_1 = $this$async;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda_0(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.zxd($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation) {
    this.ixe_1 = this$0;
    this.jxe_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).lxe = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.lxe((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_44.n4r();
            var tmp_1 = CourseGroupSetEditViewModel$slambda$slambda$slambda_4(this.ixe_1, null);
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_6(this.jxe_1, this.ixe_1, null);
            suspendResult = this.ixe_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this.ixe_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda_1(this.ixe_1, this.jxe_1, completion);
    i.kxe_1 = $this$async;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda_2(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.lxe($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.uxe_1 = this$0;
    this.vxe_1 = $courseGroupSet;
    this.wxe_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.uxe_1.wqn().r7d().qdc(this.vxe_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.uxe_1.wqn().s7d().ud3(this.wxe_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).yny = function (it, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this.uxe_1, this.vxe_1, this.wxe_1, completion);
    i.xxe_1 = it;
    return i;
  };
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_161() {
    this.yxe_1 = 'CourseGroupsEdit';
    this.zxe_1 = 'courseGroupMembers';
  }
  var Companion_instance_210;
  function Companion_getInstance_178() {
    return Companion_instance_210;
  }
  function CourseGroupSetEditViewModel$slambda(this$0, resultContinuation) {
    this.ixf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda).msc = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.jxf_1.o7f();
            var tmp_1 = this.ixf_1.sqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.ixf_1.bxc_1, new Long(8, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda).yny = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda(this.ixf_1, completion);
    i.jxf_1 = db;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.msc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation) {
    this.sxf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (!this.sxf_1.iqt_1.equals(new Long(0, 0))) {
              this.uxf_1 = this.sxf_1.iqt_1;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = get_doorPrimaryKeyManager(this.sxf_1.uqn());
              suspendResult = tmp_0.o62(242, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.uxf_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.vxf_1 = this.uxf_1;
            this.hd_1 = 3;
            var tmp_1 = async(this.txf_1, VOID, VOID, CourseGroupSetEditViewModel$slambda$slambda_0(this.sxf_1, this.vxf_1, null));
            suspendResult = awaitAll([tmp_1, async(this.txf_1, VOID, VOID, CourseGroupSetEditViewModel$slambda$slambda_2(this.sxf_1, this.vxf_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            l$ret$1: do {
              var this_0 = this.sxf_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_2 = this.sxf_1.aqo().moj(strings_getInstance().en3_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, true, CourseGroupSetEditViewModel$onClickSave$ref(this.sxf_1));
                var tmp1_loadingState = Companion_getInstance_97().uq6_1;
                var nextValue = prevValue.mq6(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.sxf_1.zxb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.qxc(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new CourseGroupSetEditViewModel$slambda_1(this.sxf_1, completion);
    i.txf_1 = $this$launchIfHasPermission;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.exg_1 = $commitDelay;
    this.fxg_1 = $entity;
    this.gxg_1 = $this;
    this.hxg_1 = $key;
    this.ixg_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.exg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.fxg_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.gxg_1.gqo(this.gxg_1.aqn_1, this.hxg_1, this.ixg_1, this.fxg_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onEntityChanged$slambda(this.exg_1, this.fxg_1, this.gxg_1, this.hxg_1, this.ixg_1, completion);
    i.jxg_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda($groupNumber) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.rd4_1 = $groupNumber;
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda_0($personUid) {
    return function (it) {
      return it.jd5_1.equals($personUid);
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this$0, $newState, resultContinuation) {
    this.sxg_1 = this$0;
    this.txg_1 = $newState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.sxg_1.gqo(this.sxg_1.aqn_1, 'courseGroupMembers', ListSerializer(Companion_instance_43.n4r()), this.txg_1.mxc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this.sxg_1, this.txg_1, completion);
    i.uxg_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this$0, $newState, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this$0, $newState, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickAssignRandomly$lambda($shuffledPersonUidList, $it, $totalGroups) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.rd4_1 = ($shuffledPersonUidList.x($it.jd5_1) % $totalGroups | 0) + 1 | 0;
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this$0, $newMemberList, resultContinuation) {
    this.dxh_1 = this$0;
    this.exh_1 = $newMemberList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.dxh_1.gqo(this.dxh_1.aqn_1, 'courseGroupMembers', ListSerializer(Companion_instance_43.n4r()), this.exh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this.dxh_1, this.exh_1, completion);
    i.fxh_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this$0, $newMemberList, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this$0, $newMemberList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.oxh_1 = this$0;
    this.pxh_1 = $courseGroupSet;
    this.qxh_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.oxh_1.wqn();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this.oxh_1, this.pxh_1, this.qxh_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this.pxh_1.a7z_1;
            Companion_getInstance_125();
            this.oxh_1.jqt('CourseGroupSet', tmp_1, this.pxh_1, mapOf_0(to('clazzUid', this.oxh_1.bxc_1.toString())));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda(this.oxh_1, this.pxh_1, this.qxh_1, completion);
    i.rxh_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onClickSave$slambda_0(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseGroupsEdit');
    this.zxb_1 = MutableStateFlow(new CourseGroupSetEditUiState());
    this.axc_1 = asStateFlow(this.zxb_1);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.bxc_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>' call
        var tmp0_title = this.kqu(strings_getInstance().kni_1, strings_getInstance().lni_1);
        var tmp1_loadingState = Companion_getInstance_97().tq6_1;
        var nextValue = prevValue.mq6(VOID, tmp1_loadingState, tmp0_title, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = CourseGroupSetEditViewModel$slambda_0(this, null);
    this.mqo(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetEditViewModel).sxh = function (courseGroupSet) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zxb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.lxc_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7z_1;
        var tmp_0 = this.lqu(tmp, courseGroupSet == null ? null : courseGroupSet.b7z_1, prevValue.nxc_1);
        var tmp2_safe_receiver = prevValue.lxc_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.c7z_1;
        var nextValue = prevValue.qxc(courseGroupSet, VOID, tmp_0, this.lqu(tmp_1, courseGroupSet == null ? null : courseGroupSet.c7z_1, prevValue.oxc_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_44.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.rqn();
    tmp_2.hqt_1 = launch(tmp_3, VOID, VOID, CourseGroupSetEditViewModel$onEntityChanged$slambda_0(commitDelay, courseGroupSet, this, key, serializer, null));
  };
  protoOf(CourseGroupSetEditViewModel).txh = function (personUid, groupNumber) {
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.zxb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onChangeGroupAssignment.<anonymous>' call
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlin.collections.first' call
          var tmp0_iterator = prevValue.mxc_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onChangeGroupAssignment.<anonymous>.<anonymous>' call
            if (element.jd5_1.equals(personUid)) {
              tmp$ret$1 = element;
              break $l$block;
            }
          }
          throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
        }
        var currentGroupMemberAndName = tmp$ret$1;
        var tmp0_safe_receiver = currentGroupMemberAndName.hd5_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_9(tmp0_safe_receiver, CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda(groupNumber));
        }
        var tmp_0 = currentGroupMemberAndName.skm(tmp);
        var nextValue = prevValue.qxc(VOID, replace_0(prevValue.mxc_1, tmp_0, CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda_0(personUid)));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$3 = nextValue;
          break $l$block_0;
        }
      }
    }
    var newState = tmp$ret$3;
    var tmp_1 = this.rqn();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this, newState, null));
  };
  protoOf(CourseGroupSetEditViewModel).uxh = function () {
    var tmp0_safe_receiver = this.zxb_1.t2().lxc_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c7z_1;
    var totalGroups = tmp1_elvis_lhs == null ? 1 : tmp1_elvis_lhs;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.zxb_1.t2().mxc_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
      var tmp$ret$0 = item.jd5_1;
      destination.i1(tmp$ret$0);
    }
    var shuffledPersonUidList = shuffled(destination);
    // Inline function 'kotlin.collections.map' call
    var this_1 = this.zxb_1.t2().mxc_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
    var tmp0_iterator_0 = this_1.w();
    while (tmp0_iterator_0.f()) {
      var item_0 = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
      var tmp0_safe_receiver_0 = item_0.hd5_1;
      var tmp;
      if (tmp0_safe_receiver_0 == null) {
        tmp = null;
      } else {
        tmp = shallowCopy_9(tmp0_safe_receiver_0, CourseGroupSetEditViewModel$onClickAssignRandomly$lambda(shuffledPersonUidList, item_0, totalGroups));
      }
      var tmp$ret$3 = item_0.skm(tmp);
      destination_0.i1(tmp$ret$3);
    }
    var newMemberList = destination_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.zxb_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
        var nextValue = prevValue.qxc(VOID, newMemberList);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this, newMemberList, null));
  };
  protoOf(CourseGroupSetEditViewModel).asa = function () {
    var tmp0_elvis_lhs = this.zxb_1.t2().lxc_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var courseGroupSet = tmp;
    // Inline function 'kotlin.collections.mapNotNull' call
    // Inline function 'kotlin.collections.mapNotNullTo' call
    var this_0 = this.zxb_1.t2().mxc_1;
    var destination = ArrayList_init_$Create$();
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
      var tmp0_safe_receiver = element.hd5_1;
      if (tmp0_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        destination.i1(tmp0_safe_receiver);
      }
    }
    var membersToSave = destination;
    var tmp$ret$4;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp_0;
      if (isInterface(membersToSave, Collection)) {
        tmp_0 = membersToSave.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$4 = false;
        break $l$block_0;
      }
      var tmp0_iterator_0 = membersToSave.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
        if (element_0.rd4_1 > courseGroupSet.c7z_1) {
          tmp$ret$4 = true;
          break $l$block_0;
        }
      }
      tmp$ret$4 = false;
    }
    var hasInvalidAssignments = tmp$ret$4;
    if (hasInvalidAssignments) {
      this.yqn().bq7(new Snack(this.aqo().moj(strings_getInstance().qmi_1)));
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_1 = courseGroupSet.b7z_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_1 == null ? true : isBlank(this_1)) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.zxb_1;
        while (true) {
          var prevValue = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.qxc(VOID, VOID, this.aqo().moj(strings_getInstance().vmn_1));
          if (this_2.y1k(prevValue, nextValue)) {
            break $l$block_1;
          }
        }
      }
    }
    if (courseGroupSet.c7z_1 < 1) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.zxb_1;
        while (true) {
          var prevValue_0 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.qxc(VOID, VOID, VOID, this.aqo().moj(strings_getInstance().xng_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if ((hasInvalidAssignments ? true : !(this.zxb_1.t2().oxc_1 == null)) ? true : !(this.zxb_1.t2().nxc_1 == null)) {
      return Unit_instance;
    }
    var tmp_1 = this.rqn();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onClickSave$slambda_0(this, courseGroupSet, membersToSave, null));
  };
  function CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    courseTitleError = courseTitleError === VOID ? null : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? null : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.lxc_1 = courseGroupSet;
    this.mxc_1 = membersList;
    this.nxc_1 = courseTitleError;
    this.oxc_1 = numOfGroupsError;
    this.pxc_1 = fieldsEnabled;
  }
  protoOf(CourseGroupSetEditUiState).vxh = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    return new CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).qxc = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.lxc_1 : courseGroupSet;
    membersList = membersList === VOID ? this.mxc_1 : membersList;
    courseTitleError = courseTitleError === VOID ? this.nxc_1 : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? this.oxc_1 : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? this.pxc_1 : fieldsEnabled;
    return $super === VOID ? this.vxh(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) : $super.vxh.call(this, courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).toString = function () {
    return 'CourseGroupSetEditUiState(courseGroupSet=' + this.lxc_1 + ', membersList=' + this.mxc_1 + ', courseTitleError=' + this.nxc_1 + ', numOfGroupsError=' + this.oxc_1 + ', fieldsEnabled=' + this.pxc_1 + ')';
  };
  protoOf(CourseGroupSetEditUiState).hashCode = function () {
    var result = this.lxc_1 == null ? 0 : hashCode(this.lxc_1);
    result = imul(result, 31) + hashCode(this.mxc_1) | 0;
    result = imul(result, 31) + (this.nxc_1 == null ? 0 : getStringHashCode(this.nxc_1)) | 0;
    result = imul(result, 31) + (this.oxc_1 == null ? 0 : getStringHashCode(this.oxc_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pxc_1) | 0;
    return result;
  };
  protoOf(CourseGroupSetEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetEditUiState ? other : THROW_CCE();
    if (!equals(this.lxc_1, tmp0_other_with_cast.lxc_1))
      return false;
    if (!equals(this.mxc_1, tmp0_other_with_cast.mxc_1))
      return false;
    if (!(this.nxc_1 == tmp0_other_with_cast.nxc_1))
      return false;
    if (!(this.oxc_1 == tmp0_other_with_cast.oxc_1))
      return false;
    if (!(this.pxc_1 === tmp0_other_with_cast.pxc_1))
      return false;
    return true;
  };
  function CourseGroupSetListViewModel$slambda$lambda(this$0) {
    return function () {
      var tmp = this$0.wqn().o7f();
      var tmp_0 = this$0.sqn();
      PermissionFlags_getInstance();
      return tmp.fdk(tmp_0, this$0.wxi_1, new Long(8, 0));
    };
  }
  function CourseGroupSetListViewModel$slambda$lambda$lambda($visible) {
    return function () {
      return 'CourseGroupSetList: set showAddItem visible = ' + $visible;
    };
  }
  function CourseGroupSetListViewModel$slambda$lambda_0(this$0) {
    return function (visible) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.vqv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = Napier_getInstance();
          tmp.e5e(VOID, VOID, CourseGroupSetListViewModel$slambda$lambda$lambda(visible));
          var nextValue = prevValue.cxj(visible);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.lxj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = collectClazzNameAndUpdateTitle(this.lxj_1.wxi_1, this.lxj_1.uqn(), this.lxj_1.eqn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda$slambda$slambda(this.lxj_1, completion);
    i.mxj_1 = $this$launch;
    return i;
  };
  function CourseGroupSetListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.vxj_1 = $this_launch;
    this.wxj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.vxj_1, VOID, VOID, CourseGroupSetListViewModel$slambda$slambda$slambda_0(this.wxj_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).l78 = function (completion) {
    return new CourseGroupSetListViewModel$slambda$slambda(this.vxj_1, this.wxj_1, completion);
  };
  function CourseGroupSetListViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_162() {
    this.xxj_1 = 'CourseGroups';
  }
  var Companion_instance_211;
  function Companion_getInstance_179() {
    return Companion_instance_211;
  }
  function CourseGroupSetListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().r7d().odc(this$0.wxi_1, toQueryLikeParam(this$0.eqn_1.t2().eq6_1.tq5_1), this$0.vqv_1.t2().bxj_1.tqc_1);
    };
  }
  function CourseGroupSetListViewModel$slambda(this$0, resultContinuation) {
    this.gxk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = CourseGroupSetListViewModel$slambda$lambda(this.gxk_1);
            var tmp_1 = strings_getInstance().un0_1;
            suspendResult = this.gxk_1.fqx(tmp_0, tmp_1, CourseGroupSetListViewModel$slambda$lambda_0(this.gxk_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda(this.gxk_1, completion);
    i.hxk_1 = $this$launch;
    return i;
  };
  function CourseGroupSetListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel$slambda_1(this$0, resultContinuation) {
    this.qxk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qxk_1.vqv_1, CourseGroupSetListViewModel$slambda$slambda_0(this.rxk_1, this.qxk_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda_1(this.qxk_1, completion);
    i.rxk_1 = $this$launch;
    return i;
  };
  function CourseGroupSetListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CourseGroupSetListUiState(), 'CourseGroups');
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.wxi_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.xxi_1 = CourseGroupSetListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue = prevValue.cxj(VOID, this.xxi_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, VOID, true, VOID, VOID, VOID, this.eqx());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.rqn();
    launch(tmp_1, VOID, VOID, CourseGroupSetListViewModel$slambda_0(this, null));
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, CourseGroupSetListViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetListViewModel).pqw = function (searchText) {
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).sxk = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.onSortOptionChanged.<anonymous>' call
        var nextValue = prevValue.cxj(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).qqw = function () {
    Companion_getInstance_116();
    this.iqx('CourseGroupsEdit', mapOf_0(to('clazzUid', this.wxi_1.toString())));
  };
  protoOf(CourseGroupSetListViewModel).txk = function (entry) {
    var tmp = entry.a7z_1;
    Companion_getInstance_125();
    this.kqx('CourseGroupSet', tmp, entry, mapOf_0(to('clazzUid', this.wxi_1.toString())));
  };
  function Companion_163() {
    Companion_instance_212 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().pmk_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().pmk_1;
    tmp.uxk_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_212;
  function Companion_getInstance_180() {
    if (Companion_instance_212 == null)
      new Companion_163();
    return Companion_instance_212;
  }
  function CourseGroupSetListUiState$_init_$lambda_2d65m2() {
    return new EmptyPagingSource();
  }
  function CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption) {
    Companion_getInstance_180();
    showAddItem = showAddItem === VOID ? false : showAddItem;
    var tmp;
    if (courseGroupSets === VOID) {
      tmp = CourseGroupSetListUiState$_init_$lambda_2d65m2;
    } else {
      tmp = courseGroupSets;
    }
    courseGroupSets = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_180().uxk_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    this.yxi_1 = showAddItem;
    this.zxi_1 = courseGroupSets;
    this.axj_1 = sortOptions;
    this.bxj_1 = sortOption;
  }
  protoOf(CourseGroupSetListUiState).vxk = function (showAddItem, courseGroupSets, sortOptions, sortOption) {
    return new CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).cxj = function (showAddItem, courseGroupSets, sortOptions, sortOption, $super) {
    showAddItem = showAddItem === VOID ? this.yxi_1 : showAddItem;
    courseGroupSets = courseGroupSets === VOID ? this.zxi_1 : courseGroupSets;
    sortOptions = sortOptions === VOID ? this.axj_1 : sortOptions;
    sortOption = sortOption === VOID ? this.bxj_1 : sortOption;
    return $super === VOID ? this.vxk(showAddItem, courseGroupSets, sortOptions, sortOption) : $super.vxk.call(this, showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).toString = function () {
    return 'CourseGroupSetListUiState(showAddItem=' + this.yxi_1 + ', courseGroupSets=' + this.zxi_1 + ', sortOptions=' + this.axj_1 + ', sortOption=' + this.bxj_1 + ')';
  };
  protoOf(CourseGroupSetListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.yxi_1);
    result = imul(result, 31) + hashCode(this.zxi_1) | 0;
    result = imul(result, 31) + hashCode(this.axj_1) | 0;
    result = imul(result, 31) + this.bxj_1.hashCode() | 0;
    return result;
  };
  protoOf(CourseGroupSetListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetListUiState ? other : THROW_CCE();
    if (!(this.yxi_1 === tmp0_other_with_cast.yxi_1))
      return false;
    if (!equals(this.zxi_1, tmp0_other_with_cast.zxi_1))
      return false;
    if (!equals(this.axj_1, tmp0_other_with_cast.axj_1))
      return false;
    if (!this.bxj_1.equals(tmp0_other_with_cast.bxj_1))
      return false;
    return true;
  };
  function CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.exl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).yrg = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.yrg(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.fxl_1.q7d();
            var tmp_1;
            if (!this.exl_1.iqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.gxl_1 = tmp_1;
            if (this.gxl_1 == null) {
              this.hxl_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.gxl_1.ge7(this.exl_1.iqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hxl_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.hxl_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).yny = function (it, completion) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this.exl_1, completion);
    i.fxl_1 = it;
    return i;
  };
  function CourseTerminologyEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.yrg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.qxl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).txl = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.txl($completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.rxl_1 = new CourseTerminology();
            var tmp_1 = this;
            tmp_1.sxl_1 = this.rxl_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.qxl_1.uqn());
            suspendResult = tmp_2.o62(450, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.sxl_1.m8g_1 = ARGUMENT;
            return this.rxl_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new CourseTerminologyEditViewModel$slambda$slambda_1(this.qxl_1, completion);
  };
  function CourseTerminologyEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.txl($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$lambda(this$0) {
    return function (terminology) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.rxm_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xxm(VOID, terminology, VOID, toTerminologyEntries(terminology, this$0.m4r(), this$0.aqo()));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_164() {
    this.yxm_1 = 'CourseTerminologyEdit';
  }
  var Companion_instance_213;
  function Companion_getInstance_181() {
    return Companion_instance_213;
  }
  function CourseTerminologyEditViewModel$slambda(this$0, resultContinuation) {
    this.hxn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.jxn_1 = Companion_instance_34.n4r();
            this.hd_1 = 1;
            var tmp_0 = CourseTerminologyEditViewModel$slambda$slambda_0(this.hxn_1, null);
            var tmp_1 = CourseTerminologyEditViewModel$slambda$slambda_2(this.hxn_1, null);
            suspendResult = this.hxn_1.kqo(this.jxn_1, VOID, VOID, tmp_0, tmp_1, CourseTerminologyEditViewModel$slambda$lambda(this.hxn_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.hxn_1.rxm_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xxm(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.hxn_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = this.hxn_1.aqo().moj(strings_getInstance().en3_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, VOID, CourseTerminologyEditViewModel$onClickSave$ref(this.hxn_1));
                var tmp1_loadingState = Companion_getInstance_97().uq6_1;
                var nextValue_0 = prevValue_0.mq6(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$slambda(this.hxn_1, completion);
    i.ixn_1 = $this$launch;
    return i;
  };
  function CourseTerminologyEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.sxn_1 = $commitDelay;
    this.txn_1 = $entity;
    this.uxn_1 = $this;
    this.vxn_1 = $key;
    this.wxn_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.sxn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.txn_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.uxn_1.gqo(this.uxn_1.aqn_1, this.vxn_1, this.wxn_1, this.txn_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$onEntityChanged$slambda(this.sxn_1, this.txn_1, this.uxn_1, this.vxn_1, this.wxn_1, completion);
    i.xxn_1 = $this$launch;
    return i;
  };
  function CourseTerminologyEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda($terminologyEntry) {
    return function (it) {
      return it.qq8_1.equals($terminologyEntry.qq8_1);
    };
  }
  function CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda_0($newTermList, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.o8g_1 = encodeToStringMap($newTermList, this$0.m4r());
      return Unit_instance;
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.gxo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.gxo_1.rxm_1.t2().uxm_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.ixo_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.gxo_1.wqn().q7d().he7(this.ixo_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.gxo_1.rxm_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xxm(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.gxo_1.lqt(this.ixo_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$onClickSave$slambda(this.gxo_1, completion);
    i.hxo_1 = $this$launch;
    return i;
  };
  function CourseTerminologyEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseTerminologyEdit');
    this.rxm_1 = MutableStateFlow(new CourseTerminologyEditUiState());
    this.sxm_1 = asStateFlow(this.rxm_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>' call
        var tmp0_title = this.kqu(strings_getInstance().eni_1, strings_getInstance().fni_1);
        var tmp1_loadingState = Companion_getInstance_97().tq6_1;
        var nextValue = prevValue.mq6(VOID, tmp1_loadingState, tmp0_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyEditViewModel).jxo = function (courseTerminology) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rxm_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.xxm(VOID, courseTerminology);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_34.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.hqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.rqn();
    tmp.hqt_1 = launch(tmp_0, VOID, VOID, CourseTerminologyEditViewModel$onEntityChanged$slambda_0(commitDelay, courseTerminology, this, key, serializer, null));
  };
  protoOf(CourseTerminologyEditViewModel).kxo = function (terminologyEntry) {
    var tmp = this.rxm_1.t2().wxm_1;
    var newTermList = replace_0(tmp, terminologyEntry, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda(terminologyEntry));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rxm_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onTerminologyTermChanged.<anonymous>' call
        var nextValue = prevValue.xxm(VOID, VOID, VOID, newTermList);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.rxm_1.t2().uxm_1;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      tmp_0 = shallowCopy_10(tmp0_safe_receiver, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda_0(newTermList, this));
    }
    this.jxo(tmp_0);
  };
  protoOf(CourseTerminologyEditViewModel).asa = function () {
    if (!this.rxm_1.t2().vxm_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rxm_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.xxm(VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$onClickSave$slambda_0(this, null));
  };
  function CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList) {
    titleError = titleError === VOID ? null : titleError;
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? emptyList() : terminologyTermList;
    this.txm_1 = titleError;
    this.uxm_1 = entity;
    this.vxm_1 = fieldsEnabled;
    this.wxm_1 = terminologyTermList;
  }
  protoOf(CourseTerminologyEditUiState).lxo = function (titleError, entity, fieldsEnabled, terminologyTermList) {
    return new CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).xxm = function (titleError, entity, fieldsEnabled, terminologyTermList, $super) {
    titleError = titleError === VOID ? this.txm_1 : titleError;
    entity = entity === VOID ? this.uxm_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.vxm_1 : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? this.wxm_1 : terminologyTermList;
    return $super === VOID ? this.lxo(titleError, entity, fieldsEnabled, terminologyTermList) : $super.lxo.call(this, titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).toString = function () {
    return 'CourseTerminologyEditUiState(titleError=' + this.txm_1 + ', entity=' + this.uxm_1 + ', fieldsEnabled=' + this.vxm_1 + ', terminologyTermList=' + this.wxm_1 + ')';
  };
  protoOf(CourseTerminologyEditUiState).hashCode = function () {
    var result = this.txm_1 == null ? 0 : getStringHashCode(this.txm_1);
    result = imul(result, 31) + (this.uxm_1 == null ? 0 : hashCode(this.uxm_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vxm_1) | 0;
    result = imul(result, 31) + hashCode(this.wxm_1) | 0;
    return result;
  };
  protoOf(CourseTerminologyEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseTerminologyEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseTerminologyEditUiState ? other : THROW_CCE();
    if (!(this.txm_1 == tmp0_other_with_cast.txm_1))
      return false;
    if (!equals(this.uxm_1, tmp0_other_with_cast.uxm_1))
      return false;
    if (!(this.vxm_1 === tmp0_other_with_cast.vxm_1))
      return false;
    if (!equals(this.wxm_1, tmp0_other_with_cast.wxm_1))
      return false;
    return true;
  };
  function CourseTerminologyListViewModel$slambda$lambda() {
    return flowOf(true);
  }
  function CourseTerminologyListViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.vqv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.oxo(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_165() {
    this.pxo_1 = 'CourseTerminologyList';
  }
  var Companion_instance_214;
  function Companion_getInstance_182() {
    return Companion_instance_214;
  }
  function CourseTerminologyListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().q7d().de7();
    };
  }
  function CourseTerminologyListViewModel$slambda(this$0, resultContinuation) {
    this.yxo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = CourseTerminologyListViewModel$slambda$lambda;
            var tmp_1 = strings_getInstance().cni_1;
            suspendResult = this.yxo_1.fqx(tmp_0, tmp_1, CourseTerminologyListViewModel$slambda$lambda_0(this.yxo_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyListViewModel$slambda(this.yxo_1, completion);
    i.zxo_1 = $this$launch;
    return i;
  };
  function CourseTerminologyListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CourseTerminologyListUiState(), 'CourseTerminologyList');
    var tmp = this;
    tmp.axq_1 = CourseTerminologyListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.mqx(strings_getInstance().cni_1, strings_getInstance().dni_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.vqv_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.oxo(this.axq_1);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, CourseTerminologyListViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyListViewModel).qqw = function () {
    this.jqx('CourseTerminologyEdit');
  };
  protoOf(CourseTerminologyListViewModel).bxq = function (entry) {
    this.lqx('CourseTerminologyEdit', entry.m8g_1, entry);
  };
  protoOf(CourseTerminologyListViewModel).pqw = function (searchText) {
  };
  function CourseTerminologyListUiState$_init_$lambda_k6bmuc() {
    return new EmptyPagingSource();
  }
  function CourseTerminologyListUiState(terminologyList, showAddItemInList) {
    var tmp;
    if (terminologyList === VOID) {
      tmp = CourseTerminologyListUiState$_init_$lambda_k6bmuc;
    } else {
      tmp = terminologyList;
    }
    terminologyList = tmp;
    showAddItemInList = showAddItemInList === VOID ? false : showAddItemInList;
    this.mxo_1 = terminologyList;
    this.nxo_1 = showAddItemInList;
  }
  protoOf(CourseTerminologyListUiState).cxq = function (terminologyList, showAddItemInList) {
    return new CourseTerminologyListUiState(terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).oxo = function (terminologyList, showAddItemInList, $super) {
    terminologyList = terminologyList === VOID ? this.mxo_1 : terminologyList;
    showAddItemInList = showAddItemInList === VOID ? this.nxo_1 : showAddItemInList;
    return $super === VOID ? this.cxq(terminologyList, showAddItemInList) : $super.cxq.call(this, terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).toString = function () {
    return 'CourseTerminologyListUiState(terminologyList=' + this.mxo_1 + ', showAddItemInList=' + this.nxo_1 + ')';
  };
  protoOf(CourseTerminologyListUiState).hashCode = function () {
    var result = hashCode(this.mxo_1);
    result = imul(result, 31) + getBooleanHashCode(this.nxo_1) | 0;
    return result;
  };
  protoOf(CourseTerminologyListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseTerminologyListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseTerminologyListUiState ? other : THROW_CCE();
    if (!equals(this.mxo_1, tmp0_other_with_cast.mxo_1))
      return false;
    if (!(this.nxo_1 === tmp0_other_with_cast.nxo_1))
      return false;
    return true;
  };
  function get_delItemContentTypeStringResource(_this__u8e3s4) {
    var tmp;
    var tmp_0;
    var tmp_1 = _this__u8e3s4.keg_1;
    if (tmp_1 === 7) {
      tmp_0 = _this__u8e3s4.oeg_1;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = strings_getInstance().end_1;
    } else {
      var tmp_2 = _this__u8e3s4.keg_1;
      if (tmp_2 === 7) {
        tmp = strings_getInstance().fn4_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function _get_restoreDeletedItemUseCase__7lscig($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.exr_1;
    restoreDeletedItemUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deletePermanentlyUseCase__wdw610($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fxr_1;
    deletePermanentlyUseCase$factory_0();
    return this_0.t2();
  }
  function restoreItems($this, items) {
    var tmp = $this.rqn();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$restoreItems$slambda_0($this, items, null));
  }
  function Companion_166() {
    this.gxr_1 = 'DeletedItems';
  }
  var Companion_instance_215;
  function Companion_getInstance_183() {
    return Companion_instance_215;
  }
  function DeletedItemListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().m7f().deg(this$0.sqn(), false);
    };
  }
  function DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this$0, $itemsToDelete, resultContinuation) {
    this.pxr_1 = this$0;
    this.qxr_1 = $itemsToDelete;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_deletePermanentlyUseCase__wdw610(this.pxr_1).ypc(this.qxr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.pxr_1.yqn().bq7(new Snack(this.pxr_1.aqo().jwq(plurals_getInstance().xns_1, this.qxr_1.u())));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().q5e('Exception deleting', e);
              this.pxr_1.yqn().bq7(new Snack(this.pxr_1.aqo().moj(strings_getInstance().qmi_1) + ': ' + e.message));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).v1m = function ($this$launch, completion) {
    var i = new DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this.pxr_1, this.qxr_1, completion);
    i.rxr_1 = $this$launch;
    return i;
  };
  function DeletedItemListViewModel$onConfirmDeletePermanently$slambda_0(this$0, $itemsToDelete, resultContinuation) {
    var i = new DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this$0, $itemsToDelete, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeletedItemListViewModel$restoreItems$slambda(this$0, $items, resultContinuation) {
    this.axs_1 = this$0;
    this.bxs_1 = $items;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeletedItemListViewModel$restoreItems$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeletedItemListViewModel$restoreItems$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeletedItemListViewModel$restoreItems$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_restoreDeletedItemUseCase__7lscig(this.axs_1).ypc(this.bxs_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.axs_1.yqn().bq7(new Snack(this.axs_1.aqo().jwq(plurals_getInstance().yns_1, this.bxs_1.u())));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DeletedItemListViewModel$restoreItems$slambda).v1m = function ($this$launch, completion) {
    var i = new DeletedItemListViewModel$restoreItems$slambda(this.axs_1, this.bxs_1, completion);
    i.cxs_1 = $this$launch;
    return i;
  };
  function DeletedItemListViewModel$restoreItems$slambda_0(this$0, $items, resultContinuation) {
    var i = new DeletedItemListViewModel$restoreItems$slambda(this$0, $items, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeletedItemListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new DeletedItemListUiState(), 'DeletedItems');
    var tmp = this;
    tmp.dxr_1 = DeletedItemListViewModel$pagingSourceFactory$lambda(this);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.exr_1 = Instance(this_0, tmp$ret$0, null).a5d(this, restoreDeletedItemUseCase$factory());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.fxr_1 = Instance(this_1, tmp$ret$2, null).a5d(this, deletePermanentlyUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.vqv_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue = prevValue.hxs(this.dxr_1);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().dnn_1));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(DeletedItemListViewModel).pqw = function (searchText) {
  };
  protoOf(DeletedItemListViewModel).ixs = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onDismissConfirmDialog.<anonymous>' call
        var nextValue = prevValue.hxs(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).jxs = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onConfirmDeletePermanently.<anonymous>' call
        var nextValue = prevValue.hxs(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = prevValue;
          break $l$block;
        }
      }
    }
    var itemsToDelete = tmp$ret$1.gxs_1;
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$onConfirmDeletePermanently$slambda_0(this, itemsToDelete, null));
  };
  protoOf(DeletedItemListViewModel).kxs = function (item) {
    restoreItems(this, listOf_0(item));
  };
  protoOf(DeletedItemListViewModel).lxs = function (item) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onClickDeletePermanently.<anonymous>' call
        var tmp0_itemsToConfirmDeletion = listOf_0(item);
        var tmp1_deleteConfirmText = this.aqo().jwq(plurals_getInstance().zns_1, 1);
        var nextValue = prevValue.hxs(VOID, true, tmp1_deleteConfirmText, tmp0_itemsToConfirmDeletion);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).qqw = function () {
  };
  function DeletedItemListUiState$_init_$lambda_114460() {
    return new EmptyPagingSource();
  }
  function DeletedItemListUiState(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) {
    var tmp;
    if (deletedItemsList === VOID) {
      tmp = DeletedItemListUiState$_init_$lambda_114460;
    } else {
      tmp = deletedItemsList;
    }
    deletedItemsList = tmp;
    confirmDialogVisible = confirmDialogVisible === VOID ? false : confirmDialogVisible;
    deleteConfirmText = deleteConfirmText === VOID ? null : deleteConfirmText;
    itemsToConfirmDeletion = itemsToConfirmDeletion === VOID ? emptyList() : itemsToConfirmDeletion;
    this.dxs_1 = deletedItemsList;
    this.exs_1 = confirmDialogVisible;
    this.fxs_1 = deleteConfirmText;
    this.gxs_1 = itemsToConfirmDeletion;
  }
  protoOf(DeletedItemListUiState).mxs = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) {
    return new DeletedItemListUiState(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).hxs = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion, $super) {
    deletedItemsList = deletedItemsList === VOID ? this.dxs_1 : deletedItemsList;
    confirmDialogVisible = confirmDialogVisible === VOID ? this.exs_1 : confirmDialogVisible;
    deleteConfirmText = deleteConfirmText === VOID ? this.fxs_1 : deleteConfirmText;
    itemsToConfirmDeletion = itemsToConfirmDeletion === VOID ? this.gxs_1 : itemsToConfirmDeletion;
    return $super === VOID ? this.mxs(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) : $super.mxs.call(this, deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).toString = function () {
    return 'DeletedItemListUiState(deletedItemsList=' + this.dxs_1 + ', confirmDialogVisible=' + this.exs_1 + ', deleteConfirmText=' + this.fxs_1 + ', itemsToConfirmDeletion=' + this.gxs_1 + ')';
  };
  protoOf(DeletedItemListUiState).hashCode = function () {
    var result = hashCode(this.dxs_1);
    result = imul(result, 31) + getBooleanHashCode(this.exs_1) | 0;
    result = imul(result, 31) + (this.fxs_1 == null ? 0 : getStringHashCode(this.fxs_1)) | 0;
    result = imul(result, 31) + hashCode(this.gxs_1) | 0;
    return result;
  };
  protoOf(DeletedItemListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DeletedItemListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof DeletedItemListUiState ? other : THROW_CCE();
    if (!equals(this.dxs_1, tmp0_other_with_cast.dxs_1))
      return false;
    if (!(this.exs_1 === tmp0_other_with_cast.exs_1))
      return false;
    if (!(this.fxs_1 == tmp0_other_with_cast.fxs_1))
      return false;
    if (!equals(this.gxs_1, tmp0_other_with_cast.gxs_1))
      return false;
    return true;
  };
  function restoreDeletedItemUseCase$factory() {
    return getPropertyCallableRef('restoreDeletedItemUseCase', 1, KProperty1, function (receiver) {
      return _get_restoreDeletedItemUseCase__7lscig(receiver);
    }, null);
  }
  function deletePermanentlyUseCase$factory() {
    return getPropertyCallableRef('deletePermanentlyUseCase', 1, KProperty1, function (receiver) {
      return _get_deletePermanentlyUseCase__wdw610(receiver);
    }, null);
  }
  function restoreDeletedItemUseCase$factory_0() {
    return getPropertyCallableRef('restoreDeletedItemUseCase', 1, KProperty1, function (receiver) {
      return _get_restoreDeletedItemUseCase__7lscig(receiver);
    }, null);
  }
  function deletePermanentlyUseCase$factory_0() {
    return getPropertyCallableRef('deletePermanentlyUseCase', 1, KProperty1, function (receiver) {
      return _get_deletePermanentlyUseCase__wdw610(receiver);
    }, null);
  }
  function CourseDiscussionDetailViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.qqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yxt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).wx2 = function (it, $completion) {
    var tmp = this.xx2(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wx2((p1 == null ? true : p1 instanceof CourseBlockAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.yxt_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.fxu(this.zxt_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).xx2 = function (it, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this.yxt_1, completion);
    i.zxt_1 = it;
    return i;
  };
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.wx2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.oxu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).mt7 = function (permissionPair, $completion) {
    var tmp = this.nt7(permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.mt7(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.qxu_1 = this.pxu_1;
            this.rxu_1 = this.qxu_1.y6();
            this.sxu_1 = this.qxu_1.z6();
            if (this.rxu_1) {
              l$ret$1: do {
                var this_0 = this.oxu_1.eqn_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_0 = this.oxu_1.aqo().moj(strings_getInstance().snj_1);
                  var tmp_1 = FabIcon_ADD_getInstance();
                  var nextValue = prevValue.mq6(new FabUiState(true, tmp_0, tmp_1, CourseDiscussionDetailViewModel$onClickAdd$ref(this.oxu_1)));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              l$ret$3: do {
                var this_1 = this.oxu_1.vqv_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.fxu(VOID, this.oxu_1.pxt_1, this.sxu_1, VOID, this.oxu_1.aqo().hq5());
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 1;
              var tmp_2 = this.oxu_1.wqn().p7d().gcl(this.oxu_1.nxt_1);
              var tmp_3 = CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this.oxu_1, null);
              suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_3), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$5: do {
                var this_2 = this.oxu_1.eqn_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.mq6(new FabUiState());
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
              l$ret$7: do {
                var this_3 = this.oxu_1.vqv_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.fxu(null, CourseDiscussionDetailViewModel$slambda$slambda$slambda$lambda, false);
                  if (this_3.y1k(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).nt7 = function (permissionPair, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this.oxu_1, completion);
    i.pxu_1 = permissionPair;
    return i;
  };
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.mt7(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation) {
    this.bxv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.bxv_1.wqn().o7f();
            var tmp_1 = this.bxv_1.sqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.bxv_1.oxt_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this.bxv_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new CourseDiscussionDetailViewModel$slambda$slambda(this.bxv_1, completion);
  };
  function CourseDiscussionDetailViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_167() {
    this.cxv_1 = 'CourseDiscussion';
  }
  var Companion_instance_216;
  function Companion_getInstance_184() {
    return Companion_instance_216;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_30(function_0) {
    this.dxv_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_30).t1d = function (value, $completion) {
    return this.dxv_1(value, $completion);
  };
  function CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().h7f().uel(this$0.nxt_1, false);
    };
  }
  function CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation) {
    this.mxv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.mxv_1.vqv_1, CourseDiscussionDetailViewModel$slambda$slambda_0(this.mxv_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda(this.mxv_1, completion);
    i.nxv_1 = $this$launch;
    return i;
  };
  function CourseDiscussionDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.courediscussiondetail.CourseDiscussionDetailViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.wxv_1 = this$0;
    this.xxv_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.wxv_1.wqn().h7f().yel(this.xxv_1.nem_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wxv_1.yqn().bq7(new Snack(this.wxv_1.aqo().moj(strings_getInstance().lmj_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseDiscussionDetailViewModel$onDeletePost$slambda(this.wxv_1, this.xxv_1, completion);
    i.yxv_1 = $this$launch;
    return i;
  };
  function CourseDiscussionDetailViewModel$onDeletePost$slambda_0(this$0, $post, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CourseDiscussionDetailUiState(), 'CourseDiscussion');
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nxt_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.oxt_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.pxt_1 = CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this);
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, CourseDiscussionDetailViewModel$slambda_0(this, null));
    launchSetTitleFromClazzUid(this, this.oxt_1, CourseDiscussionDetailViewModel$lambda(this));
  }
  protoOf(CourseDiscussionDetailViewModel).pqw = function (searchText) {
  };
  protoOf(CourseDiscussionDetailViewModel).qqw = function () {
    Companion_getInstance_125();
    var tmp = to('courseBlockUid', this.nxt_1.toString());
    Companion_getInstance_125();
    this.iqx('DiscussionPostEdit', mapOf([tmp, to('clazzUid', this.oxt_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).zxv = function (post) {
    Companion_getInstance_116();
    var tmp = to('entityUid', post.nem_1.toString());
    Companion_getInstance_125();
    this.cqn_1.rp6('CourseDiscussionPost', mapOf([tmp, to('clazzUid', this.oxt_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).axw = function (post) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, CourseDiscussionDetailViewModel$onDeletePost$slambda_0(this, post, null));
  };
  function CourseDiscussionDetailUiState$_init_$lambda_ogyezm() {
    return new EmptyPagingSource();
  }
  function CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    var tmp;
    if (posts === VOID) {
      tmp = CourseDiscussionDetailUiState$_init_$lambda_ogyezm;
    } else {
      tmp = posts;
    }
    posts = tmp;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.axu_1 = courseBlock;
    this.bxu_1 = posts;
    this.cxu_1 = showModerateOptions;
    this.dxu_1 = localDateTimeNow;
    this.exu_1 = dayOfWeekStrings;
  }
  protoOf(CourseDiscussionDetailUiState).bxw = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).fxu = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    courseBlock = courseBlock === VOID ? this.axu_1 : courseBlock;
    posts = posts === VOID ? this.bxu_1 : posts;
    showModerateOptions = showModerateOptions === VOID ? this.cxu_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.dxu_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.exu_1 : dayOfWeekStrings;
    return $super === VOID ? this.bxw(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.bxw.call(this, courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).toString = function () {
    return 'CourseDiscussionDetailUiState(courseBlock=' + this.axu_1 + ', posts=' + this.bxu_1 + ', showModerateOptions=' + this.cxu_1 + ', localDateTimeNow=' + this.dxu_1 + ', dayOfWeekStrings=' + this.exu_1 + ')';
  };
  protoOf(CourseDiscussionDetailUiState).hashCode = function () {
    var result = this.axu_1 == null ? 0 : this.axu_1.hashCode();
    result = imul(result, 31) + hashCode(this.bxu_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cxu_1) | 0;
    result = imul(result, 31) + this.dxu_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.exu_1) | 0;
    return result;
  };
  protoOf(CourseDiscussionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseDiscussionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseDiscussionDetailUiState ? other : THROW_CCE();
    if (!equals(this.axu_1, tmp0_other_with_cast.axu_1))
      return false;
    if (!equals(this.bxu_1, tmp0_other_with_cast.bxu_1))
      return false;
    if (!(this.cxu_1 === tmp0_other_with_cast.cxu_1))
      return false;
    if (!this.dxu_1.equals(tmp0_other_with_cast.dxu_1))
      return false;
    if (!equals(this.exu_1, tmp0_other_with_cast.exu_1))
      return false;
    return true;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.kxw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.lxw_1.xq9_1;
            var tmp0_elvis_lhs = (!(tmp_1 == null) ? typeof tmp_1 === 'string' : false) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.mxw_1 = tmp_2;
            this.hd_1 = 1;
            suspendResult = submitReply(this.kxw_1, this.mxw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).rqa = function (result, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.kxw_1, completion);
    i.lxw_1 = result;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.vxw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).brf = function (postTitle, $completion) {
    var tmp = this.crf(postTitle, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.brf((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.vxw_1.eqn_1;
          var tmp_0;
          if (!(this_0.t2().zq5_1 == this.wxw_1)) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver = tmp_0;
          if (tmp0_safe_receiver == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver.t2();
                var nextValue = prevValue.mq6(VOID, VOID, this.wxw_1);
                if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).crf = function (postTitle, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.vxw_1, completion);
    i.wxw_1 = postTitle;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (postTitle, $completion) {
      return i.brf(postTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.fxx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.fxx_1.eqo(this.fxx_1.zqn(), 'replyTextResult');
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.fxx_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_31(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this.fxx_1, completion);
    i.gxx_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.pxx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.pxx_1.wqn().h7f().z8c(this.pxx_1.uqm_1);
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.pxx_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_31(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this.pxx_1, completion);
    i.qxx_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.zxx_1 = this$0;
    this.axy_1 = $savedStateHandle;
    this.bxy_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).mt7 = function (permissionPair, $completion) {
    var tmp = this.nt7(permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.mt7(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.cxy_1;
          var hasViewPermission = tmp0_container.y6();
          var hasModeratePermission = tmp0_container.z6();
          if (hasViewPermission) {
            l$ret$1: do {
              var this_0 = this.zxx_1.axz_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0 = this.zxx_1.sqn();
                var tmp_1 = this.zxx_1.qqn().uo9().onu_1.ckr();
                var tmp0_safe_receiver = this.zxx_1.qqn().uo9().qnu_1;
                var nextValue = prevValue.oxz(this.zxx_1.zxy_1, tmp_0, tmp_1, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.h97_1, VOID, hasModeratePermission);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp1_elvis_lhs = this.axy_1.ba('replyText');
            this.zxx_1.cxz_1.x1k(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            launch(this.bxy_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this.zxx_1, null));
            launch(this.bxy_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this.zxx_1, null));
          } else {
            l$ret$3: do {
              var this_1 = this.zxx_1.axz_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda;
                var tmp_3 = this.zxx_1.sqn();
                var tmp_4 = this.zxx_1.qqn().uo9().onu_1.ckr();
                var tmp0_safe_receiver_0 = this.zxx_1.qqn().uo9().qnu_1;
                var nextValue_0 = prevValue_0.oxz(tmp_2, tmp_3, tmp_4, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.h97_1, VOID, false);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp2_elvis_lhs = this.axy_1.ba('replyText');
            this.zxx_1.cxz_1.x1k(tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).nt7 = function (permissionPair, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this.zxx_1, this.axy_1, this.bxy_1, completion);
    i.cxy_1 = permissionPair;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.mt7(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.xxz_1 = this$0;
    this.yxz_1 = $savedStateHandle;
    this.zxz_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.xxz_1.wqn().o7f();
            var tmp_1 = this.xxz_1.sqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.xxz_1.fxz_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this.xxz_1, this.yxz_1, this.zxz_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new DiscussionPostDetailViewModel$slambda$slambda(this.xxz_1, this.yxz_1, this.zxz_1, completion);
  };
  function DiscussionPostDetailViewModel$slambda$slambda_0(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function submitReply($this, replyText, $completion) {
    var tmp = new $submitReplyCOROUTINE$76($this, replyText, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_168() {
    this.qy0_1 = 'replyTextResult';
    this.ry0_1 = 'replyText';
    this.sy0_1 = 'CourseDiscussionPost';
  }
  var Companion_instance_217;
  function Companion_getInstance_185() {
    return Companion_instance_217;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_31(function_0) {
    this.ty0_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_31).t1d = function (value, $completion) {
    return this.ty0_1(value, $completion);
  };
  function DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().h7f().wel(this$0.uqm_1, false);
    };
  }
  function DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.cy1_1 = this$0;
    this.dy1_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.cy1_1.axz_1, DiscussionPostDetailViewModel$slambda$slambda_0(this.cy1_1, this.dy1_1, this.ey1_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda(this.cy1_1, this.dy1_1, completion);
    i.ey1_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onChangeReplyText$slambda(this$0, $replyText, resultContinuation) {
    this.ny1_1 = this$0;
    this.oy1_1 = $replyText;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ny1_1.aqn_1.dqj('replyText', this.oy1_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onChangeReplyText$slambda(this.ny1_1, this.oy1_1, completion);
    i.py1_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this$0, $replyText, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onChangeReplyText$slambda(this$0, $replyText, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onClickPostReply$slambda(this$0, resultContinuation) {
    this.yy1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = submitReply(this.yy1_1, this.yy1_1.cxz_1.t2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onClickPostReply$slambda(this.yy1_1, completion);
    i.zy1_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onClickPostReply$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$submitReply$slambda(this$0, $replyText, $clazzAndBlockUids, resultContinuation) {
    this.iy2_1 = this$0;
    this.jy2_1 = $replyText;
    this.ky2_1 = $clazzAndBlockUids;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.iy2_1.wqn().h7f();
            var this_0 = new DiscussionPost();
            this_0.rem_1 = systemTimeInMillis();
            this_0.oem_1 = this.iy2_1.uqm_1;
            this_0.qem_1 = this.jy2_1;
            this_0.uem_1 = this.iy2_1.sqn();
            this_0.vem_1 = this.ky2_1.sco_1;
            this_0.sem_1 = this.ky2_1.tco_1;
            suspendResult = tmp_0.insertAsync(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.iy2_1.my2('');
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).yny = function (it, completion) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this.iy2_1, this.jy2_1, this.ky2_1, completion);
    i.ly2_1 = it;
    return i;
  };
  function DiscussionPostDetailViewModel$submitReply$slambda_0(this$0, $replyText, $clazzAndBlockUids, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this$0, $replyText, $clazzAndBlockUids, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.vy2_1 = this$0;
    this.wy2_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.vy2_1.wqn().h7f().yel(this.wy2_1.nem_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vy2_1.yqn().bq7(new Snack(this.vy2_1.aqo().moj(strings_getInstance().lmj_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onDeletePost$slambda(this.vy2_1, this.wy2_1, completion);
    i.xy2_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$onDeletePost$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $submitReplyCOROUTINE$76(_this__u8e3s4, replyText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.iy0_1 = _this__u8e3s4;
    this.jy0_1 = replyText;
  }
  protoOf($submitReplyCOROUTINE$76).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            l$ret$1: do {
              var this_0 = this.iy0_1.axz_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.oxz(VOID, VOID, VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.iy0_1.cqo(Companion_getInstance_97().tq6_1);
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 10;
            this.hd_1 = 3;
            suspendResult = this.iy0_1.uqn().p7d().lcl(this.iy0_1.uqm_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.my0_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.ny0_1 = this.my0_1;
            if ((!(this.ny0_1 == null) ? !this.ny0_1.sco_1.equals(new Long(0, 0)) : false) ? !this.ny0_1.tco_1.equals(new Long(0, 0)) : false) {
              this.oy0_1 = this.ny0_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.iy0_1.wqn().p7d().lcl(this.iy0_1.uqm_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.oy0_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.py0_1 = this.oy0_1;
            if ((this.py0_1 == null ? true : this.py0_1.tco_1.equals(new Long(0, 0))) ? true : this.py0_1.sco_1.equals(new Long(0, 0))) {
              this.iy0_1.yqn().bq7(new Snack(this.iy0_1.aqo().moj(strings_getInstance().qmi_1)));
              this.ly0_1 = Unit_instance;
              this.id_1 = 11;
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 6;
              continue $sm;
            }

          case 6:
            this.hd_1 = 7;
            var tmp_1 = this.iy0_1.wqn();
            suspendResult = withDoorTransactionAsync(tmp_1, VOID, DiscussionPostDetailViewModel$submitReply$slambda_0(this.iy0_1, this.jy0_1, this.py0_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.ky0_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 8:
            this.id_1 = 11;
            this.iy0_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$9: do {
              var this_1 = this.iy0_1.axz_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.oxz(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 9:
            this.id_1 = 11;
            this.iy0_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$11: do {
              var this_2 = this.iy0_1.axz_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.oxz(VOID, VOID, VOID, VOID, true);
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 10:
            this.id_1 = 11;
            var t = this.kd_1;
            this.iy0_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$7: do {
              var this_3 = this.iy0_1.axz_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.oxz(VOID, VOID, VOID, VOID, true);
                if (this_3.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            throw t;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function DiscussionPostDetailViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'CourseDiscussionPost' : destinationName;
    DetailViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    tmp.zxy_1 = DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this);
    this.axz_1 = MutableStateFlow(new DiscussionPostDetailUiState2());
    this.bxz_1 = asStateFlow(this.axz_1);
    this.cxz_1 = MutableStateFlow('');
    this.dxz_1 = asStateFlow(this.cxz_1);
    this.exz_1 = null;
    var tmp_0 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.fxz_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this.rqn();
    launch(tmp_1, VOID, VOID, DiscussionPostDetailViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(DiscussionPostDetailViewModel).my2 = function (replyText) {
    this.cxz_1.x1k(replyText);
    var tmp0_safe_receiver = this.exz_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.rqn();
    tmp.exz_1 = launch(tmp_0, VOID, VOID, DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this, replyText, null));
  };
  protoOf(DiscussionPostDetailViewModel).yy2 = function () {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this, null));
  };
  protoOf(DiscussionPostDetailViewModel).axw = function (post) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onDeletePost$slambda_0(this, post, null));
  };
  function DiscussionPostDetailUiState2$_init_$lambda_c4cn31() {
    return new EmptyPagingSource();
  }
  function DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (discussionPosts === VOID) {
      tmp = DiscussionPostDetailUiState2$_init_$lambda_c4cn31;
    } else {
      tmp = discussionPosts;
    }
    discussionPosts = tmp;
    loggedInPersonUid = loggedInPersonUid === VOID ? new Long(0, 0) : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? '' : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? null : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.gxz_1 = discussionPosts;
    this.hxz_1 = loggedInPersonUid;
    this.ixz_1 = loggedInPersonName;
    this.jxz_1 = loggedInPersonPictureUri;
    this.kxz_1 = fieldsEnabled;
    this.lxz_1 = showModerateOptions;
    this.mxz_1 = localDateTimeNow;
    this.nxz_1 = dayOfWeekStrings;
  }
  protoOf(DiscussionPostDetailUiState2).zy2 = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).oxz = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    discussionPosts = discussionPosts === VOID ? this.gxz_1 : discussionPosts;
    loggedInPersonUid = loggedInPersonUid === VOID ? this.hxz_1 : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? this.ixz_1 : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? this.jxz_1 : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? this.kxz_1 : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? this.lxz_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.mxz_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.nxz_1 : dayOfWeekStrings;
    return $super === VOID ? this.zy2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.zy2.call(this, discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).toString = function () {
    return 'DiscussionPostDetailUiState2(discussionPosts=' + this.gxz_1 + ', loggedInPersonUid=' + this.hxz_1.toString() + ', loggedInPersonName=' + this.ixz_1 + ', loggedInPersonPictureUri=' + this.jxz_1 + ', fieldsEnabled=' + this.kxz_1 + ', showModerateOptions=' + this.lxz_1 + ', localDateTimeNow=' + this.mxz_1 + ', dayOfWeekStrings=' + this.nxz_1 + ')';
  };
  protoOf(DiscussionPostDetailUiState2).hashCode = function () {
    var result = hashCode(this.gxz_1);
    result = imul(result, 31) + this.hxz_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.ixz_1) | 0;
    result = imul(result, 31) + (this.jxz_1 == null ? 0 : getStringHashCode(this.jxz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kxz_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lxz_1) | 0;
    result = imul(result, 31) + this.mxz_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.nxz_1) | 0;
    return result;
  };
  protoOf(DiscussionPostDetailUiState2).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DiscussionPostDetailUiState2))
      return false;
    var tmp0_other_with_cast = other instanceof DiscussionPostDetailUiState2 ? other : THROW_CCE();
    if (!equals(this.gxz_1, tmp0_other_with_cast.gxz_1))
      return false;
    if (!this.hxz_1.equals(tmp0_other_with_cast.hxz_1))
      return false;
    if (!(this.ixz_1 === tmp0_other_with_cast.ixz_1))
      return false;
    if (!(this.jxz_1 == tmp0_other_with_cast.jxz_1))
      return false;
    if (!(this.kxz_1 === tmp0_other_with_cast.kxz_1))
      return false;
    if (!(this.lxz_1 === tmp0_other_with_cast.lxz_1))
      return false;
    if (!this.mxz_1.equals(tmp0_other_with_cast.mxz_1))
      return false;
    if (!equals(this.nxz_1, tmp0_other_with_cast.nxz_1))
      return false;
    return true;
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.iy3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).my3 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.my3(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.jy3_1.h7f();
            var tmp_1;
            if (!this.iy3_1.iqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.ky3_1 = tmp_1;
            if (this.ky3_1 == null) {
              this.ly3_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.ky3_1.vel(this.iy3_1.iqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ly3_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.ly3_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).yny = function (it, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this.iy3_1, completion);
    i.jy3_1 = it;
    return i;
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.my3(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.vy3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).yy3 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.yy3($completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.wy3_1 = new DiscussionPost();
            var tmp_1 = this;
            tmp_1.xy3_1 = this.wy3_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.vy3_1.uqn());
            suspendResult = tmp_2.o62(132, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.xy3_1.nem_1 = ARGUMENT;
            this.xy3_1.sem_1 = _get_courseBlockUidArg__1bqljt(this.vy3_1);
            this.xy3_1.uem_1 = this.vy3_1.qqn().joa().vky_1;
            this.xy3_1.rem_1 = systemTimeInMillis();
            return this.wy3_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).l78 = function (completion) {
    return new DiscussionPostEditViewModel$slambda$slambda$slambda_1(this.vy3_1, completion);
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.yy3($completion);
    };
    l.$arity = 0;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$lambda(this$0) {
    return function (entityToDisplay) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.wy4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.cy5(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.ly5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda).ny5 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.ny5((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_45.n4r();
            var tmp_1 = DiscussionPostEditViewModel$slambda$slambda$slambda_0(this.ly5_1, null);
            var tmp_2 = DiscussionPostEditViewModel$slambda$slambda$slambda_2(this.ly5_1, null);
            suspendResult = this.ly5_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, DiscussionPostEditViewModel$slambda$slambda$lambda(this.ly5_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda(this.ly5_1, completion);
    i.my5_1 = $this$async;
    return i;
  };
  function DiscussionPostEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.ny5($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation) {
    this.wy5_1 = this$0;
    this.xy5_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.wy5_1.wqn().h7f().xel(this.xy5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).yny = function (it, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this.wy5_1, this.xy5_1, completion);
    i.yy5_1 = it;
    return i;
  };
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_discussionPostUid__impog9($this) {
    Companion_getInstance_116();
    var tmp0_safe_receiver = $this.aqn_1.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function _get_courseBlockUidArg__1bqljt($this) {
    Companion_getInstance_125();
    var tmp0_safe_receiver = $this.aqn_1.ba('courseBlockUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function Companion_169() {
    this.zy5_1 = 'DiscussionPostEdit';
  }
  var Companion_instance_218;
  function Companion_getInstance_186() {
    return Companion_instance_218;
  }
  function DiscussionPostEditViewModel$slambda(this$0, resultContinuation) {
    this.iy6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = awaitAll([async(this.jy6_1, VOID, VOID, DiscussionPostEditViewModel$slambda$slambda_0(this.iy6_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.iy6_1.wy4_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.cy5(VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.iy6_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_0 = this.iy6_1.aqo().moj(strings_getInstance().snj_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$ref(this.iy6_1));
                var tmp1_loadingState = Companion_getInstance_97().uq6_1;
                var nextValue_0 = prevValue_0.mq6(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$slambda(this.iy6_1, completion);
    i.jy6_1 = $this$launch;
    return i;
  };
  function DiscussionPostEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.sy6_1 = $commitDelay;
    this.ty6_1 = $entity;
    this.uy6_1 = $this;
    this.vy6_1 = $key;
    this.wy6_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.sy6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ty6_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.uy6_1.gqo(this.uy6_1.aqn_1, this.vy6_1, this.wy6_1, this.ty6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$onEntityChanged$slambda(this.sy6_1, this.ty6_1, this.uy6_1, this.vy6_1, this.wy6_1, completion);
    i.xy6_1 = $this$launch;
    return i;
  };
  function DiscussionPostEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda(this$0, $post, resultContinuation) {
    this.gy7_1 = this$0;
    this.hy7_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (this.gy7_1.wy4_1.t2().ay5_1 == null ? this.gy7_1.wy4_1.t2().by5_1 == null : false) {
              this.hd_1 = 1;
              suspendResult = this.gy7_1.uqn().p7d().mcl(this.hy7_1.sem_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 1:
            this.jy7_1 = suspendResult;
            this.hy7_1.vem_1 = this.jy7_1;
            if (this.hy7_1.vem_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = this.gy7_1.wqn().p7d().mcl(this.hy7_1.sem_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.ky7_1 = suspendResult;
            this.hy7_1.vem_1 = this.ky7_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_0 = this.gy7_1.wqn();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this.gy7_1, this.hy7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_1 = this.hy7_1.nem_1;
            var this_0 = LinkedHashMap_init_$Create$();
            Companion_getInstance_125();
            this.gy7_1.nqo(this_0, 'clazzUid');
            this.gy7_1.jqt('CourseDiscussionPost', tmp_1, this.hy7_1, this_0.f3());
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda(this.gy7_1, this.hy7_1, completion);
    i.iy7_1 = $this$launch;
    return i;
  };
  function DiscussionPostEditViewModel$onClickSave$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'DiscussionPostEdit' : destinationName;
    UstadEditViewModel.call(this, di, savedStateHandle, destinationName);
    this.wy4_1 = MutableStateFlow(new DiscussionPostEditUiState());
    this.xy4_1 = asStateFlow(this.wy4_1);
    this.cqo(Companion_getInstance_97().tq6_1);
    var title = _get_discussionPostUid__impog9(this).equals(new Long(0, 0)) ? this.aqo().moj(strings_getInstance().rnl_1) : this.aqo().moj(strings_getInstance().qmv_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, DiscussionPostEditViewModel$slambda_0(this, null));
  }
  protoOf(DiscussionPostEditViewModel).ly7 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.wy4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.yy4_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pem_1;
        var tmp_0 = this.lqu(tmp, entity == null ? null : entity.pem_1, prevValue.ay5_1);
        var tmp2_safe_receiver = prevValue.yy4_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.qem_1;
        var nextValue = prevValue.cy5(entity, VOID, tmp_0, this.lqu(tmp_1, entity == null ? null : entity.qem_1, prevValue.by5_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_45.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.rqn();
    tmp_2.hqt_1 = launch(tmp_3, VOID, VOID, DiscussionPostEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(DiscussionPostEditViewModel).asa = function () {
    var tmp0_elvis_lhs = this.wy4_1.t2().yy4_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var post = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.wy4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.onClickSave.<anonymous>' call
        var tmp_0;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = post.pem_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_0 = this.aqo().moj(strings_getInstance().vmn_1);
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = post.qem_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_2 = this.aqo().moj(strings_getInstance().vmn_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.cy5(VOID, VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.rqn();
    launch(tmp_3, VOID, VOID, DiscussionPostEditViewModel$onClickSave$slambda_0(this, post, null));
  };
  function DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    discussionPost = discussionPost === VOID ? null : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? null : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? null : discussionPostDescError;
    this.yy4_1 = discussionPost;
    this.zy4_1 = fieldsEnabled;
    this.ay5_1 = discussionPostTitleError;
    this.by5_1 = discussionPostDescError;
  }
  protoOf(DiscussionPostEditUiState).my7 = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    return new DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).cy5 = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError, $super) {
    discussionPost = discussionPost === VOID ? this.yy4_1 : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? this.zy4_1 : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? this.ay5_1 : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? this.by5_1 : discussionPostDescError;
    return $super === VOID ? this.my7(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) : $super.my7.call(this, discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).toString = function () {
    return 'DiscussionPostEditUiState(discussionPost=' + this.yy4_1 + ', fieldsEnabled=' + this.zy4_1 + ', discussionPostTitleError=' + this.ay5_1 + ', discussionPostDescError=' + this.by5_1 + ')';
  };
  protoOf(DiscussionPostEditUiState).hashCode = function () {
    var result = this.yy4_1 == null ? 0 : hashCode(this.yy4_1);
    result = imul(result, 31) + getBooleanHashCode(this.zy4_1) | 0;
    result = imul(result, 31) + (this.ay5_1 == null ? 0 : getStringHashCode(this.ay5_1)) | 0;
    result = imul(result, 31) + (this.by5_1 == null ? 0 : getStringHashCode(this.by5_1)) | 0;
    return result;
  };
  protoOf(DiscussionPostEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DiscussionPostEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof DiscussionPostEditUiState ? other : THROW_CCE();
    if (!equals(this.yy4_1, tmp0_other_with_cast.yy4_1))
      return false;
    if (!(this.zy4_1 === tmp0_other_with_cast.zy4_1))
      return false;
    if (!(this.ay5_1 == tmp0_other_with_cast.ay5_1))
      return false;
    if (!(this.by5_1 == tmp0_other_with_cast.by5_1))
      return false;
    return true;
  };
  function invoke$urlToLoad(_this__u8e3s4, cevOpenUri, manifest, this$0, cevManifestUrlObj) {
    var prefix = substringBeforeLast(cevOpenUri, '/', '');
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(prefix) > 0) {
      tmp = prefix + '/' + _this__u8e3s4.goe_1;
    } else {
      tmp = _this__u8e3s4.goe_1;
    }
    var pathInManifest = tmp;
    return invoke$urlToLoad_0(requireEntryByUri(manifest, pathInManifest), this$0, cevManifestUrlObj);
  }
  function EpubContentViewModel$slambda$slambda$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ry8_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.fy9(VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function EpubContentViewModel$slambda$slambda$slambda(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation) {
    this.oy9_1 = this$0;
    this.py9_1 = $cevOpenUri;
    this.qy9_1 = $manifest;
    this.ry9_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda$slambda).bya = function (it, $completion) {
    var tmp = this.cya(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.bya(p1 instanceof Item ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.ty9_1 = _get_httpClient__2ty1zc_2(this.oy9_1);
            var tmp_1 = this;
            tmp_1.uy9_1 = invoke$urlToLoad(this.sy9_1, this.py9_1, this.qy9_1, this.oy9_1, this.ry9_1);
            var tmp_2 = this;
            tmp_2.vy9_1 = this.ty9_1;
            var tmp_3 = this;
            tmp_3.wy9_1 = this.vy9_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.uy9_1);
            tmp_4.xy9_1 = this_0;
            this.xy9_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.yy9_1 = this.wy9_1;
            var tmp_6 = this;
            tmp_6.zy9_1 = this.xy9_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.zy9_1, this.yy9_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.aya_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.aya_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).cya = function (it, completion) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this.oy9_1, this.py9_1, this.qy9_1, this.ry9_1, completion);
    i.sy9_1 = it;
    return i;
  };
  function EpubContentViewModel$slambda$slambda$slambda_0(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation);
    var l = function (it, $completion) {
      return i.bya(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function invoke$urlToLoad_0(_this__u8e3s4, this$0, cevManifestUrlObj) {
    var tmp;
    if (this$0.ny8_1) {
      tmp = _this__u8e3s4.kog_1;
    } else {
      tmp = cevManifestUrlObj.np2(_this__u8e3s4.cog_1).toString();
    }
    return tmp;
  }
  function EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    this.lya_1 = $manifest;
    this.mya_1 = $cevOpenUri;
    this.nya_1 = this$0;
    this.oya_1 = $opfBaseUrl;
    this.pya_1 = $argTocString;
    this.qya_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda).u1m = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EpubContentViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.id_1 = 4;
            this.sya_1 = requireEntryByUri(this.lya_1, this.mya_1);
            var tmp_0 = this;
            tmp_0.tya_1 = _get_httpClient__2ty1zc_2(this.nya_1);
            var tmp_1 = this;
            tmp_1.uya_1 = invoke$urlToLoad_0(this.sya_1, this.nya_1, this.qya_1);
            var tmp_2 = this;
            tmp_2.vya_1 = this.tya_1;
            var tmp_3 = this;
            tmp_3.wya_1 = this.vya_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.uya_1);
            tmp_4.xya_1 = this_0;
            this.xya_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.yya_1 = this.wya_1;
            var tmp_6 = this;
            tmp_6.zya_1 = this.xya_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.zya_1, this.yya_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ayb_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.ayb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.byb_1 = suspendResult;
            this.cyb_1 = _get_xml__e6jxp6(this.nya_1).s45(Companion_instance_75.n4r(), this.byb_1);
            var tmp_7 = this;
            var this_1 = this.cyb_1.kof_1.poe_1;
            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);
            var destination = LinkedHashMap_init_$Create$_0(capacity);
            var tmp0_iterator = this_1.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              destination.s(element.foe_1, element);
            }

            tmp_7.dyb_1 = destination;
            var tmp_8 = this;
            var this_2 = this.cyb_1.lof_1.oof_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_2.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver = this.dyb_1.q(element_0.loe_1);
              var tmp_9;
              if (tmp0_safe_receiver == null) {
                tmp_9 = null;
              } else {
                tmp_9 = this.oya_1.np2(tmp0_safe_receiver.goe_1);
              }
              var tmp1_safe_receiver = tmp_9;
              var tmp0_safe_receiver_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_0);
              }
            }

            tmp_8.eyb_1 = destination_0;
            var tmp_10 = this;
            var tmp0_safe_receiver_1 = this.cyb_1.mof();
            var tmp_11;
            if (tmp0_safe_receiver_1 == null) {
              tmp_11 = null;
            } else {
              tmp_11 = this.oya_1.np2(tmp0_safe_receiver_1.goe_1);
            }

            var tmp1_safe_receiver_0 = tmp_11;
            tmp_10.fyb_1 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.toString();
            l$ret$1: do {
              var this_3 = this.nya_1.ry8_1;
              while (true) {
                var prevValue = this_3.t2();
                var tmp0_safe_receiver_2 = firstOrNull(this.cyb_1.jof_1.zoe_1);
                var nextValue = prevValue.fy9(VOID, this.eyb_1, VOID, VOID, VOID, this.fyb_1, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.yod_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_4 = this.nya_1.eqn_1;
              while (true) {
                var prevValue_0 = this_4.t2();
                var tmp0_safe_receiver_3 = firstOrNull(this.cyb_1.jof_1.xoe_1);
                var tmp1_elvis_lhs = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.coe_1;
                var tmp_12 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
                var tmp2_elvis_lhs = this.pya_1;
                var tmp_13 = tmp2_elvis_lhs == null ? this.nya_1.aqo().moj(strings_getInstance().anm_1) : tmp2_elvis_lhs;
                var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, VOID, listOf_0(new OverflowItem(tmp_13, EpubContentViewModel$slambda$slambda$lambda(this.nya_1))));
                if (this_4.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp_14 = this.nya_1;
            var tmp2_safe_receiver = this.cyb_1.nof();
            var tmp_15;
            if (tmp2_safe_receiver == null) {
              tmp_15 = null;
            } else {
              tmp_15 = this.oya_1.np2(tmp2_safe_receiver.goe_1).toString();
            }

            tmp_14.wy8_1 = tmp_15;
            this.hd_1 = 3;
            suspendResult = this.nya_1.my8_1.ope(this.cyb_1, EpubContentViewModel$slambda$slambda$slambda_0(this.nya_1, this.mya_1, this.lya_1, this.qya_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp3_elvis_lhs = suspendResult;
            var tocItems = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            l$ret$5: do {
              var this_5 = this.nya_1.ry8_1;
              while (true) {
                var prevValue_1 = this_5.t2();
                var nextValue_1 = prevValue_1.fy9(VOID, VOID, tocItems);
                if (this_5.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 4:
            this.id_1 = 5;
            var tmp_16 = this.kd_1;
            if (tmp_16 instanceof Error) {
              var e = this.kd_1;
              printStackTrace(e);
              this.hd_1 = 6;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 5) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new EpubContentViewModel$slambda$slambda(this.lya_1, this.mya_1, this.nya_1, this.oya_1, this.pya_1, this.qya_1, completion);
    i.rya_1 = $this$withContext;
    return i;
  };
  function EpubContentViewModel$slambda$slambda_0($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    var i = new EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.u1m($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_httpClient__2ty1zc_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.py8_1;
    httpClient$factory_6();
    return this_0.t2();
  }
  function _get_xml__e6jxp6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qy8_1;
    xml$factory_0();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ty8_1;
    openExternalLinkUseCase$factory_2();
    return this_0.t2();
  }
  function Companion_170() {
    this.gyb_1 = 'manifestUrl';
    this.hyb_1 = 'cevUri';
    this.iyb_1 = 'navigationVisible';
    this.jyb_1 = 'tocString';
    this.kyb_1 = 'xapiStatementsUrl';
    this.lyb_1 = 'EpubContent';
  }
  var Companion_instance_219;
  function Companion_getInstance_187() {
    return Companion_instance_219;
  }
  function EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    this.uyb_1 = $argManifestUrl;
    this.vyb_1 = $argCevOpenUri;
    this.wyb_1 = this$0;
    this.xyb_1 = $argTocString;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EpubContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (!(this.uyb_1 == null) ? !(this.vyb_1 == null) : false) {
              var tmp_0 = this;
              tmp_0.zyb_1 = to(this.uyb_1, this.vyb_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.wyb_1.wqn().i7f().fbq(this.wyb_1.oy8_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ayc_1 = suspendResult;
            var tmp_1 = this;
            var tmp_2;
            if (this.ayc_1 == null) {
              return Unit_instance;
            } else {
              tmp_2 = this.ayc_1;
            }

            tmp_1.byc_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_elvis_lhs = this.byc_1.pax_1;
            var tmp_4;
            if (tmp1_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_4 = tmp1_elvis_lhs;
            }

            tmp_3.cyc_1 = tmp_4;
            var tmp_5 = this;
            var tmp2_elvis_lhs = this.byc_1.nax_1;
            var tmp_6;
            if (tmp2_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_6 = tmp2_elvis_lhs;
            }

            tmp_5.dyc_1 = tmp_6;
            this.zyb_1 = to(this.cyc_1, this.dyc_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.eyc_1 = this.zyb_1;
            this.fyc_1 = this.eyc_1.y6();
            this.gyc_1 = this.eyc_1.z6();
            this.hyc_1 = UrlKmp(this.fyc_1);
            this.iyc_1 = this.hyc_1.np2(this.gyc_1);
            var tmp_7 = this;
            tmp_7.jyc_1 = this.wyb_1.m4r();
            var tmp_8 = this;
            tmp_8.kyc_1 = _get_httpClient__2ty1zc_2(this.wyb_1);
            var tmp_9 = this;
            tmp_9.lyc_1 = this.fyc_1;
            var tmp_10 = this;
            tmp_10.myc_1 = this.kyc_1;
            var tmp_11 = this;
            tmp_11.nyc_1 = this.myc_1;
            var tmp_12 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.lyc_1);
            tmp_12.oyc_1 = this_0;
            this.oyc_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_13 = this;
            tmp_13.pyc_1 = this.nyc_1;
            var tmp_14 = this;
            tmp_14.qyc_1 = this.oyc_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.qyc_1, this.pyc_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.ryc_1 = suspendResult;
            this.hd_1 = 4;
            suspendResult = bodyAsDecodedText(this.ryc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.syc_1 = suspendResult;
            var tmp_15 = this;
            var this_1 = this.jyc_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_15.tyc_1 = this.jyc_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.syc_1);
            this.hd_1 = 5;
            var tmp_16 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_16, EpubContentViewModel$slambda$slambda_0(this.tyc_1, this.gyc_1, this.wyb_1, this.iyc_1, this.xyb_1, this.hyc_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new EpubContentViewModel$slambda(this.uyb_1, this.vyb_1, this.wyb_1, this.xyb_1, completion);
    i.yyb_1 = $this$launch;
    return i;
  };
  function EpubContentViewModel$slambda_0($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    var i = new EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EpubContentViewModel(di, savedStateHandle, getEpubTableOfContentsUseCase, useBodyDataUrls) {
    var tmp;
    if (getEpubTableOfContentsUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(XML), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.d58(tmp$ret$0, null);
      tmp = new GetEpubTableOfContentsUseCase(tmp$ret$1);
    } else {
      tmp = getEpubTableOfContentsUseCase;
    }
    getEpubTableOfContentsUseCase = tmp;
    useBodyDataUrls = useBodyDataUrls === VOID ? false : useBodyDataUrls;
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'EpubContent');
    this.my8_1 = getEpubTableOfContentsUseCase;
    this.ny8_1 = useBodyDataUrls;
    var tmp_2 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.oy8_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.py8_1 = Instance(this, tmp$ret$2, null).a5d(this, httpClient$factory_5());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XML), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.qy8_1 = Instance(this, tmp$ret$4, null).a5d(this, xml$factory());
    this.ry8_1 = MutableStateFlow(new EpubContentUiState(this.oy8_1));
    this.sy8_1 = asStateFlow(this.ry8_1);
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.ty8_1 = Instance(this, tmp$ret$6, null).a5d(this, openExternalLinkUseCase$factory_1());
    this.uy8_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.vy8_1 = asSharedFlow(this.uy8_1);
    this.wy8_1 = null;
    var argManifestUrl = savedStateHandle.ba('manifestUrl');
    var argCevOpenUri = savedStateHandle.ba('cevUri');
    var tmp0_safe_receiver_0 = savedStateHandle.ba('navigationVisible');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    var argNavigationVisible = tmp1_elvis_lhs_0 == null ? true : tmp1_elvis_lhs_0;
    var argTocString = savedStateHandle.ba('tocString');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, VOID, argNavigationVisible, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.rqn();
    launch(tmp_9, VOID, VOID, EpubContentViewModel$slambda_0(argManifestUrl, argCevOpenUri, this, argTocString, null));
  }
  protoOf(EpubContentViewModel).uyc = function () {
    var langCodeVal = this.ry8_1.t2().dy9_1;
    var titleVal = this.eqn_1.t2().zq5_1;
    var tmp;
    if (!(langCodeVal == null) ? !(titleVal == null) : false) {
      tmp = new TitleAndLangCode(titleVal, langCodeVal);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(EpubContentViewModel).vyc = function (baseUrl, href) {
    var url = UrlKmp(baseUrl).np2(href);
    var urlStr = url.toString();
    var hashIndex = indexOf_0(urlStr, '#');
    var urlWithoutHash = substringBefore_0(urlStr, '#');
    var indexInSpine = this.ry8_1.t2().yy8_1.x(urlWithoutHash);
    if (indexInSpine >= 0) {
      var tmp;
      if (hashIndex > 0) {
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = urlStr.substring(hashIndex);
      } else {
        tmp = null;
      }
      this.uy8_1.i1h(new EpubScrollCommand(indexInSpine, tmp));
    } else {
      _get_openExternalLinkUseCase__ku5z07_0(this).cpj(url.toString(), LinkTarget_BLANK_getInstance());
    }
  };
  protoOf(EpubContentViewModel).wyc = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ry8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickTocItem.<anonymous>' call
        var nextValue = prevValue.fy9(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = this.wy8_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var baseHref = tmp;
    var tmp1_elvis_lhs = tocItem.jpe_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var itemUrl = tmp_0;
    this.vyc(baseHref, itemUrl);
  };
  protoOf(EpubContentViewModel).xyc = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ry8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>' call
        var tmp;
        if (prevValue.by9_1.a1(tocItem.hpe_1)) {
          // Inline function 'kotlin.collections.filter' call
          // Inline function 'kotlin.collections.filterTo' call
          var this_1 = prevValue.by9_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>.<anonymous>' call
            if (!(element === tocItem.hpe_1)) {
              destination.i1(element);
            }
          }
          tmp = toSet(destination);
        } else {
          tmp = plus_2(prevValue.by9_1, tocItem.hpe_1);
        }
        var nextValue = prevValue.fy9(VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).yyc = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ry8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onDismissTableOfContentsDrawer.<anonymous>' call
        var nextValue = prevValue.fy9(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).zyc = function (index) {
    var spineSize = this.ry8_1.t2().yy8_1.u();
    if (spineSize <= 0)
      return Unit_instance;
    if (index === (spineSize - 1 | 0)) {
      this.gq3(true);
    } else {
      this.fq3(imul(index, 100) / spineSize | 0);
    }
  };
  function EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? emptyList() : spineUrls;
    tableOfContents = tableOfContents === VOID ? emptyList() : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? false : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? emptySet() : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? null : coverImageUrl;
    langCode = langCode === VOID ? null : langCode;
    this.xy8_1 = contentEntryVersionUid;
    this.yy8_1 = spineUrls;
    this.zy8_1 = tableOfContents;
    this.ay9_1 = tableOfContentsOpen;
    this.by9_1 = collapsedTocUids;
    this.cy9_1 = coverImageUrl;
    this.dy9_1 = langCode;
    var tmp = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.zy8_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentUiState.tableOfContentToDisplay.<anonymous>' call
      var tmp$ret$0;
      $l$block_0: {
        // Inline function 'kotlin.collections.any' call
        var this_1 = this.by9_1;
        var tmp_0;
        if (isInterface(this_1, Collection)) {
          tmp_0 = this_1.c1();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
        var tmp0_iterator_0 = this_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentUiState.tableOfContentToDisplay.<anonymous>.<anonymous>' call
          if (element.aye(element_0)) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
        tmp$ret$0 = false;
      }
      if (!tmp$ret$0) {
        destination.i1(element);
      }
    }
    tmp.ey9_1 = destination;
  }
  protoOf(EpubContentUiState).bye = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    return new EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).fy9 = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode, $super) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.xy8_1 : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? this.yy8_1 : spineUrls;
    tableOfContents = tableOfContents === VOID ? this.zy8_1 : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? this.ay9_1 : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? this.by9_1 : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? this.cy9_1 : coverImageUrl;
    langCode = langCode === VOID ? this.dy9_1 : langCode;
    return $super === VOID ? this.bye(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) : $super.bye.call(this, contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).toString = function () {
    return 'EpubContentUiState(contentEntryVersionUid=' + this.xy8_1.toString() + ', spineUrls=' + this.yy8_1 + ', tableOfContents=' + this.zy8_1 + ', tableOfContentsOpen=' + this.ay9_1 + ', collapsedTocUids=' + this.by9_1 + ', coverImageUrl=' + this.cy9_1 + ', langCode=' + this.dy9_1 + ')';
  };
  protoOf(EpubContentUiState).hashCode = function () {
    var result = this.xy8_1.hashCode();
    result = imul(result, 31) + hashCode(this.yy8_1) | 0;
    result = imul(result, 31) + hashCode(this.zy8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ay9_1) | 0;
    result = imul(result, 31) + hashCode(this.by9_1) | 0;
    result = imul(result, 31) + (this.cy9_1 == null ? 0 : getStringHashCode(this.cy9_1)) | 0;
    result = imul(result, 31) + (this.dy9_1 == null ? 0 : getStringHashCode(this.dy9_1)) | 0;
    return result;
  };
  protoOf(EpubContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof EpubContentUiState ? other : THROW_CCE();
    if (!this.xy8_1.equals(tmp0_other_with_cast.xy8_1))
      return false;
    if (!equals(this.yy8_1, tmp0_other_with_cast.yy8_1))
      return false;
    if (!equals(this.zy8_1, tmp0_other_with_cast.zy8_1))
      return false;
    if (!(this.ay9_1 === tmp0_other_with_cast.ay9_1))
      return false;
    if (!equals(this.by9_1, tmp0_other_with_cast.by9_1))
      return false;
    if (!(this.cy9_1 == tmp0_other_with_cast.cy9_1))
      return false;
    if (!(this.dy9_1 == tmp0_other_with_cast.dy9_1))
      return false;
    return true;
  };
  function EpubScrollCommand(spineIndex, hash) {
    hash = hash === VOID ? null : hash;
    this.cye_1 = spineIndex;
    this.dye_1 = hash;
  }
  protoOf(EpubScrollCommand).toString = function () {
    return 'EpubScrollCommand(spineIndex=' + this.cye_1 + ', hash=' + this.dye_1 + ')';
  };
  protoOf(EpubScrollCommand).hashCode = function () {
    var result = this.cye_1;
    result = imul(result, 31) + (this.dye_1 == null ? 0 : getStringHashCode(this.dye_1)) | 0;
    return result;
  };
  protoOf(EpubScrollCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubScrollCommand))
      return false;
    var tmp0_other_with_cast = other instanceof EpubScrollCommand ? other : THROW_CCE();
    if (!(this.cye_1 === tmp0_other_with_cast.cye_1))
      return false;
    if (!(this.dye_1 == tmp0_other_with_cast.dye_1))
      return false;
    return true;
  };
  function EpubTocItem(uid, label, href, children, parentUids, indentLevel) {
    parentUids = parentUids === VOID ? emptySet() : parentUids;
    indentLevel = indentLevel === VOID ? 0 : indentLevel;
    this.hpe_1 = uid;
    this.ipe_1 = label;
    this.jpe_1 = href;
    this.kpe_1 = children;
    this.lpe_1 = parentUids;
    this.mpe_1 = indentLevel;
    var tmp = this;
    // Inline function 'kotlin.collections.isNotEmpty' call
    tmp.npe_1 = !this.kpe_1.c1();
  }
  protoOf(EpubTocItem).aye = function (uid) {
    return this.lpe_1.a1(uid);
  };
  protoOf(EpubTocItem).toString = function () {
    return 'EpubTocItem(uid=' + this.hpe_1 + ', label=' + this.ipe_1 + ', href=' + this.jpe_1 + ', children=' + this.kpe_1 + ', parentUids=' + this.lpe_1 + ', indentLevel=' + this.mpe_1 + ')';
  };
  protoOf(EpubTocItem).hashCode = function () {
    var result = this.hpe_1;
    result = imul(result, 31) + getStringHashCode(this.ipe_1) | 0;
    result = imul(result, 31) + (this.jpe_1 == null ? 0 : getStringHashCode(this.jpe_1)) | 0;
    result = imul(result, 31) + hashCode(this.kpe_1) | 0;
    result = imul(result, 31) + hashCode(this.lpe_1) | 0;
    result = imul(result, 31) + this.mpe_1 | 0;
    return result;
  };
  protoOf(EpubTocItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubTocItem))
      return false;
    var tmp0_other_with_cast = other instanceof EpubTocItem ? other : THROW_CCE();
    if (!(this.hpe_1 === tmp0_other_with_cast.hpe_1))
      return false;
    if (!(this.ipe_1 === tmp0_other_with_cast.ipe_1))
      return false;
    if (!(this.jpe_1 == tmp0_other_with_cast.jpe_1))
      return false;
    if (!equals(this.kpe_1, tmp0_other_with_cast.kpe_1))
      return false;
    if (!equals(this.lpe_1, tmp0_other_with_cast.lpe_1))
      return false;
    if (!(this.mpe_1 === tmp0_other_with_cast.mpe_1))
      return false;
    return true;
  };
  function httpClient$factory_5() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_2(receiver);
    }, null);
  }
  function xml$factory() {
    return getPropertyCallableRef('xml', 1, KProperty1, function (receiver) {
      return _get_xml__e6jxp6(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_1() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_0(receiver);
    }, null);
  }
  function httpClient$factory_6() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_2(receiver);
    }, null);
  }
  function xml$factory_0() {
    return getPropertyCallableRef('xml', 1, KProperty1, function (receiver) {
      return _get_xml__e6jxp6(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_2() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_0(receiver);
    }, null);
  }
  function Companion_171() {
    this.eye_1 = 'Error';
  }
  var Companion_instance_220;
  function Companion_getInstance_188() {
    return Companion_instance_220;
  }
  function LoginViewModel$getCredentials$slambda$lambda($credentialResult) {
    return function () {
      return 'Error occurred: ' + $credentialResult.er4_1;
    };
  }
  function LoginViewModel$getCredentials$slambda$lambda_0($e) {
    return function () {
      return 'Error occurred: ' + $e.message;
    };
  }
  function _get_impl__d88w17_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.eyf_1;
    impl$factory_2();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fyf_1;
    httpClient$factory_8();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gyf_1;
    apiUrlConfig$factory_8();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.iyf_1;
    setLanguageUseCase$factory_2();
    return this_0.t2();
  }
  function _get_languagesConfig__hebcss($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jyf_1;
    languagesConfig$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.myf_1;
    getVersionUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nyf_1;
    getShowPoweredByUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getCredentialUseCase__qofq9r_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qyf_1;
    getCredentialUseCase$factory_2();
    return this_0.t2();
  }
  function _get_parseCredentialUsernameUseCase__8m48wk_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ryf_1;
    parseCredentialUsernameUseCase$factory_2();
    return this_0.t2();
  }
  function onSiteVerified($this, site) {
    $this.hyf_1 = site;
    $this.cqo(Companion_getInstance_97().uq6_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.ayf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onSiteVerified.<anonymous>' call
        var tmp0_connectAsGuestVisible = site.whn_1;
        var nextValue = prevValue.hyg(VOID, VOID, true, VOID, VOID, VOID, tmp0_connectAsGuestVisible, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function goToNextDestAfterLoginOrGuestSelected($this, person) {
    var goOptions = new UstadGoOptions(VOID, VOID, true);
    var tmp = Napier_getInstance();
    tmp.k5e(VOID, VOID, LoginViewModel$goToNextDestAfterLoginOrGuestSelected$lambda($this));
    if (person.n96_1) {
      var tmp_0 = $this;
      Companion_getInstance_169();
      tmp_0.cyf_1 = 'ContentEntryListHome';
    }
    $this.mqu($this.cqn_1, appendSelectedAccount($this.cyf_1, person.f96_1, new LearningSpace($this.dyf_1)), goOptions);
  }
  function getCredentials_0($this) {
    var tmp0_elvis_lhs = _get_getCredentialUseCase__qofq9r_0($this);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var getCredentialUseCaseVal = tmp;
    var tmp_0 = $this.rqn();
    launch(tmp_0, VOID, VOID, LoginViewModel$getCredentials$slambda_0(getCredentialUseCaseVal, $this, null));
  }
  function Companion_172() {
    this.iyg_1 = 'Login';
  }
  var Companion_instance_221;
  function Companion_getInstance_189() {
    return Companion_instance_221;
  }
  function LoginViewModel$slambda(this$0, resultContinuation) {
    this.ryg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!(this.ryg_1.hyf_1 == null)) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.id_1 = 3;
            this.hd_1 = 2;
            suspendResult = verifySite(_get_httpClient__2ty1zc_3(this.ryg_1), this.ryg_1.dyf_1, new Long(10000, 0), this.ryg_1.m4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.tyg_1 = suspendResult;
            onSiteVerified(this.ryg_1, this.tyg_1);
            this.id_1 = 7;
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.id_1 = 7;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Exception) {
              this.uyg_1 = this.kd_1;
              Napier_getInstance().m5e('Could not load site object for ' + this.ryg_1.dyf_1, this.uyg_1);
              l$ret$1: do {
                var this_0 = this.ryg_1.ayf_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.hyg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, _get_impl__d88w17_0(this.ryg_1).moj(strings_getInstance().amj_1));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              suspendResult = delay(new Long(10000, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 6:
            return Unit_instance;
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$slambda(this.ryg_1, completion);
    i.syg_1 = $this$launch;
    return i;
  };
  function LoginViewModel$slambda_0(this$0, resultContinuation) {
    var i = new LoginViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$goToNextDestAfterLoginOrGuestSelected$lambda(this$0) {
    return function () {
      return 'LoginPresenter: go to next destination: ' + this$0.cyf_1;
    };
  }
  function LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation) {
    this.dyh_1 = this$0;
    this.eyh_1 = $username;
    this.fyh_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$onClickLogin$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$onClickLogin$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$onClickLogin$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.hyh_1 = null;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 7;
            this.id_1 = 6;
            this.hd_1 = 2;
            var tmp_0 = this.dyh_1.qqn();
            var this_0 = this.eyh_1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.fyh_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            var tmp_3 = this.dyh_1.dyf_1;
            Companion_getInstance_116();
            var tmp0_safe_receiver = this.dyh_1.aqn_1.ba('maxDob');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.uoa(tmp_1, tmp_2, tmp_3, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.dyh_1.oyf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.jyh_1 = suspendResult;
            if (!this.dyh_1.pyf_1) {
              var tmp_4 = this;
              var this_2 = this.dyh_1.a57();
              var context = new LearningSpace(this.dyh_1.dyf_1);
              var trigger = this_2.d57();
              var tmp_5 = Companion_instance_0;
              var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
              var tmp_7 = get_direct(On(this_2, tmp_5.h57(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).f58();
              var tmp_8 = typeToken(createKType(getKClass(SavePasswordUseCase), arrayOf([]), false));
              tmp_4.kyh_1 = tmp_7.e58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), null);
              this.lyh_1 = this.kyh_1;
              if (this.lyh_1 == null) {
                this.myh_1 = null;
                this.hd_1 = 4;
                continue $sm;
              } else {
                this.hd_1 = 3;
                var this_3 = this.eyh_1;
                var tmp_9 = toString(trim(isCharSequence(this_3) ? this_3 : THROW_CCE()));
                var this_4 = this.fyh_1;
                suspendResult = this.lyh_1.vpc(tmp_9, toString(trim(isCharSequence(this_4) ? this_4 : THROW_CCE())), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 3:
            var tmp_10 = this;
            tmp_10.myh_1 = Unit_instance;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            var tmp_11 = this;
            goToNextDestAfterLoginOrGuestSelected(this.dyh_1, this.jyh_1.dkz());
            tmp_11.iyh_1 = Unit_instance;
            this.id_1 = 8;
            this.hd_1 = 9;
            continue $sm;
          case 6:
            this.id_1 = 7;
            var tmp_12 = this.kd_1;
            if (tmp_12 instanceof AdultAccountRequiredException) {
              var e = this.kd_1;
              var tmp_13 = this;
              this.hyh_1 = _get_impl__d88w17_0(this.dyh_1).moj(strings_getInstance().fnf_1);
              tmp_13.iyh_1 = Unit_instance;
              this.id_1 = 8;
              this.hd_1 = 9;
              continue $sm;
            } else {
              var tmp_14 = this.kd_1;
              if (tmp_14 instanceof UnauthorizedException) {
                var e_0 = this.kd_1;
                var tmp_15 = this;
                this.hyh_1 = _get_impl__d88w17_0(this.dyh_1).moj(strings_getInstance().zmi_1);
                tmp_15.iyh_1 = Unit_instance;
                this.id_1 = 8;
                this.hd_1 = 9;
                continue $sm;
              } else {
                var tmp_16 = this.kd_1;
                if (tmp_16 instanceof ConsentNotGrantedException) {
                  var e_1 = this.kd_1;
                  var tmp_17 = this;
                  this.hyh_1 = _get_impl__d88w17_0(this.dyh_1).moj(strings_getInstance().enf_1);
                  tmp_17.iyh_1 = Unit_instance;
                  this.id_1 = 8;
                  this.hd_1 = 9;
                  continue $sm;
                } else {
                  var tmp_18 = this.kd_1;
                  if (tmp_18 instanceof Exception) {
                    var e_2 = this.kd_1;
                    var tmp_19 = this;
                    this.hyh_1 = _get_impl__d88w17_0(this.dyh_1).moj(strings_getInstance().amj_1);
                    tmp_19.iyh_1 = Unit_instance;
                    this.id_1 = 8;
                    this.hd_1 = 9;
                    continue $sm;
                  } else {
                    throw this.kd_1;
                  }
                }
              }
            }

          case 7:
            this.id_1 = 8;
            var t = this.kd_1;
            this.dyh_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$3: do {
              var this_5 = this.dyh_1.ayf_1;
              while (true) {
                var prevValue = this_5.t2();
                var nextValue = prevValue.hyg(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, this.hyh_1);
                if (this_5.y1k(prevValue, nextValue)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            throw t;
          case 8:
            throw this.kd_1;
          case 9:
            this.id_1 = 8;
            this.dyh_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$5: do {
              var this_6 = this.dyh_1.ayf_1;
              while (true) {
                var prevValue_0 = this_6.t2();
                var nextValue_0 = prevValue_0.hyg(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, this.hyh_1);
                if (this_6.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_3 = $p;
        if (this.id_1 === 8) {
          throw e_3;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_3;
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$onClickLogin$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$onClickLogin$slambda(this.dyh_1, this.eyh_1, this.fyh_1, completion);
    i.gyh_1 = $this$launch;
    return i;
  };
  function LoginViewModel$onClickLogin$slambda_0(this$0, $username, $password, resultContinuation) {
    var i = new LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$onClickConnectAsGuest$slambda(this$0, resultContinuation) {
    this.vyh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.vyh_1.qqn().voa(this.vyh_1.dyf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var guestPerson = suspendResult;
            goToNextDestAfterLoginOrGuestSelected(this.vyh_1, guestPerson.onu_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$onClickConnectAsGuest$slambda(this.vyh_1, completion);
    i.wyh_1 = $this$launch;
    return i;
  };
  function LoginViewModel$onClickConnectAsGuest$slambda_0(this$0, resultContinuation) {
    var i = new LoginViewModel$onClickConnectAsGuest$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$getCredentials$slambda($getCredentialUseCaseVal, this$0, resultContinuation) {
    this.fyi_1 = $getCredentialUseCaseVal;
    this.gyi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$getCredentials$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$getCredentials$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$getCredentials$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = this.fyi_1.qpb(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.iyi_1 = suspendResult;
            var tmp_0 = this.iyi_1;
            if (tmp_0 instanceof PasskeyCredentialResult) {
              this.hd_1 = 2;
              suspendResult = this.gyi_1.qqn().toa(this.iyi_1.ir6_1, this.gyi_1.dyf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this.iyi_1;
              if (tmp_1 instanceof PasswordCredentialResult) {
                var tmp0_container = _get_parseCredentialUsernameUseCase__8m48wk_0(this.gyi_1).up9(this.iyi_1.gr6_1);
                var learningSpace = tmp0_container.y6();
                var username = tmp0_container.z6();
                this.gyi_1.jyi(username);
                this.gyi_1.kyi(this.iyi_1.hr6_1);
                this.gyi_1.pyf_1 = true;
                var tmp_2 = this.gyi_1;
                var this_0 = learningSpace.wnt_1;
                Companion_getInstance_116();
                this.gyi_1.aqn_1.dqj('learningSpaceUrl', this_0);
                tmp_2.dyf_1 = this_0;
                this.gyi_1.lyi();
                this.hd_1 = 3;
                continue $sm;
              } else {
                var tmp_3 = this.iyi_1;
                if (tmp_3 instanceof Error_2) {
                  l$ret$1: do {
                    var this_1 = this.gyi_1.ayf_1;
                    while (true) {
                      var prevValue = this_1.t2();
                      var nextValue = prevValue.hyg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.iyi_1.er4_1);
                      if (this_1.y1k(prevValue, nextValue)) {
                        break l$ret$1;
                      }
                    }
                  }
                   while (false);
                  var tmp_4 = Napier_getInstance();
                  tmp_4.s5e(VOID, VOID, LoginViewModel$getCredentials$slambda$lambda(this.iyi_1));
                  this.hd_1 = 3;
                  continue $sm;
                } else {
                  var tmp_5;
                  var tmp_6 = this.iyi_1;
                  if (tmp_6 instanceof NoCredentialAvailableResult) {
                    tmp_5 = true;
                  } else {
                    var tmp_7 = this.iyi_1;
                    tmp_5 = tmp_7 instanceof UserCanceledResult_0;
                  }
                  if (tmp_5) {
                    this.hd_1 = 3;
                    continue $sm;
                  } else {
                    this.hd_1 = 3;
                    continue $sm;
                  }
                }
              }
            }

          case 2:
            var account = suspendResult;
            goToNextDestAfterLoginOrGuestSelected(this.gyi_1, account.dkz());
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 4:
            this.id_1 = 5;
            var tmp_8 = this.kd_1;
            if (tmp_8 instanceof Exception) {
              var e = this.kd_1;
              var tmp_9 = Napier_getInstance();
              tmp_9.s5e(VOID, VOID, LoginViewModel$getCredentials$slambda$lambda_0(e));
              this.hd_1 = 6;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 5) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$getCredentials$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$getCredentials$slambda(this.fyi_1, this.gyi_1, completion);
    i.hyi_1 = $this$launch;
    return i;
  };
  function LoginViewModel$getCredentials$slambda_0($getCredentialUseCaseVal, this$0, resultContinuation) {
    var i = new LoginViewModel$getCredentials$slambda($getCredentialUseCaseVal, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'Login');
    this.ayf_1 = MutableStateFlow(new LoginUiState());
    this.byf_1 = asStateFlow(this.ayf_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.eyf_1 = Instance(this, tmp$ret$0, null).a5d(this, impl$factory_1());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.fyf_1 = Instance(this, tmp$ret$2, null).a5d(this, httpClient$factory_7());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.gyf_1 = Instance(this, tmp$ret$4, null).a5d(this, apiUrlConfig$factory_7());
    this.hyf_1 = null;
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.iyf_1 = Instance(this, tmp$ret$6, null).a5d(this, setLanguageUseCase$factory_1());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.jyf_1 = Instance(this, tmp$ret$8, null).a5d(this, languagesConfig$factory());
    this.kyf_1 = new ValidateUsernameUseCase_0();
    this.lyf_1 = new FilterUsernameUseCase();
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.myf_1 = InstanceOrNull(this, tmp$ret$10, null).a5d(this, getVersionUseCase$factory_1());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(GetShowPoweredByUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.nyf_1 = InstanceOrNull(this, tmp$ret$12, null).a5d(this, getShowPoweredByUseCase$factory_1());
    var tmp_13 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_13.oyf_1 = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    this.pyf_1 = false;
    var tmp_14 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_15 = typeToken(createKType(getKClass(GetCredentialUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_15, TypeToken) ? tmp_15 : THROW_CCE();
    tmp_14.qyf_1 = InstanceOrNull(this, tmp$ret$14, null).a5d(this, getCredentialUseCase$factory_1());
    var tmp_16 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_17 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
    tmp_16.ryf_1 = Instance(this, tmp$ret$16, null).a5d(this, parseCredentialUsernameUseCase$factory_1());
    var tmp_18 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_19;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_140();
      tmp_19 = 'CourseListHome';
    } else {
      tmp_19 = tmp0_elvis_lhs;
    }
    tmp_18.cyf_1 = tmp_19;
    var tmp_20 = this;
    Companion_getInstance_116();
    var tmp1_elvis_lhs_0 = savedStateHandle.ba('learningSpaceUrl');
    var tmp2_elvis_lhs = tmp1_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_3(this).yo5_1 : tmp1_elvis_lhs_0;
    tmp_20.dyf_1 = tmp2_elvis_lhs == null ? 'http://localhost' : tmp2_elvis_lhs;
    Companion_getInstance_116();
    savedStateHandle.dqj('learningSpaceUrl', this.dyf_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ayf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
        var tmp_21 = this.aqo().moj(strings_getInstance().rnm_1) + ': ';
        var tmp0_safe_receiver_0 = _get_getVersionUseCase__n7x57g_0(this);
        var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.xpe();
        var tmp_22 = tmp_21 + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vpe_1);
        Companion_getInstance_116();
        var tmp_23 = savedStateHandle.ba('intMsg');
        var tmp_24 = _get_languagesConfig__hebcss(this).zq7(this.aqo());
        var tmp_25 = _get_languagesConfig__hebcss(this).aq8(this.aqo());
        var tmp2_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e_0(this);
        var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.xpe();
        var nextValue = prevValue.hyg(VOID, VOID, VOID, VOID, VOID, tmp_22, VOID, tmp_23, VOID, tmp_24, tmp_25, VOID, tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    Companion_getInstance_213();
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.ayf_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.hyg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    var tmp3_title = _get_impl__d88w17_0(this).moj(strings_getInstance().imi_1);
    var baseAppUiState = new AppUiState(VOID, VOID, tmp3_title, false, VOID, VOID, false);
    this.dyf_1 = requirePostfix(this.dyf_1, '/');
    Companion_getInstance_116();
    var siteJsonStr = savedStateHandle.ba('site');
    if (!(siteJsonStr == null)) {
      this.eqn_1.x1k(baseAppUiState);
      // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
      var this_2 = this.m4r();
      // Inline function 'kotlinx.serialization.serializer' call
      var this_3 = this_2.t45();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_4 = serializer(this_3, createKType(getKClass(Site), arrayOf([]), false));
      var tmp$ret$23 = isInterface(this_4, KSerializer) ? this_4 : THROW_CCE();
      var tmp$ret$24 = this_2.s45(tmp$ret$23, siteJsonStr);
      onSiteVerified(this, tmp$ret$24);
    } else {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_5 = this.ayf_1;
        while (true) {
          var prevValue_1 = this_5.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_1 = prevValue_1.hyg(VOID, VOID, false);
          if (this_5.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
      this.eqn_1.x1k(baseAppUiState.mq6(VOID, Companion_getInstance_97().tq6_1));
      var tmp_26 = this.rqn();
      launch(tmp_26, VOID, VOID, LoginViewModel$slambda_0(this, null));
    }
    getCredentials_0(this);
  }
  protoOf(LoginViewModel).jyi = function (newValue) {
    this.pyf_1 = false;
    var filteredValue = this.lyf_1.tpe(newValue, '');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ayf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onUsernameChanged.<anonymous>' call
        var nextValue = prevValue.hyg(filteredValue);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).kyi = function (password) {
    this.pyf_1 = false;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ayf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.hyg(VOID, password);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).lyi = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ayf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var this_1 = prevValue.syf_1;
        var tmp0_username = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
        // Inline function 'kotlin.text.trim' call
        var this_2 = prevValue.tyf_1;
        var tmp1_password = toString(trim(isCharSequence(this_2) ? this_2 : THROW_CCE()));
        var nextValue = prevValue.hyg(tmp0_username, tmp1_password, false, null, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var username = this.ayf_1.t2().syf_1;
    var password = this.ayf_1.t2().tyf_1;
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(username) > 0) {
      // Inline function 'kotlin.text.isNotEmpty' call
      tmp = charSequenceLength(password) > 0;
    } else {
      tmp = false;
    }
    if (tmp) {
      var validationResult = this.kyf_1.up9(username);
      if (!validationResult.equals(Companion_getInstance_74().ppo_1)) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_3 = this.ayf_1;
          while (true) {
            var prevValue_0 = this_3.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
            var tmp0_safe_receiver = validationResult.upo_1;
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              // Inline function 'kotlin.let' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>.<anonymous>' call
              tmp_0 = _get_impl__d88w17_0(this).moj(tmp0_safe_receiver);
            }
            var nextValue_0 = prevValue_0.hyg(VOID, VOID, true, tmp_0);
            if (this_3.y1k(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_instance;
      }
      this.cqo(Companion_getInstance_97().tq6_1);
      var tmp_1 = this.rqn();
      launch(tmp_1, VOID, VOID, LoginViewModel$onClickLogin$slambda_0(this, username, password, null));
    } else {
      this.cqo(Companion_getInstance_97().uq6_1);
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.ayf_1;
        while (true) {
          var prevValue_1 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
          var tmp_2;
          // Inline function 'kotlin.text.isEmpty' call
          var this_5 = prevValue_1.syf_1;
          if (charSequenceLength(this_5) === 0) {
            tmp_2 = _get_impl__d88w17_0(this).moj(strings_getInstance().vmn_1);
          } else {
            tmp_2 = null;
          }
          var tmp_3 = tmp_2;
          var tmp_4;
          // Inline function 'kotlin.text.isEmpty' call
          var this_6 = prevValue_1.tyf_1;
          if (charSequenceLength(this_6) === 0) {
            tmp_4 = _get_impl__d88w17_0(this).moj(strings_getInstance().vmn_1);
          } else {
            tmp_4 = null;
          }
          var nextValue_1 = prevValue_1.hyg(VOID, VOID, true, tmp_3, tmp_4);
          if (this_4.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).myi = function (uiLanguage) {
    if (!uiLanguage.equals(this.ayf_1.t2().byg_1)) {
      var tmp = _get_setLanguageUseCase__st7nci_0(this);
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
      Companion_getInstance_116();
      this.nqo(this_0, 'next');
      Companion_getInstance_116();
      this.nqo(this_0, 'learningSpaceUrl');
      Companion_getInstance_116();
      this.nqo(this_0, 'site');
      var tmp$ret$2 = this_0.f3();
      var result = tmp.mpi(uiLanguage, 'Login', this.cqn_1, tmp$ret$2);
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.ayf_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
          var nextValue = prevValue.hyg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, uiLanguage, VOID, result.lpi_1);
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).nyi = function () {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, LoginViewModel$onClickConnectAsGuest$slambda_0(this, null));
  };
  function LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    usernameError = usernameError === VOID ? null : usernameError;
    passwordError = passwordError === VOID ? null : passwordError;
    versionInfo = versionInfo === VOID ? 'v42' : versionInfo;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? false : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? null : loginIntentMessage;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    currentLanguage = currentLanguage === VOID ? new UiLanguage('en', 'English') : currentLanguage;
    languageList = languageList === VOID ? listOf_0(currentLanguage) : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? false : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? false : showPoweredBy;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    errorText = errorText === VOID ? null : errorText;
    this.syf_1 = username;
    this.tyf_1 = password;
    this.uyf_1 = fieldsEnabled;
    this.vyf_1 = usernameError;
    this.wyf_1 = passwordError;
    this.xyf_1 = versionInfo;
    this.yyf_1 = connectAsGuestVisible;
    this.zyf_1 = loginIntentMessage;
    this.ayg_1 = errorMessage;
    this.byg_1 = currentLanguage;
    this.cyg_1 = languageList;
    this.dyg_1 = showWaitForRestart;
    this.eyg_1 = showPoweredBy;
    this.fyg_1 = isPersonalAccount;
    this.gyg_1 = errorText;
  }
  protoOf(LoginUiState).oyi = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) {
    return new LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText);
  };
  protoOf(LoginUiState).hyg = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText, $super) {
    username = username === VOID ? this.syf_1 : username;
    password = password === VOID ? this.tyf_1 : password;
    fieldsEnabled = fieldsEnabled === VOID ? this.uyf_1 : fieldsEnabled;
    usernameError = usernameError === VOID ? this.vyf_1 : usernameError;
    passwordError = passwordError === VOID ? this.wyf_1 : passwordError;
    versionInfo = versionInfo === VOID ? this.xyf_1 : versionInfo;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? this.yyf_1 : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? this.zyf_1 : loginIntentMessage;
    errorMessage = errorMessage === VOID ? this.ayg_1 : errorMessage;
    currentLanguage = currentLanguage === VOID ? this.byg_1 : currentLanguage;
    languageList = languageList === VOID ? this.cyg_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.dyg_1 : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? this.eyg_1 : showPoweredBy;
    isPersonalAccount = isPersonalAccount === VOID ? this.fyg_1 : isPersonalAccount;
    errorText = errorText === VOID ? this.gyg_1 : errorText;
    return $super === VOID ? this.oyi(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) : $super.oyi.call(this, username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText);
  };
  protoOf(LoginUiState).toString = function () {
    return 'LoginUiState(username=' + this.syf_1 + ', password=' + this.tyf_1 + ', fieldsEnabled=' + this.uyf_1 + ', usernameError=' + this.vyf_1 + ', passwordError=' + this.wyf_1 + ', versionInfo=' + this.xyf_1 + ', connectAsGuestVisible=' + this.yyf_1 + ', loginIntentMessage=' + this.zyf_1 + ', errorMessage=' + this.ayg_1 + ', currentLanguage=' + this.byg_1 + ', languageList=' + this.cyg_1 + ', showWaitForRestart=' + this.dyg_1 + ', showPoweredBy=' + this.eyg_1 + ', isPersonalAccount=' + this.fyg_1 + ', errorText=' + this.gyg_1 + ')';
  };
  protoOf(LoginUiState).hashCode = function () {
    var result = getStringHashCode(this.syf_1);
    result = imul(result, 31) + getStringHashCode(this.tyf_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uyf_1) | 0;
    result = imul(result, 31) + (this.vyf_1 == null ? 0 : getStringHashCode(this.vyf_1)) | 0;
    result = imul(result, 31) + (this.wyf_1 == null ? 0 : getStringHashCode(this.wyf_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.xyf_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yyf_1) | 0;
    result = imul(result, 31) + (this.zyf_1 == null ? 0 : getStringHashCode(this.zyf_1)) | 0;
    result = imul(result, 31) + (this.ayg_1 == null ? 0 : getStringHashCode(this.ayg_1)) | 0;
    result = imul(result, 31) + this.byg_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.cyg_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dyg_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.eyg_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fyg_1) | 0;
    result = imul(result, 31) + (this.gyg_1 == null ? 0 : getStringHashCode(this.gyg_1)) | 0;
    return result;
  };
  protoOf(LoginUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LoginUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LoginUiState ? other : THROW_CCE();
    if (!(this.syf_1 === tmp0_other_with_cast.syf_1))
      return false;
    if (!(this.tyf_1 === tmp0_other_with_cast.tyf_1))
      return false;
    if (!(this.uyf_1 === tmp0_other_with_cast.uyf_1))
      return false;
    if (!(this.vyf_1 == tmp0_other_with_cast.vyf_1))
      return false;
    if (!(this.wyf_1 == tmp0_other_with_cast.wyf_1))
      return false;
    if (!(this.xyf_1 === tmp0_other_with_cast.xyf_1))
      return false;
    if (!(this.yyf_1 === tmp0_other_with_cast.yyf_1))
      return false;
    if (!(this.zyf_1 == tmp0_other_with_cast.zyf_1))
      return false;
    if (!(this.ayg_1 == tmp0_other_with_cast.ayg_1))
      return false;
    if (!this.byg_1.equals(tmp0_other_with_cast.byg_1))
      return false;
    if (!equals(this.cyg_1, tmp0_other_with_cast.cyg_1))
      return false;
    if (!(this.dyg_1 === tmp0_other_with_cast.dyg_1))
      return false;
    if (!(this.eyg_1 === tmp0_other_with_cast.eyg_1))
      return false;
    if (!(this.fyg_1 === tmp0_other_with_cast.fyg_1))
      return false;
    if (!(this.gyg_1 == tmp0_other_with_cast.gyg_1))
      return false;
    return true;
  };
  function impl$factory_1() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function httpClient$factory_7() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_3(receiver);
    }, null);
  }
  function apiUrlConfig$factory_7() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_1() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(receiver);
    }, null);
  }
  function languagesConfig$factory() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss(receiver);
    }, null);
  }
  function getVersionUseCase$factory_1() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_0(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_1() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e_0(receiver);
    }, null);
  }
  function getCredentialUseCase$factory_1() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r_0(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory_1() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk_0(receiver);
    }, null);
  }
  function impl$factory_2() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function httpClient$factory_8() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_3(receiver);
    }, null);
  }
  function apiUrlConfig$factory_8() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_2() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(receiver);
    }, null);
  }
  function languagesConfig$factory_0() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss(receiver);
    }, null);
  }
  function getVersionUseCase$factory_2() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_0(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_2() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e_0(receiver);
    }, null);
  }
  function getCredentialUseCase$factory_2() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r_0(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory_2() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk_0(receiver);
    }, null);
  }
  function daysUntil_0(_this__u8e3s4, other) {
    return daysUntil(Companion_getInstance_6().fmh(_this__u8e3s4.vfl_1), Companion_getInstance_6().fmh(other.vfl_1), Companion_getInstance_9().xmh());
  }
  function Companion_173() {
    Companion_instance_222 = this;
    this.pyi_1 = 'ConversationList';
    this.qyi_1 = 'ConversationListHome';
    this.ryi_1 = listOf(['ConversationList', 'ConversationListHome']);
  }
  var Companion_instance_222;
  function Companion_getInstance_190() {
    if (Companion_instance_222 == null)
      new Companion_173();
    return Companion_instance_222;
  }
  function ConversationListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().f7f().bfl(toQueryLikeParam(this$0.eqn_1.t2().eq6_1.tq5_1), this$0.sqn());
    };
  }
  function ConversationListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.qqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function ConversationListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_190();
    destinationName = destinationName === VOID ? 'ConversationList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ConversationListUiState(), destinationName);
    var tmp = this;
    tmp.syj_1 = ConversationListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_1 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_1.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_1.length;
        while (inductionVariable < last) {
          var element = this_1[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$0 = this.aqo().moj(get_dayStringResource(element));
          result.s(element, tmp$ret$0);
        }
        var tmp1_conversations = this.syj_1;
        var nextValue = prevValue.yyj(tmp1_conversations, VOID, VOID, VOID, result);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        var tmp0_searchState = this.eqx();
        var tmp1_title = this.mqx(strings_getInstance().qni_1, strings_getInstance().nnl_1);
        var tmp_0 = this.aqo().moj(strings_getInstance().rni_1);
        var tmp_1 = FabIcon_ADD_getInstance();
        var tmp2_fabState = new FabUiState(true, tmp_0, tmp_1, ConversationListViewModel$onClickAdd$ref(this));
        var nextValue_0 = prevValue_0.mq6(tmp2_fabState, VOID, tmp1_title, true, VOID, VOID, VOID, tmp0_searchState);
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ConversationListViewModel).pqw = function (searchText) {
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(ConversationListViewModel).qqw = function () {
    Companion_getInstance_204();
    var tmp = to('goToOnPersonSelected', 'MessageList');
    Companion_getInstance_116();
    var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().zqj_1);
    Companion_getInstance_204();
    var tmp_1 = to('excludeAlreadySelectedList', this.sqn().toString());
    Companion_getInstance_204();
    this.cqn_1.rp6('People', mapOf([tmp, tmp_0, tmp_1, to('popUpToOnPersonSelected', 'People')]));
  };
  protoOf(ConversationListViewModel).zyj = function (entry) {
    Companion_getInstance_116();
    var tmp0_safe_receiver = entry.xfm_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
    this.cqn_1.rp6('MessageList', mapOf_0(to('personUid', (tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs).toString())));
  };
  function ConversationListUiState$_init_$lambda_uo1nhr() {
    return new EmptyPagingSource();
  }
  function ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (conversations === VOID) {
      tmp = ConversationListUiState$_init_$lambda_uo1nhr;
    } else {
      tmp = conversations;
    }
    conversations = tmp;
    sortOptions = sortOptions === VOID ? emptyList() : sortOptions;
    showAddItem = showAddItem === VOID ? false : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.tyj_1 = conversations;
    this.uyj_1 = sortOptions;
    this.vyj_1 = showAddItem;
    this.wyj_1 = localDateTimeNow;
    this.xyj_1 = dayOfWeekStrings;
  }
  protoOf(ConversationListUiState).ayk = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    return new ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).yyj = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings, $super) {
    conversations = conversations === VOID ? this.tyj_1 : conversations;
    sortOptions = sortOptions === VOID ? this.uyj_1 : sortOptions;
    showAddItem = showAddItem === VOID ? this.vyj_1 : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? this.wyj_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.xyj_1 : dayOfWeekStrings;
    return $super === VOID ? this.ayk(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) : $super.ayk.call(this, conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).toString = function () {
    return 'ConversationListUiState(conversations=' + this.tyj_1 + ', sortOptions=' + this.uyj_1 + ', showAddItem=' + this.vyj_1 + ', localDateTimeNow=' + this.wyj_1 + ', dayOfWeekStrings=' + this.xyj_1 + ')';
  };
  protoOf(ConversationListUiState).hashCode = function () {
    var result = hashCode(this.tyj_1);
    result = imul(result, 31) + hashCode(this.uyj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vyj_1) | 0;
    result = imul(result, 31) + this.wyj_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.xyj_1) | 0;
    return result;
  };
  protoOf(ConversationListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ConversationListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ConversationListUiState ? other : THROW_CCE();
    if (!equals(this.tyj_1, tmp0_other_with_cast.tyj_1))
      return false;
    if (!equals(this.uyj_1, tmp0_other_with_cast.uyj_1))
      return false;
    if (!(this.vyj_1 === tmp0_other_with_cast.vyj_1))
      return false;
    if (!this.wyj_1.equals(tmp0_other_with_cast.wyj_1))
      return false;
    if (!equals(this.xyj_1, tmp0_other_with_cast.xyj_1))
      return false;
    return true;
  };
  function MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.jyk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda$slambda).fon = function (it, $completion) {
    var tmp = this.gon(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.fon((p1 == null ? true : p1 instanceof PersonNames) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.jyk_1.eqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.kyk_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg8_1;
              var tmp_0 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
              var tmp2_safe_receiver = this.kyk_1;
              var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ag9_1;
              var nextValue = prevValue.mq6(VOID, VOID, tmp_0 + ' ' + (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).gon = function (it, completion) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this.jyk_1, completion);
    i.kyk_1 = it;
    return i;
  };
  function MessageListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.fon(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.tyk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(MessageListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.tyk_1.wqn().n7d().qg4(this.tyk_1.uyl_1);
            var tmp_1 = MessageListViewModel$slambda$slambda$slambda_0(this.tyk_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_32(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda$slambda).l78 = function (completion) {
    return new MessageListViewModel$slambda$slambda(this.tyk_1, completion);
  };
  function MessageListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_ustadAccountManager__el9prc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vyl_1;
    ustadAccountManager$factory_2();
    return this_0.t2();
  }
  function _get_showSocialWarningUseCase__ft8jc6_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wyl_1;
    showSocialWarningUseCase$factory_2();
    return this_0.t2();
  }
  function _get_dismissSocialWarningUseCase__st8mv5_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xyl_1;
    dismissSocialWarningUseCase$factory_2();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yyl_1;
    openExternalLinkUseCase$factory_4();
    return this_0.t2();
  }
  function Companion_174() {
    this.aym_1 = 'MessageList';
  }
  var Companion_instance_223;
  function Companion_getInstance_191() {
    return Companion_instance_223;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_32(function_0) {
    this.bym_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_32).t1d = function (value, $completion) {
    return this.bym_1(value, $completion);
  };
  function MessageListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().f7f().afl(this$0.sqn(), this$0.uyl_1);
    };
  }
  function MessageListViewModel$slambda(this$0, resultContinuation) {
    this.kym_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.kym_1.vqv_1, MessageListViewModel$slambda$slambda_0(this.kym_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new MessageListViewModel$slambda(this.kym_1, completion);
    i.lym_1 = $this$launch;
    return i;
  };
  function MessageListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$onWarningDismiss$slambda(this$0, resultContinuation) {
    this.uym_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$onWarningDismiss$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          _get_dismissSocialWarningUseCase__st8mv5_0(this.uym_1).wp1(toString_0(_get_ustadAccountManager__el9prc_0(this.uym_1).uo9().onu_1.g96_1));
          l$ret$1: do {
            var this_0 = this.uym_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.cyn(VOID, VOID, VOID, VOID, VOID, false);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).v1m = function ($this$launch, completion) {
    var i = new MessageListViewModel$onWarningDismiss$slambda(this.uym_1, completion);
    i.vym_1 = $this$launch;
    return i;
  };
  function MessageListViewModel$onWarningDismiss$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$onWarningDismiss$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$onClickSend$slambda(this$0, resultContinuation) {
    this.lyn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$onClickSend$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$onClickSend$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$onClickSend$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.lyn_1.wqn().f7f();
            var tmp0_messageSenderPersonUid = this.lyn_1.sqn();
            var this_0 = this.lyn_1.vqv_1.t2().yym_1;
            var tmp1_messageText = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var tmp2_messageToPersonUid = this.lyn_1.uyl_1;
            var tmp3_messageTimestamp = systemTimeInMillis();
            suspendResult = tmp_0.cfl(new Message(VOID, tmp0_messageSenderPersonUid, tmp2_messageToPersonUid, tmp1_messageText, tmp3_messageTimestamp), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_1 = this.lyn_1.vqv_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.cyn(VOID, VOID, '');
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(MessageListViewModel$onClickSend$slambda).v1m = function ($this$launch, completion) {
    var i = new MessageListViewModel$onClickSend$slambda(this.lyn_1, completion);
    i.myn_1 = $this$launch;
    return i;
  };
  function MessageListViewModel$onClickSend$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$onClickSend$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'MessageList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new MessageListUiState(), destinationName);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.uyl_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.vyl_1 = Instance(di, tmp$ret$0, null).a5d(this, ustadAccountManager$factory_1());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(ShowSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.wyl_1 = Instance(di, tmp$ret$2, null).a5d(this, showSocialWarningUseCase$factory_1());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(DismissSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.xyl_1 = Instance(di, tmp$ret$4, null).a5d(this, dismissSocialWarningUseCase$factory_1());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.yyl_1 = Instance(di, tmp$ret$6, null).a5d(this, openExternalLinkUseCase$factory_3());
    var tmp_8 = this;
    tmp_8.zyl_1 = MessageListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, VOID, true, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.vqv_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$10 = this.aqo().moj(get_dayStringResource(element));
          result.s(element, tmp$ret$10);
        }
        var tmp1_messages = this.zyl_1;
        var tmp2_activePersonUid = this.sqn();
        var tmp3_showSocialWarning = _get_showSocialWarningUseCase__ft8jc6_0(this).up9(toString_0(_get_ustadAccountManager__el9prc_0(this).uo9().onu_1.g96_1));
        var nextValue_0 = prevValue_0.cyn(tmp1_messages, tmp2_activePersonUid, VOID, result, VOID, tmp3_showSocialWarning);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_9 = this.rqn();
    launch(tmp_9, VOID, VOID, MessageListViewModel$slambda_0(this, null));
  }
  protoOf(MessageListViewModel).itv = function () {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, MessageListViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(MessageListViewModel).pqw = function (searchText) {
    // Inline function 'kotlin.TODO' call
    var reason = 'Not yet implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(MessageListViewModel).qqw = function () {
  };
  protoOf(MessageListViewModel).nyn = function (text) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.onChangeNewMessageText.<anonymous>' call
        var nextValue = prevValue.cyn(VOID, VOID, text);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(MessageListViewModel).csr = function () {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, MessageListViewModel$onClickSend$slambda_0(this, null));
  };
  function MessageListUiState$_init_$lambda_mkfto3() {
    return new EmptyPagingSource();
  }
  function MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) {
    var tmp;
    if (messages === VOID) {
      tmp = MessageListUiState$_init_$lambda_mkfto3;
    } else {
      tmp = messages;
    }
    messages = tmp;
    activePersonUid = activePersonUid === VOID ? new Long(0, 0) : activePersonUid;
    newMessageText = newMessageText === VOID ? '' : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? true : showSocialWarning;
    this.wym_1 = messages;
    this.xym_1 = activePersonUid;
    this.yym_1 = newMessageText;
    this.zym_1 = dayOfWeekStrings;
    this.ayn_1 = localDateTimeNow;
    this.byn_1 = showSocialWarning;
  }
  protoOf(MessageListUiState).oyn = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) {
    return new MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).cyn = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning, $super) {
    messages = messages === VOID ? this.wym_1 : messages;
    activePersonUid = activePersonUid === VOID ? this.xym_1 : activePersonUid;
    newMessageText = newMessageText === VOID ? this.yym_1 : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.zym_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.ayn_1 : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? this.byn_1 : showSocialWarning;
    return $super === VOID ? this.oyn(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) : $super.oyn.call(this, messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).toString = function () {
    return 'MessageListUiState(messages=' + this.wym_1 + ', activePersonUid=' + this.xym_1.toString() + ', newMessageText=' + this.yym_1 + ', dayOfWeekStrings=' + this.zym_1 + ', localDateTimeNow=' + this.ayn_1 + ', showSocialWarning=' + this.byn_1 + ')';
  };
  protoOf(MessageListUiState).hashCode = function () {
    var result = hashCode(this.wym_1);
    result = imul(result, 31) + this.xym_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.yym_1) | 0;
    result = imul(result, 31) + hashCode(this.zym_1) | 0;
    result = imul(result, 31) + this.ayn_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.byn_1) | 0;
    return result;
  };
  protoOf(MessageListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MessageListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof MessageListUiState ? other : THROW_CCE();
    if (!equals(this.wym_1, tmp0_other_with_cast.wym_1))
      return false;
    if (!this.xym_1.equals(tmp0_other_with_cast.xym_1))
      return false;
    if (!(this.yym_1 === tmp0_other_with_cast.yym_1))
      return false;
    if (!equals(this.zym_1, tmp0_other_with_cast.zym_1))
      return false;
    if (!this.ayn_1.equals(tmp0_other_with_cast.ayn_1))
      return false;
    if (!(this.byn_1 === tmp0_other_with_cast.byn_1))
      return false;
    return true;
  };
  function ustadAccountManager$factory_1() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc_0(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory_1() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6_0(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory_1() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5_0(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_3() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_1(receiver);
    }, null);
  }
  function ustadAccountManager$factory_2() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc_0(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory_2() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6_0(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory_2() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5_0(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_4() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_1(receiver);
    }, null);
  }
  function TitleAndLangCode(title, langCode) {
    this.pyn_1 = title;
    this.qyn_1 = langCode;
  }
  protoOf(TitleAndLangCode).toString = function () {
    return 'TitleAndLangCode(title=' + this.pyn_1 + ', langCode=' + this.qyn_1 + ')';
  };
  protoOf(TitleAndLangCode).hashCode = function () {
    var result = getStringHashCode(this.pyn_1);
    result = imul(result, 31) + getStringHashCode(this.qyn_1) | 0;
    return result;
  };
  protoOf(TitleAndLangCode).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TitleAndLangCode))
      return false;
    var tmp0_other_with_cast = other instanceof TitleAndLangCode ? other : THROW_CCE();
    if (!(this.pyn_1 === tmp0_other_with_cast.pyn_1))
      return false;
    if (!(this.qyn_1 === tmp0_other_with_cast.qyn_1))
      return false;
    return true;
  };
  function _get_statementRecorder__l4o9jw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yyd_1;
    statementRecorder$factory();
    return this_0.t2();
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0) {
    return function () {
      var titleAndLangCodeVal = this$0.uyc();
      var tmp = this$0.xyd_1.ujz_1;
      var tmp_0;
      if (!(titleAndLangCodeVal == null)) {
        tmp_0 = mapOf_0(to(titleAndLangCodeVal.qyn_1, titleAndLangCodeVal.pyn_1));
      } else {
        tmp_0 = null;
      }
      return new XapiActivityStatementObject(VOID, tmp, new XapiActivity(tmp_0));
    };
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this$0) {
    return function () {
      var tmp = this$0.sqo(this$0.wyd_1);
      var tmp_0 = this$0.rqn();
      return this$0.vyd_1.nq3(tmp, tmp_0, AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0));
    };
  }
  function AbstractNonInteractiveContentViewModel(di, savedStateHandle, destName) {
    UstadViewModel.call(this, di, savedStateHandle, destName);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = get_direct(onActiveLearningSpace(di)).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp.vyd_1 = tmp_0.d58(tmp$ret$0, null);
    var tmp_2 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.wyd_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.xyd_1 = this.sqo(this.wyd_1);
    var tmp_3 = this;
    tmp_3.yyd_1 = lazy_0(AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this));
  }
  protoOf(AbstractNonInteractiveContentViewModel).gq3 = function (oneCompletionStatementOnly) {
    _get_statementRecorder__l4o9jw(this).gq3(oneCompletionStatementOnly);
  };
  protoOf(AbstractNonInteractiveContentViewModel).zyd = function (oneCompletionStatementOnly, $super) {
    oneCompletionStatementOnly = oneCompletionStatementOnly === VOID ? false : oneCompletionStatementOnly;
    var tmp;
    if ($super === VOID) {
      this.gq3(oneCompletionStatementOnly);
      tmp = Unit_instance;
    } else {
      tmp = $super.gq3.call(this, oneCompletionStatementOnly);
    }
    return tmp;
  };
  protoOf(AbstractNonInteractiveContentViewModel).fq3 = function (progress) {
    _get_statementRecorder__l4o9jw(this).fq3(progress);
  };
  protoOf(AbstractNonInteractiveContentViewModel).sq2 = function (active) {
    _get_statementRecorder__l4o9jw(this).sq2(active);
  };
  protoOf(AbstractNonInteractiveContentViewModel).um7 = function () {
    _get_statementRecorder__l4o9jw(this).um7();
    protoOf(UstadViewModel).um7.call(this);
  };
  protoOf(AbstractNonInteractiveContentViewModel).iq3 = function () {
    _get_statementRecorder__l4o9jw(this).iq3();
  };
  function statementRecorder$factory() {
    return getPropertyCallableRef('statementRecorder', 1, KProperty1, function (receiver) {
      return _get_statementRecorder__l4o9jw(receiver);
    }, null);
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.zyn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).byo = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).he = function (p1, $completion) {
    return this.byo(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.ayo_1.x7e().vgs(this.zyn_1.iqt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_safe_receiver = suspendResult;
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              var tmp_1;
              var tmp0_safe_receiver_0 = tmp0_safe_receiver.dgu_1;
              var tmp_2;
              if (tmp0_safe_receiver_0 == null) {
                tmp_2 = null;
              } else {
                tmp_2 = !(!tmp0_safe_receiver_0.eg8_1.equals(new Long(0, 0)) ? !tmp0_safe_receiver_0.eg8_1.equals(this.zyn_1.sqn()) : false);
              }
              var tmp1_elvis_lhs = tmp_2;
              if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {
                tmp_1 = tmp0_safe_receiver;
              } else {
                tmp_1 = null;
              }
              tmp_0 = tmp_1;
            }

            return tmp_0;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).yny = function (db, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this.zyn_1, completion);
    i.ayo_1 = db;
    return i;
  };
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.byo(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).kyo = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).m78 = function ($completion) {
    return this.kyo($completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).l78 = function (completion) {
    return new ParentalConsentManagementViewModel$lambda$slambda$slambda_1(completion);
  };
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_2(resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.kyo($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.iyp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.qyp(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_getLocaleForSiteTermsUseCase__hxw5id($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kyp_1;
    getLocaleForSiteTermsUseCase$factory_0();
    return this_0.t2();
  }
  function updateStatus($this, status) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = $this.iyp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
        var tmp1_safe_receiver = prevValue.lyp_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.lyp_1.dgu_1;
          var tmp_0;
          if (tmp0_safe_receiver == null) {
            tmp_0 = null;
          } else {
            tmp_0 = shallowCopy_11(tmp0_safe_receiver, ParentalConsentManagementViewModel$updateStatus$lambda(status, $this));
          }
          tmp = tmp1_safe_receiver.pks(tmp_0);
        }
        var nextValue = prevValue.qyp(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    var tmp0_safe_receiver_0 = newState.lyp_1;
    var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.dgu_1;
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
      var tmp_1 = $this.rqn();
      launch(tmp_1, VOID, VOID, ParentalConsentManagementViewModel$updateStatus$slambda_0($this, tmp1_safe_receiver_0, null));
    }
    $this.yqn().bq7(new Snack($this.aqo().moj(strings_getInstance().wnf_1)));
  }
  function Companion_175() {
    this.ryp_1 = 'ParentalConsentManagement';
  }
  var Companion_instance_224;
  function Companion_getInstance_192() {
    return Companion_instance_224;
  }
  function ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation) {
    this.ayq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_46.n4r();
            var tmp_1 = ParentalConsentManagementViewModel$lambda$slambda$slambda_0(this.ayq_1, null);
            var tmp_2 = ParentalConsentManagementViewModel$lambda$slambda$slambda_2(null);
            suspendResult = this.ayq_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ParentalConsentManagementViewModel$lambda$slambda$lambda(this.ayq_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.ayq_1.iyp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.qyp(VOID, VOID, VOID, !(prevValue.lyp_1 == null));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda(this.ayq_1, completion);
    i.byq_1 = $this$launch;
    return i;
  };
  function ParentalConsentManagementViewModel$lambda$slambda_0(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda_1(this$0, resultContinuation) {
    this.kyq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.myq_1 = this.kyq_1.wqn().w7e();
            this.hd_1 = 1;
            suspendResult = _get_getLocaleForSiteTermsUseCase__hxw5id(this.kyq_1).tpm(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.nyq_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.myq_1.jhs(this.nyq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var terms = suspendResult;
            l$ret$1: do {
              var this_0 = this.kyq_1.iyp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.qyp(VOID, VOID, terms);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda_1(this.kyq_1, completion);
    i.lyq_1 = $this$launch;
    return i;
  };
  function ParentalConsentManagementViewModel$lambda$slambda_2(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.eqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mq6(VOID, VOID, this$0.aqo().moj(strings_getInstance().nnb_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.rqn();
      launch(tmp, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_0(this$0, null));
      var tmp_0 = this$0.rqn();
      launch(tmp_0, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_2(this$0, null));
      return Unit_instance;
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$lambda($status, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.kg8_1 = $status;
      $this$shallowCopy.eg8_1 = this$0.sqn();
      $this$shallowCopy.lg8_1 = systemTimeInMillis();
      return Unit_instance;
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation) {
    this.wyq_1 = this$0;
    this.xyq_1 = $personParentJoin;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.wyq_1.wqn().x7e().wgs(this.xyq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).v1m = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$updateStatus$slambda(this.wyq_1, this.xyq_1, completion);
    i.yyq_1 = $this$launch;
    return i;
  };
  function ParentalConsentManagementViewModel$updateStatus$slambda_0(this$0, $personParentJoin, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ParentalConsentManagement');
    this.iyp_1 = MutableStateFlow(new ParentalConsentManagementUiState());
    this.jyp_1 = asStateFlow(this.iyp_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.qqn().loa();
    var trigger = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.kyp_1 = Instance(this_0, tmp$ret$3, null).a5d(this, getLocaleForSiteTermsUseCase$factory());
    Companion_getInstance_125();
    var tmp_3 = mapOf_0(to('entityUid', this.iqt_1.toString()));
    this.pqo(true, tmp_3, ParentalConsentManagementViewModel$lambda(this));
  }
  protoOf(ParentalConsentManagementViewModel).zyq = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iyp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.lyp_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pks(personParentJoin);
        var tmp1_safe_receiver = prevValue.lyp_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.dgu_1;
        var tmp_0 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.gg8_1;
        var nextValue = prevValue.qyp(tmp, this.lqu(tmp_0, personParentJoin == null ? null : personParentJoin.gg8_1, prevValue.myp_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ParentalConsentManagementViewModel).ayr = function () {
    var tmp0_safe_receiver = this.iyp_1.t2().lyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.gg8_1;
    var tmp;
    if (tmp2_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
      tmp = listOf([1, 2, 4]).a1(tmp2_safe_receiver);
    }
    if (!(tmp === true)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.iyp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
          var nextValue = prevValue.qyp(VOID, this.aqo().moj(strings_getInstance().vmn_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    updateStatus(this, 1);
  };
  protoOf(ParentalConsentManagementViewModel).byr = function () {
    updateStatus(this, 2);
  };
  protoOf(ParentalConsentManagementViewModel).cyr = function () {
    var tmp0_safe_receiver = this.iyp_1.t2().lyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kg8_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var currentStatus = tmp;
    var tmp_0;
    if (currentStatus === 2) {
      tmp_0 = 1;
    } else {
      tmp_0 = 2;
    }
    updateStatus(this, tmp_0);
  };
  function ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? null : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? null : relationshipError;
    siteTerms = siteTerms === VOID ? null : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    appName = appName === VOID ? 'Ustad Mobile' : appName;
    this.lyp_1 = parentJoinAndMinor;
    this.myp_1 = relationshipError;
    this.nyp_1 = siteTerms;
    this.oyp_1 = fieldsEnabled;
    this.pyp_1 = appName;
  }
  protoOf(ParentalConsentManagementUiState).dyr = function () {
    var tmp0_safe_receiver = this.lyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).eyr = function () {
    var tmp0_safe_receiver = this.lyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).fyr = function () {
    var tmp0_safe_receiver = this.lyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).gyr = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.lyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementUiState.<get-changeConsentButtonVisible>.<anonymous>' call
    var it = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1;
    return !(it == null) ? !equals(it, new Long(0, 0)) : false;
  };
  protoOf(ParentalConsentManagementUiState).hyr = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.lyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementUiState.<get-consentStatusVisible>.<anonymous>' call
    var it = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kg8_1;
    return !(it == null) ? !(it === 0) : false;
  };
  protoOf(ParentalConsentManagementUiState).iyr = function () {
    var tmp0_safe_receiver = this.lyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kg8_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().knb_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().lnb_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).jyr = function () {
    var tmp0_safe_receiver = this.lyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kg8_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().inb_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().jnb_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).kyr = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    return new ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).qyp = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName, $super) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? this.lyp_1 : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? this.myp_1 : relationshipError;
    siteTerms = siteTerms === VOID ? this.nyp_1 : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? this.oyp_1 : fieldsEnabled;
    appName = appName === VOID ? this.pyp_1 : appName;
    return $super === VOID ? this.kyr(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) : $super.kyr.call(this, parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).toString = function () {
    return 'ParentalConsentManagementUiState(parentJoinAndMinor=' + this.lyp_1 + ', relationshipError=' + this.myp_1 + ', siteTerms=' + this.nyp_1 + ', fieldsEnabled=' + this.oyp_1 + ', appName=' + this.pyp_1 + ')';
  };
  protoOf(ParentalConsentManagementUiState).hashCode = function () {
    var result = this.lyp_1 == null ? 0 : this.lyp_1.hashCode();
    result = imul(result, 31) + (this.myp_1 == null ? 0 : getStringHashCode(this.myp_1)) | 0;
    result = imul(result, 31) + (this.nyp_1 == null ? 0 : hashCode(this.nyp_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oyp_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.pyp_1) | 0;
    return result;
  };
  protoOf(ParentalConsentManagementUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ParentalConsentManagementUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ParentalConsentManagementUiState ? other : THROW_CCE();
    if (!equals(this.lyp_1, tmp0_other_with_cast.lyp_1))
      return false;
    if (!(this.myp_1 == tmp0_other_with_cast.myp_1))
      return false;
    if (!equals(this.nyp_1, tmp0_other_with_cast.nyp_1))
      return false;
    if (!(this.oyp_1 === tmp0_other_with_cast.oyp_1))
      return false;
    if (!(this.pyp_1 === tmp0_other_with_cast.pyp_1))
      return false;
    return true;
  };
  function getLocaleForSiteTermsUseCase$factory() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id(receiver);
    }, null);
  }
  function getLocaleForSiteTermsUseCase$factory_0() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id(receiver);
    }, null);
  }
  function _get_httpClient__2ty1zc_4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nys_1;
    httpClient$factory_10();
    return this_0.t2();
  }
  function Companion_176() {
    this.oys_1 = 'PdfContent';
  }
  var Companion_instance_225;
  function Companion_getInstance_193() {
    return Companion_instance_225;
  }
  function PdfContentViewModel$slambda(this$0, resultContinuation) {
    this.xys_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PdfContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PdfContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PdfContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.xys_1.wqn().i7f().fbq(this.xys_1.kys_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zys_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.zys_1 == null) {
              return Unit_instance;
            } else {
              tmp_1 = this.zys_1;
            }

            tmp_0.ayt_1 = tmp_1;
            this.byt_1 = ensureNotNull(this.ayt_1.pax_1);
            var tmp_2 = this;
            tmp_2.cyt_1 = this.xys_1.m4r();
            var tmp_3 = this;
            tmp_3.dyt_1 = _get_httpClient__2ty1zc_4(this.xys_1);
            var tmp_4 = this;
            tmp_4.eyt_1 = this.byt_1;
            var tmp_5 = this;
            tmp_5.fyt_1 = this.dyt_1;
            var tmp_6 = this;
            tmp_6.gyt_1 = this.fyt_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.eyt_1);
            tmp_7.hyt_1 = this_0;
            this.hyt_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.iyt_1 = this.gyt_1;
            var tmp_9 = this;
            tmp_9.jyt_1 = this.hyt_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.jyt_1, this.iyt_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.kyt_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = bodyAsDecodedText(this.kyt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.lyt_1 = suspendResult;
            var tmp_10 = this;
            var this_1 = this.cyt_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_10.myt_1 = this.cyt_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.lyt_1);
            var tmp_11 = this;
            var tmp1_elvis_lhs = this.ayt_1.nax_1;
            var tmp_12;
            if (tmp1_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_12 = tmp1_elvis_lhs;
            }

            tmp_11.nyt_1 = tmp_12;
            this.oyt_1 = UrlKmp(this.byt_1).np2(this.nyt_1).toString();
            this.pyt_1 = bodyDataUrlForUri(this.myt_1, this.nyt_1);
            l$ret$1: do {
              var this_3 = this.xys_1.lys_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.tyt(this.oyt_1, this.pyt_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 4;
            suspendResult = this.xys_1.wqn().v7d().rau(this.ayt_1.max_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var contentEntry = suspendResult;
            l$ret$3: do {
              var this_4 = this.xys_1.eqn_1;
              while (true) {
                var prevValue_0 = this_4.t2();
                var tmp1_elvis_lhs_0 = contentEntry == null ? null : contentEntry.oav_1;
                var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp1_elvis_lhs_0 == null ? '' : tmp1_elvis_lhs_0);
                if (this_4.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PdfContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PdfContentViewModel$slambda(this.xys_1, completion);
    i.yys_1 = $this$launch;
    return i;
  };
  function PdfContentViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PdfContentViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PdfContentViewModel(di, savedStateHandle) {
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'PdfContent');
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.kys_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.lys_1 = MutableStateFlow(new PdfContentUiState());
    this.mys_1 = asStateFlow(this.lys_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.nys_1 = Instance(di, tmp$ret$0, null).a5d(this, httpClient$factory_9());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.pdfcontent.PdfContentViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, PdfContentViewModel$slambda_0(this, null));
  }
  protoOf(PdfContentViewModel).uyc = function () {
    var tmp0_safe_receiver = this.lys_1.t2().syt_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.pdfcontent.PdfContentViewModel.<get-titleAndLangCode>.<anonymous>' call
      var titleVal = tmp0_safe_receiver.oav_1;
      var langVal = 'en';
      var tmp_0;
      if (!(titleVal == null) ? !(langVal == null) : false) {
        tmp_0 = new TitleAndLangCode(titleVal, langVal);
      } else {
        tmp_0 = null;
      }
      tmp = tmp_0;
    }
    return tmp;
  };
  function PdfContentUiState(pdfUrl, dataUrl, contentEntry) {
    pdfUrl = pdfUrl === VOID ? null : pdfUrl;
    dataUrl = dataUrl === VOID ? null : dataUrl;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    this.qyt_1 = pdfUrl;
    this.ryt_1 = dataUrl;
    this.syt_1 = contentEntry;
  }
  protoOf(PdfContentUiState).uyt = function (pdfUrl, dataUrl, contentEntry) {
    return new PdfContentUiState(pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).tyt = function (pdfUrl, dataUrl, contentEntry, $super) {
    pdfUrl = pdfUrl === VOID ? this.qyt_1 : pdfUrl;
    dataUrl = dataUrl === VOID ? this.ryt_1 : dataUrl;
    contentEntry = contentEntry === VOID ? this.syt_1 : contentEntry;
    return $super === VOID ? this.uyt(pdfUrl, dataUrl, contentEntry) : $super.uyt.call(this, pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).toString = function () {
    return 'PdfContentUiState(pdfUrl=' + this.qyt_1 + ', dataUrl=' + this.ryt_1 + ', contentEntry=' + this.syt_1 + ')';
  };
  protoOf(PdfContentUiState).hashCode = function () {
    var result = this.qyt_1 == null ? 0 : getStringHashCode(this.qyt_1);
    result = imul(result, 31) + (this.ryt_1 == null ? 0 : getStringHashCode(this.ryt_1)) | 0;
    result = imul(result, 31) + (this.syt_1 == null ? 0 : this.syt_1.hashCode()) | 0;
    return result;
  };
  protoOf(PdfContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PdfContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PdfContentUiState ? other : THROW_CCE();
    if (!(this.qyt_1 == tmp0_other_with_cast.qyt_1))
      return false;
    if (!(this.ryt_1 == tmp0_other_with_cast.ryt_1))
      return false;
    if (!equals(this.syt_1, tmp0_other_with_cast.syt_1))
      return false;
    return true;
  };
  function httpClient$factory_9() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function httpClient$factory_10() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function PersonViewModelConstants() {
    this.vyt_1 = 'goToOnPersonSelected';
    this.wyt_1 = 'popUpToOnPersonSelected';
  }
  var PersonViewModelConstants_instance;
  function PersonViewModelConstants_getInstance() {
    return PersonViewModelConstants_instance;
  }
  function PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.fyu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda).iyu = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.iyu(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.gyu_1.n7d().mg4(this.fyu_1.iqt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hyu_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.gyu_1.p7f();
            var tmp_1 = this.fyu_1.sqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ti0(tmp_1, new Long(131072, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var hasResetPermission = suspendResult;
            var tmp_2;
            if (this.hyu_1 == null) {
              tmp_2 = null;
            } else {
              var tmp_3 = this.hyu_1.g96_1 == null ? 1 : hasResetPermission ? 2 : 3;
              var tmp_4 = this.hyu_1.f96_1;
              var tmp0_elvis_lhs = this.hyu_1.g96_1;
              tmp_2 = new PersonUsernameAndPasswordModel(tmp_3, tmp_4, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, '', '');
            }

            return tmp_2;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).yny = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this.fyu_1, completion);
    i.gyu_1 = db;
    return i;
  };
  function PersonAccountEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.iyu(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).ryu = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.ryu($completion);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new PersonAccountEditViewModel$slambda$slambda_1(completion);
  };
  function PersonAccountEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.ryu($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonAccountEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pyv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.byw(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonAccountEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.kyw_1 = this$0;
    this.lyw_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = _get_authManager__mo6de4(this.kyw_1).tnt(this.kyw_1.iqt_1, this.lyw_1.ryw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.kyw_1.wqn().n7d().sg4(this.kyw_1.iqt_1, this.lyw_1.pyw_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var numChanges = suspendResult;
            Napier_getInstance().q5e('Updated username: ' + numChanges + ' changes');
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).yny = function (it, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this.kyw_1, this.lyw_1, completion);
    i.myw_1 = it;
    return i;
  };
  function PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_authManager__mo6de4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ryv_1;
    authManager$factory_0();
    return this_0.t2();
  }
  function _get_setPasswordUseCase__c0ja9b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.syv_1;
    setPasswordUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_177() {
    this.syw_1 = 'AccountEdit';
    this.tyw_1 = 1;
    this.uyw_1 = 2;
    this.vyw_1 = 3;
  }
  var Companion_instance_226;
  function Companion_getInstance_194() {
    return Companion_instance_226;
  }
  function PersonAccountEditViewModel$slambda(this$0, resultContinuation) {
    this.eyx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda).msc = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.eyx_1.iqt_1.equals(this.eyx_1.sqn())) {
              var tmp_0 = this;
              tmp_0.gyx_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.fyx_1.p7f();
              var tmp_2 = this.eyx_1.sqn();
              PermissionFlags_getInstance();
              suspendResult = tmp_1.ti0(tmp_2, new Long(32768, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.gyx_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.gyx_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda).yny = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda(this.eyx_1, completion);
    i.fyx_1 = db;
    return i;
  };
  function PersonAccountEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.msc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda_1(this$0, resultContinuation) {
    this.pyx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_227.n4r();
            var tmp_1 = PersonAccountEditViewModel$slambda$slambda_0(this.pyx_1, null);
            var tmp_2 = PersonAccountEditViewModel$slambda$slambda_2(null);
            suspendResult = this.pyx_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonAccountEditViewModel$slambda$lambda(this.pyx_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.pyx_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.pyx_1.aqo().moj(strings_getInstance().en3_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_3, VOID, PersonAccountEditViewModel$onClickSave$ref(this.pyx_1));
                var tmp1_loadingState = Companion_getInstance_97().uq6_1;
                var nextValue = prevValue.mq6(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.pyx_1.pyv_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.byw(VOID, VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new PersonAccountEditViewModel$slambda_1(this.pyx_1, completion);
    i.qyx_1 = $this$launchIfHasPermission;
    return i;
  };
  function PersonAccountEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.zyx_1 = $commitDelay;
    this.ayy_1 = $entity;
    this.byy_1 = $this;
    this.cyy_1 = $key;
    this.dyy_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.zyx_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ayy_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.byy_1.gqo(this.byy_1.aqn_1, this.cyy_1, this.dyy_1, this.ayy_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonAccountEditViewModel$onEntityChanged$slambda(this.zyx_1, this.ayy_1, this.byy_1, this.cyy_1, this.dyy_1, completion);
    i.eyy_1 = $this$launch;
    return i;
  };
  function PersonAccountEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new PersonAccountEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda($entity, this$0, resultContinuation) {
    this.nyy_1 = $entity;
    this.oyy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            if (this.nyy_1.nyw_1 === 1) {
              var validationResult = this.oyy_1.tyv_1.up9(this.nyy_1.pyw_1);
              this.oyy_1.cqo(Companion_getInstance_97().uq6_1);
              if (!validationResult.equals(Companion_getInstance_74().ppo_1)) {
                l$ret$1: do {
                  var this_0 = this.oyy_1.pyv_1;
                  while (true) {
                    var prevValue = this_0.t2();
                    var tmp0_safe_receiver = validationResult.upo_1;
                    var tmp_0;
                    if (tmp0_safe_receiver == null) {
                      tmp_0 = null;
                    } else {
                      tmp_0 = this.oyy_1.aqo().moj(tmp0_safe_receiver);
                    }
                    var tmp1_usernameError = tmp_0;
                    var nextValue = prevValue.byw(VOID, tmp1_usernameError, VOID, VOID, VOID, true);
                    if (this_0.y1k(prevValue, nextValue)) {
                      break l$ret$1;
                    }
                  }
                }
                 while (false);
                return Unit_instance;
              }
            }

            if (isBlank(this.nyy_1.ryw_1)) {
              l$ret$3: do {
                var this_1 = this.oyy_1.pyv_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.byw(VOID, VOID, VOID, this.oyy_1.aqo().moj(strings_getInstance().vmn_1));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.nyy_1.nyw_1 === 3 ? isBlank(this.nyy_1.qyw_1) : false)
              if (this.oyy_1.pyv_1.t2().ru4()) {
                this.oyy_1.cqo(Companion_getInstance_97().uq6_1);
                l$ret$5: do {
                  var this_2 = this.oyy_1.pyv_1;
                  while (true) {
                    var prevValue_1 = this_2.t2();
                    var nextValue_1 = prevValue_1.byw(VOID, VOID, VOID, VOID, VOID, true);
                    if (this_2.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
                return Unit_instance;
              }

            if (this.nyy_1.nyw_1 === 1) {
              this.hd_1 = 6;
              continue $sm;
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            suspendResult = _get_setPasswordUseCase__c0ja9b(this.oyy_1).loi(this.oyy_1.sqn(), this.nyy_1.oyw_1, this.nyy_1.pyw_1, this.nyy_1.ryw_1, this.nyy_1.nyw_1 === 3 ? this.nyy_1.qyw_1 : null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.oyy_1.yqn().bq7(new Snack(this.oyy_1.aqo().moj(strings_getInstance().knm_1)));
            var tmp_1 = this;
            this.oyy_1.lqt(null);
            tmp_1.ryy_1 = Unit_instance;
            this.id_1 = 14;
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Exception) {
              this.syy_1 = this.kd_1;
              var tmp_3 = this;
              var tmp_4;
              var tmp_5 = this.syy_1;
              if (tmp_5 instanceof UnauthorizedException) {
                l$ret$19: do {
                  var this_3 = this.oyy_1.pyv_1;
                  while (true) {
                    var prevValue_2 = this_3.t2();
                    var nextValue_2 = prevValue_2.byw(VOID, VOID, this.oyy_1.aqo().moj(strings_getInstance().zmi_1));
                    if (this_3.y1k(prevValue_2, nextValue_2)) {
                      break l$ret$19;
                    }
                  }
                }
                 while (false);
                tmp_4 = Unit_instance;
              } else {
                l$ret$21: do {
                  var this_4 = this.oyy_1.pyv_1;
                  while (true) {
                    var prevValue_3 = this_4.t2();
                    var nextValue_3 = prevValue_3.byw(VOID, VOID, VOID, VOID, this.syy_1.message);
                    if (this_4.y1k(prevValue_3, nextValue_3)) {
                      break l$ret$21;
                    }
                  }
                }
                 while (false);
                tmp_4 = Unit_instance;
              }
              tmp_3.ryy_1 = tmp_4;
              this.id_1 = 14;
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 14;
            this.tyy_1 = this.kd_1;
            this.oyy_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$23: do {
              var this_5 = this.oyy_1.pyv_1;
              while (true) {
                var prevValue_4 = this_5.t2();
                var nextValue_4 = prevValue_4.byw(VOID, VOID, VOID, VOID, VOID, true);
                if (this_5.y1k(prevValue_4, nextValue_4)) {
                  break l$ret$23;
                }
              }
            }
             while (false);
            throw this.tyy_1;
          case 5:
            this.id_1 = 14;
            this.oyy_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$25: do {
              var this_6 = this.oyy_1.pyv_1;
              while (true) {
                var prevValue_5 = this_6.t2();
                var nextValue_5 = prevValue_5.byw(VOID, VOID, VOID, VOID, VOID, true);
                if (this_6.y1k(prevValue_5, nextValue_5)) {
                  break l$ret$25;
                }
              }
            }
             while (false);
            this.hd_1 = 13;
            continue $sm;
          case 6:
            this.id_1 = 11;
            this.id_1 = 10;
            this.hd_1 = 7;
            suspendResult = this.oyy_1.wqn().n7d().kg4(this.nyy_1.pyw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.uyy_1 = suspendResult;
            if (this.uyy_1 === 0) {
              this.hd_1 = 8;
              var tmp_6 = this.oyy_1.wqn();
              suspendResult = withDoorTransactionAsync(tmp_6, VOID, PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this.oyy_1, this.nyy_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$7: do {
                var this_7 = this.oyy_1.pyv_1;
                while (true) {
                  var prevValue_6 = this_7.t2();
                  var nextValue_6 = prevValue_6.byw(VOID, this.oyy_1.aqo().moj(strings_getInstance().vn7_1));
                  if (this_7.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.hd_1 = 9;
              continue $sm;
            }

          case 8:
            this.oyy_1.lqt(null);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.qyy_1 = Unit_instance;
            this.id_1 = 14;
            this.hd_1 = 12;
            continue $sm;
          case 10:
            this.id_1 = 11;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Exception) {
              var e = this.kd_1;
              var tmp_8 = this;
              l$ret$11: do {
                var this_8 = this.oyy_1.pyv_1;
                while (true) {
                  var prevValue_7 = this_8.t2();
                  var nextValue_7 = prevValue_7.byw(VOID, this.oyy_1.aqo().moj(strings_getInstance().amj_1));
                  if (this_8.y1k(prevValue_7, nextValue_7)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
              tmp_8.qyy_1 = Unit_instance;
              this.id_1 = 14;
              this.hd_1 = 12;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 11:
            this.id_1 = 14;
            var t = this.kd_1;
            this.oyy_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$13: do {
              var this_9 = this.oyy_1.pyv_1;
              while (true) {
                var prevValue_8 = this_9.t2();
                var nextValue_8 = prevValue_8.byw(VOID, VOID, VOID, VOID, VOID, true);
                if (this_9.y1k(prevValue_8, nextValue_8)) {
                  break l$ret$13;
                }
              }
            }
             while (false);
            throw t;
          case 12:
            this.id_1 = 14;
            this.oyy_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$15: do {
              var this_10 = this.oyy_1.pyv_1;
              while (true) {
                var prevValue_9 = this_10.t2();
                var nextValue_9 = prevValue_9.byw(VOID, VOID, VOID, VOID, VOID, true);
                if (this_10.y1k(prevValue_9, nextValue_9)) {
                  break l$ret$15;
                }
              }
            }
             while (false);
            this.hd_1 = 13;
            continue $sm;
          case 13:
            return Unit_instance;
          case 14:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda(this.nyy_1, this.oyy_1, completion);
    i.pyy_1 = $this$launch;
    return i;
  };
  function PersonAccountEditViewModel$onClickSave$slambda_0($entity, this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda($entity, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'AccountEdit');
    this.pyv_1 = MutableStateFlow(new PersonAccountEditUiState());
    this.qyv_1 = asStateFlow(this.pyv_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.qqn().loa();
    var trigger = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(AuthManager), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.ryv_1 = Instance(this_0, tmp$ret$3, null).a5d(this, authManager$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.qqn().loa();
    var trigger_0 = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_4 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    var tmp$ret$6 = tmp_4.h57(tmp$ret$5, context_0);
    var this_1 = On(this, tmp$ret$6, trigger_0);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SetPasswordUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_3.syv_1 = Instance(this_1, tmp$ret$8, null).a5d(this, setPasswordUseCase$factory());
    this.tyv_1 = new ValidateUsernameUseCase_0();
    this.uyv_1 = new FilterUsernameUseCase();
    this.eqn_1.x1k(new AppUiState(VOID, Companion_getInstance_97().tq6_1));
    var tmp_7 = PersonAccountEditViewModel$slambda_0(this, null);
    this.mqo(tmp_7, VOID, VOID, PersonAccountEditViewModel$slambda_2(this, null));
  }
  protoOf(PersonAccountEditViewModel).vyy = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pyv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onEntityChanged.<anonymous>' call
        var tmp;
        var tmp_0 = entity == null ? null : entity.pyw_1;
        var tmp1_safe_receiver = this.pyv_1.t2().vyv_1;
        if (!(tmp_0 == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pyw_1))) {
          tmp = entity == null ? null : entity.wyy(VOID, VOID, this.uyv_1.tpe(entity.pyw_1, ''));
        } else {
          tmp = entity;
        }
        var tmp_1 = tmp;
        var tmp_2;
        var tmp_3;
        if (!(prevValue.wyv_1 == null)) {
          var tmp3_safe_receiver = prevValue.vyv_1;
          var tmp_4 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.pyw_1;
          tmp_3 = tmp_4 == (entity == null ? null : entity.pyw_1);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.wyv_1;
        } else {
          tmp_2 = null;
        }
        var tmp_5 = tmp_2;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.xyv_1 == null)) {
          var tmp5_safe_receiver = prevValue.vyv_1;
          var tmp_8 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.qyw_1;
          tmp_7 = tmp_8 == (entity == null ? null : entity.qyw_1);
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          tmp_6 = prevValue.xyv_1;
        } else {
          tmp_6 = null;
        }
        var tmp_9 = tmp_6;
        var tmp_10;
        var tmp_11;
        if (!(prevValue.yyv_1 == null)) {
          var tmp7_safe_receiver = prevValue.vyv_1;
          var tmp_12 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.ryw_1;
          tmp_11 = tmp_12 == (entity == null ? null : entity.ryw_1);
        } else {
          tmp_11 = false;
        }
        if (tmp_11) {
          tmp_10 = prevValue.yyv_1;
        } else {
          tmp_10 = null;
        }
        var nextValue = prevValue.byw(tmp_1, tmp_5, tmp_9, tmp_10);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_227.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.hqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_13 = this;
    var tmp_14 = this.rqn();
    tmp_13.hqt_1 = launch(tmp_14, VOID, VOID, PersonAccountEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonAccountEditViewModel).asa = function () {
    if (this.dqo().equals(Companion_getInstance_97().tq6_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.pyv_1.t2().vyv_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    this.cqo(Companion_getInstance_97().tq6_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pyv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.byw(VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, PersonAccountEditViewModel$onClickSave$slambda_0(entity, this, null));
  };
  function PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    personAccount = personAccount === VOID ? new PersonUsernameAndPasswordModel() : personAccount;
    usernameError = usernameError === VOID ? null : usernameError;
    currentPasswordError = currentPasswordError === VOID ? null : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? null : newPasswordError;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.vyv_1 = personAccount;
    this.wyv_1 = usernameError;
    this.xyv_1 = currentPasswordError;
    this.yyv_1 = newPasswordError;
    this.zyv_1 = errorMessage;
    this.ayw_1 = fieldsEnabled;
  }
  protoOf(PersonAccountEditUiState).xyy = function () {
    var tmp0_safe_receiver = this.vyv_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nyw_1) === 1;
  };
  protoOf(PersonAccountEditUiState).yyy = function () {
    var tmp0_safe_receiver = this.vyv_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nyw_1) === 3;
  };
  protoOf(PersonAccountEditUiState).ru4 = function () {
    return (!(this.wyv_1 == null) ? true : !(this.xyv_1 == null)) ? true : !(this.yyv_1 == null);
  };
  protoOf(PersonAccountEditUiState).zyy = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    return new PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).byw = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled, $super) {
    personAccount = personAccount === VOID ? this.vyv_1 : personAccount;
    usernameError = usernameError === VOID ? this.wyv_1 : usernameError;
    currentPasswordError = currentPasswordError === VOID ? this.xyv_1 : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? this.yyv_1 : newPasswordError;
    errorMessage = errorMessage === VOID ? this.zyv_1 : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? this.ayw_1 : fieldsEnabled;
    return $super === VOID ? this.zyy(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) : $super.zyy.call(this, personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).toString = function () {
    return 'PersonAccountEditUiState(personAccount=' + this.vyv_1 + ', usernameError=' + this.wyv_1 + ', currentPasswordError=' + this.xyv_1 + ', newPasswordError=' + this.yyv_1 + ', errorMessage=' + this.zyv_1 + ', fieldsEnabled=' + this.ayw_1 + ')';
  };
  protoOf(PersonAccountEditUiState).hashCode = function () {
    var result = this.vyv_1 == null ? 0 : this.vyv_1.hashCode();
    result = imul(result, 31) + (this.wyv_1 == null ? 0 : getStringHashCode(this.wyv_1)) | 0;
    result = imul(result, 31) + (this.xyv_1 == null ? 0 : getStringHashCode(this.xyv_1)) | 0;
    result = imul(result, 31) + (this.yyv_1 == null ? 0 : getStringHashCode(this.yyv_1)) | 0;
    result = imul(result, 31) + (this.zyv_1 == null ? 0 : getStringHashCode(this.zyv_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ayw_1) | 0;
    return result;
  };
  protoOf(PersonAccountEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonAccountEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonAccountEditUiState ? other : THROW_CCE();
    if (!equals(this.vyv_1, tmp0_other_with_cast.vyv_1))
      return false;
    if (!(this.wyv_1 == tmp0_other_with_cast.wyv_1))
      return false;
    if (!(this.xyv_1 == tmp0_other_with_cast.xyv_1))
      return false;
    if (!(this.yyv_1 == tmp0_other_with_cast.yyv_1))
      return false;
    if (!(this.zyv_1 == tmp0_other_with_cast.zyv_1))
      return false;
    if (!(this.ayw_1 === tmp0_other_with_cast.ayw_1))
      return false;
    return true;
  };
  function Companion_178() {
  }
  protoOf(Companion_178).n4r = function () {
    return $serializer_getInstance_76();
  };
  var Companion_instance_227;
  function Companion_getInstance_195() {
    return Companion_instance_227;
  }
  function $serializer_64() {
    $serializer_instance_64 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.accountedit.PersonUsernameAndPasswordModel', this, 5);
    tmp0_serialDesc.t4f('mode', true);
    tmp0_serialDesc.t4f('personUid', true);
    tmp0_serialDesc.t4f('username', true);
    tmp0_serialDesc.t4f('currentPassword', true);
    tmp0_serialDesc.t4f('newPassword', true);
    this.ayz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_64).q44 = function () {
    return this.ayz_1;
  };
  protoOf($serializer_64).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_64).s44 = function (decoder) {
    var tmp0_desc = this.ayz_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.i48(tmp0_desc);
    if (tmp9_input.x48()) {
      tmp4_local0 = tmp9_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.s48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.s48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.j48(tmp0_desc);
    return PersonUsernameAndPasswordModel_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_64).byz = function (encoder, value) {
    var tmp0_desc = this.ayz_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.nyw_1 === 1)) {
      tmp1_output.r49(tmp0_desc, 0, value.nyw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !value.oyw_1.equals(new Long(0, 0))) {
      tmp1_output.s49(tmp0_desc, 1, value.oyw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.pyw_1 === '')) {
      tmp1_output.w49(tmp0_desc, 2, value.pyw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.qyw_1 === '')) {
      tmp1_output.w49(tmp0_desc, 3, value.qyw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.ryw_1 === '')) {
      tmp1_output.w49(tmp0_desc, 4, value.ryw_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_64).r44 = function (encoder, value) {
    return this.byz(encoder, value instanceof PersonUsernameAndPasswordModel ? value : THROW_CCE());
  };
  var $serializer_instance_64;
  function $serializer_getInstance_76() {
    if ($serializer_instance_64 == null)
      new $serializer_64();
    return $serializer_instance_64;
  }
  function PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_76().ayz_1);
    }
    if (0 === (seen1 & 1))
      $this.nyw_1 = 1;
    else
      $this.nyw_1 = mode;
    if (0 === (seen1 & 2))
      $this.oyw_1 = new Long(0, 0);
    else
      $this.oyw_1 = personUid;
    if (0 === (seen1 & 4))
      $this.pyw_1 = '';
    else
      $this.pyw_1 = username;
    if (0 === (seen1 & 8))
      $this.qyw_1 = '';
    else
      $this.qyw_1 = currentPassword;
    if (0 === (seen1 & 16))
      $this.ryw_1 = '';
    else
      $this.ryw_1 = newPassword;
    return $this;
  }
  function PersonUsernameAndPasswordModel_init_$Create$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker) {
    return PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, objectCreate(protoOf(PersonUsernameAndPasswordModel)));
  }
  function PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword) {
    mode = mode === VOID ? 1 : mode;
    personUid = personUid === VOID ? new Long(0, 0) : personUid;
    username = username === VOID ? '' : username;
    currentPassword = currentPassword === VOID ? '' : currentPassword;
    newPassword = newPassword === VOID ? '' : newPassword;
    this.nyw_1 = mode;
    this.oyw_1 = personUid;
    this.pyw_1 = username;
    this.qyw_1 = currentPassword;
    this.ryw_1 = newPassword;
  }
  protoOf(PersonUsernameAndPasswordModel).cyz = function (mode, personUid, username, currentPassword, newPassword) {
    return new PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).wyy = function (mode, personUid, username, currentPassword, newPassword, $super) {
    mode = mode === VOID ? this.nyw_1 : mode;
    personUid = personUid === VOID ? this.oyw_1 : personUid;
    username = username === VOID ? this.pyw_1 : username;
    currentPassword = currentPassword === VOID ? this.qyw_1 : currentPassword;
    newPassword = newPassword === VOID ? this.ryw_1 : newPassword;
    return $super === VOID ? this.cyz(mode, personUid, username, currentPassword, newPassword) : $super.cyz.call(this, mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).toString = function () {
    return 'PersonUsernameAndPasswordModel(mode=' + this.nyw_1 + ', personUid=' + this.oyw_1.toString() + ', username=' + this.pyw_1 + ', currentPassword=' + this.qyw_1 + ', newPassword=' + this.ryw_1 + ')';
  };
  protoOf(PersonUsernameAndPasswordModel).hashCode = function () {
    var result = this.nyw_1;
    result = imul(result, 31) + this.oyw_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.pyw_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.qyw_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ryw_1) | 0;
    return result;
  };
  protoOf(PersonUsernameAndPasswordModel).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonUsernameAndPasswordModel))
      return false;
    var tmp0_other_with_cast = other instanceof PersonUsernameAndPasswordModel ? other : THROW_CCE();
    if (!(this.nyw_1 === tmp0_other_with_cast.nyw_1))
      return false;
    if (!this.oyw_1.equals(tmp0_other_with_cast.oyw_1))
      return false;
    if (!(this.pyw_1 === tmp0_other_with_cast.pyw_1))
      return false;
    if (!(this.qyw_1 === tmp0_other_with_cast.qyw_1))
      return false;
    if (!(this.ryw_1 === tmp0_other_with_cast.ryw_1))
      return false;
    return true;
  };
  function authManager$factory() {
    return getPropertyCallableRef('authManager', 1, KProperty1, function (receiver) {
      return _get_authManager__mo6de4(receiver);
    }, null);
  }
  function setPasswordUseCase$factory() {
    return getPropertyCallableRef('setPasswordUseCase', 1, KProperty1, function (receiver) {
      return _get_setPasswordUseCase__c0ja9b(receiver);
    }, null);
  }
  function authManager$factory_0() {
    return getPropertyCallableRef('authManager', 1, KProperty1, function (receiver) {
      return _get_authManager__mo6de4(receiver);
    }, null);
  }
  function setPasswordUseCase$factory_0() {
    return getPropertyCallableRef('setPasswordUseCase', 1, KProperty1, function (receiver) {
      return _get_setPasswordUseCase__c0ja9b(receiver);
    }, null);
  }
  function BulkAddPersonRunImportViewModel$slambda$lambda(this$0) {
    return function (numImported, totalRecords) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.yyz_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.hz0(VOID, totalRecords, numImported);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_bulkAddFromUriUseCase__ahhheb($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bz0_1;
    bulkAddFromUriUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_179() {
    this.iz0_1 = 'BulkAddPersonRunImport';
    this.jz0_1 = 'uri';
  }
  var Companion_instance_228;
  function Companion_getInstance_196() {
    return Companion_instance_228;
  }
  function sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(function_0) {
    this.kz0_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0).lz0 = function (numImported, totalRecords) {
    return this.kz0_1(numImported, totalRecords);
  };
  function BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation) {
    this.uz0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonRunImportViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_bulkAddFromUriUseCase__ahhheb(this.uz0_1);
            var tmp_1 = Companion_getInstance_3().o2r(this.uz0_1.az0_1);
            var tmp_2 = this.uz0_1.sqn();
            var tmp_3 = BulkAddPersonRunImportViewModel$slambda$lambda(this.uz0_1);
            suspendResult = tmp_0.spl(tmp_1, tmp_2, new sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            l$ret$1: do {
              var this_0 = this.uz0_1.yyz_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.hz0(false, VOID, result.vpl_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().q5e('Exception running import', e);
              l$ret$3: do {
                var this_1 = this.uz0_1.yyz_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var tmp0_safe_receiver = e instanceof BulkAddPersonException ? e : null;
                  var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.mpl_1;
                  var nextValue_0 = prevValue_0.hz0(false, VOID, VOID, tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, e.message);
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new BulkAddPersonRunImportViewModel$slambda(this.uz0_1, completion);
    i.vz0_1 = $this$launch;
    return i;
  };
  function BulkAddPersonRunImportViewModel$slambda_0(this$0, resultContinuation) {
    var i = new BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonRunImportViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'BulkAddPersonRunImport');
    this.yyz_1 = MutableStateFlow(new BulkAddPersonRunImportUiState());
    this.zyz_1 = asStateFlow(this.yyz_1);
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('uri');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No fileUri');
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.az0_1 = tmp_0;
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(BulkAddPersonsFromLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.bz0_1 = Instance(this_0, tmp$ret$0, null).a5d(this, bulkAddFromUriUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().ono_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.rqn();
    launch(tmp_3, VOID, VOID, BulkAddPersonRunImportViewModel$slambda_0(this, null));
  }
  function Companion_180() {
    Companion_instance_229 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.wz0_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance_54()), null];
  }
  var Companion_instance_229;
  function Companion_getInstance_197() {
    if (Companion_instance_229 == null)
      new Companion_180();
    return Companion_instance_229;
  }
  function $serializer_65() {
    $serializer_instance_65 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportUiState', this, 5);
    tmp0_serialDesc.t4f('inProgress', true);
    tmp0_serialDesc.t4f('totalRecords', true);
    tmp0_serialDesc.t4f('numImported', true);
    tmp0_serialDesc.t4f('errors', true);
    tmp0_serialDesc.t4f('errorMessage', true);
    this.xz0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_65).q44 = function () {
    return this.xz0_1;
  };
  protoOf($serializer_65).k4g = function () {
    var tmp0_cached = Companion_getInstance_197().wz0_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), IntSerializer_getInstance(), IntSerializer_getInstance(), tmp0_cached[3], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_65).s44 = function (decoder) {
    var tmp0_desc = this.xz0_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = 0;
    var tmp6_local2 = 0;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.i48(tmp0_desc);
    var tmp10_cached = Companion_getInstance_197().wz0_1;
    if (tmp9_input.x48()) {
      tmp4_local0 = tmp9_input.k48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.n48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.n48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.k48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.n48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.n48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.j48(tmp0_desc);
    return BulkAddPersonRunImportUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_65).yz0 = function (encoder, value) {
    var tmp0_desc = this.xz0_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_197().wz0_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.cz0_1 === true)) {
      tmp1_output.o49(tmp0_desc, 0, value.cz0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.dz0_1 === 0)) {
      tmp1_output.r49(tmp0_desc, 1, value.dz0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.ez0_1 === 0)) {
      tmp1_output.r49(tmp0_desc, 2, value.ez0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !equals(value.fz0_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 3, tmp2_cached[3], value.fz0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.gz0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.gz0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_65).r44 = function (encoder, value) {
    return this.yz0(encoder, value instanceof BulkAddPersonRunImportUiState ? value : THROW_CCE());
  };
  var $serializer_instance_65;
  function $serializer_getInstance_77() {
    if ($serializer_instance_65 == null)
      new $serializer_65();
    return $serializer_instance_65;
  }
  function BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_77().xz0_1);
    }
    if (0 === (seen1 & 1))
      $this.cz0_1 = true;
    else
      $this.cz0_1 = inProgress;
    if (0 === (seen1 & 2))
      $this.dz0_1 = 0;
    else
      $this.dz0_1 = totalRecords;
    if (0 === (seen1 & 4))
      $this.ez0_1 = 0;
    else
      $this.ez0_1 = numImported;
    if (0 === (seen1 & 8))
      $this.fz0_1 = emptyList();
    else
      $this.fz0_1 = errors;
    if (0 === (seen1 & 16))
      $this.gz0_1 = null;
    else
      $this.gz0_1 = errorMessage;
    return $this;
  }
  function BulkAddPersonRunImportUiState_init_$Create$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker) {
    return BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, objectCreate(protoOf(BulkAddPersonRunImportUiState)));
  }
  function BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage) {
    Companion_getInstance_197();
    inProgress = inProgress === VOID ? true : inProgress;
    totalRecords = totalRecords === VOID ? 0 : totalRecords;
    numImported = numImported === VOID ? 0 : numImported;
    errors = errors === VOID ? emptyList() : errors;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.cz0_1 = inProgress;
    this.dz0_1 = totalRecords;
    this.ez0_1 = numImported;
    this.fz0_1 = errors;
    this.gz0_1 = errorMessage;
  }
  protoOf(BulkAddPersonRunImportUiState).ru4 = function () {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.fz0_1.c1()) {
      tmp = true;
    } else {
      tmp = !(this.gz0_1 == null);
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).qp3 = function () {
    var tmp;
    if (this.dz0_1 > 0) {
      tmp = this.ez0_1 / this.dz0_1;
    } else {
      tmp = 0.0;
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).zz0 = function (inProgress, totalRecords, numImported, errors, errorMessage) {
    return new BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).hz0 = function (inProgress, totalRecords, numImported, errors, errorMessage, $super) {
    inProgress = inProgress === VOID ? this.cz0_1 : inProgress;
    totalRecords = totalRecords === VOID ? this.dz0_1 : totalRecords;
    numImported = numImported === VOID ? this.ez0_1 : numImported;
    errors = errors === VOID ? this.fz0_1 : errors;
    errorMessage = errorMessage === VOID ? this.gz0_1 : errorMessage;
    return $super === VOID ? this.zz0(inProgress, totalRecords, numImported, errors, errorMessage) : $super.zz0.call(this, inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).toString = function () {
    return 'BulkAddPersonRunImportUiState(inProgress=' + this.cz0_1 + ', totalRecords=' + this.dz0_1 + ', numImported=' + this.ez0_1 + ', errors=' + this.fz0_1 + ', errorMessage=' + this.gz0_1 + ')';
  };
  protoOf(BulkAddPersonRunImportUiState).hashCode = function () {
    var result = getBooleanHashCode(this.cz0_1);
    result = imul(result, 31) + this.dz0_1 | 0;
    result = imul(result, 31) + this.ez0_1 | 0;
    result = imul(result, 31) + hashCode(this.fz0_1) | 0;
    result = imul(result, 31) + (this.gz0_1 == null ? 0 : getStringHashCode(this.gz0_1)) | 0;
    return result;
  };
  protoOf(BulkAddPersonRunImportUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonRunImportUiState))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonRunImportUiState ? other : THROW_CCE();
    if (!(this.cz0_1 === tmp0_other_with_cast.cz0_1))
      return false;
    if (!(this.dz0_1 === tmp0_other_with_cast.dz0_1))
      return false;
    if (!(this.ez0_1 === tmp0_other_with_cast.ez0_1))
      return false;
    if (!equals(this.fz0_1, tmp0_other_with_cast.fz0_1))
      return false;
    if (!(this.gz0_1 == tmp0_other_with_cast.gz0_1))
      return false;
    return true;
  };
  function bulkAddFromUriUseCase$factory() {
    return getPropertyCallableRef('bulkAddFromUriUseCase', 1, KProperty1, function (receiver) {
      return _get_bulkAddFromUriUseCase__ahhheb(receiver);
    }, null);
  }
  function bulkAddFromUriUseCase$factory_0() {
    return getPropertyCallableRef('bulkAddFromUriUseCase', 1, KProperty1, function (receiver) {
      return _get_bulkAddFromUriUseCase__ahhheb(receiver);
    }, null);
  }
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda$lambda(it) {
    return Unit_instance;
  }
  function _get_openBlobUiUseCase__fzusqz_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xz1_1;
    openBlobUiUseCase$factory_4();
    return this_0.t2();
  }
  function Companion_181() {
    this.yz1_1 = 'BulkAddPersonSelectFile';
  }
  var Companion_instance_230;
  function Companion_getInstance_198() {
    return Companion_instance_230;
  }
  function BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation) {
    this.hz2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda).msc = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.iz2_1.p7f();
            var tmp_1 = this.hz2_1.sqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            suspendResult = tmp_0.wi0(tmp_1, tmp_2, new Long(8192, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            return it.hdn_1 ? it.idn_1 : false;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).yny = function (db, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this.hz2_1, completion);
    i.iz2_1 = db;
    return i;
  };
  function BulkAddPersonSelectFileViewModel$slambda_0(this$0, resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.msc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.vz1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nz2(VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function BulkAddPersonSelectFileViewModel$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda_1(completion);
    i.wz2_1 = $this$launchIfHasPermission;
    return i;
  };
  function BulkAddPersonSelectFileViewModel$slambda_2(resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$slambda_1(resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this$0, $templatePath, resultContinuation) {
    this.fz3_1 = this$0;
    this.gz3_1 = $templatePath;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_openBlobUiUseCase__fzusqz_1(this.fz3_1);
            var tmp_1 = new OpenBlobItem(this.gz3_1, 'text/csv', 'bulk-add-persons-template.csv', new Long(186, 0));
            suspendResult = tmp_0.sop(tmp_1, BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda$lambda, OpenBlobIntent_SEND_getInstance(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Error) {
              var e = this.kd_1;
              printStackTrace(e);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).v1m = function ($this$launch, completion) {
    var i = new BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this.fz3_1, this.gz3_1, completion);
    i.hz3_1 = $this$launch;
    return i;
  };
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda_0(this$0, $templatePath, resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this$0, $templatePath, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'BulkAddPersonSelectFile');
    this.vz1_1 = MutableStateFlow(new BulkAddPersonSelectFileUiState());
    this.wz1_1 = asStateFlow(this.vz1_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.xz1_1 = Instance(this_0, tmp$ret$0, null).a5d(this, openBlobUiUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().ono_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = BulkAddPersonSelectFileViewModel$slambda_0(this, null);
    var tmp_2 = BulkAddPersonSelectFileViewModel$lambda(this);
    this.lqo(tmp_1, true, tmp_2, BulkAddPersonSelectFileViewModel$slambda_2(null));
  }
  protoOf(BulkAddPersonSelectFileViewModel).iz3 = function (uri, name) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vz1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.onFileSelected.<anonymous>' call
        var nextValue = prevValue.nz2(uri, name);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(BulkAddPersonSelectFileViewModel).jz3 = function () {
    var tmp0_elvis_lhs = this.vz1_1.t2().jz2_1;
    this.cqn_1.rp6('BulkAddPersonRunImport', mapOf_0(to('uri', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
  };
  protoOf(BulkAddPersonSelectFileViewModel).kz3 = function () {
    var templatePath = this.qqn().loa().wnt_1 + 'staticfiles/bulkaddpersons/bulk-add-persons-template.csv';
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda_0(this, templatePath, null));
  };
  function BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    selectedFileUri = selectedFileUri === VOID ? null : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? null : selectedFileName;
    fileSelectError = fileSelectError === VOID ? null : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.jz2_1 = selectedFileUri;
    this.kz2_1 = selectedFileName;
    this.lz2_1 = fileSelectError;
    this.mz2_1 = fieldsEnabled;
  }
  protoOf(BulkAddPersonSelectFileUiState).lz3 = function () {
    return !(this.jz2_1 == null) ? this.mz2_1 : false;
  };
  protoOf(BulkAddPersonSelectFileUiState).mz3 = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    return new BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).nz2 = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled, $super) {
    selectedFileUri = selectedFileUri === VOID ? this.jz2_1 : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? this.kz2_1 : selectedFileName;
    fileSelectError = fileSelectError === VOID ? this.lz2_1 : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? this.mz2_1 : fieldsEnabled;
    return $super === VOID ? this.mz3(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) : $super.mz3.call(this, selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).toString = function () {
    return 'BulkAddPersonSelectFileUiState(selectedFileUri=' + this.jz2_1 + ', selectedFileName=' + this.kz2_1 + ', fileSelectError=' + this.lz2_1 + ', fieldsEnabled=' + this.mz2_1 + ')';
  };
  protoOf(BulkAddPersonSelectFileUiState).hashCode = function () {
    var result = this.jz2_1 == null ? 0 : getStringHashCode(this.jz2_1);
    result = imul(result, 31) + (this.kz2_1 == null ? 0 : getStringHashCode(this.kz2_1)) | 0;
    result = imul(result, 31) + (this.lz2_1 == null ? 0 : getStringHashCode(this.lz2_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mz2_1) | 0;
    return result;
  };
  protoOf(BulkAddPersonSelectFileUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonSelectFileUiState))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonSelectFileUiState ? other : THROW_CCE();
    if (!(this.jz2_1 == tmp0_other_with_cast.jz2_1))
      return false;
    if (!(this.kz2_1 == tmp0_other_with_cast.kz2_1))
      return false;
    if (!(this.lz2_1 == tmp0_other_with_cast.lz2_1))
      return false;
    if (!(this.mz2_1 === tmp0_other_with_cast.mz2_1))
      return false;
    return true;
  };
  function openBlobUiUseCase$factory_3() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_1(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_4() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_1(receiver);
    }, null);
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda$lambda($childProfileResult) {
    return function (it) {
      return it.f96_1.equals($childProfileResult.f96_1);
    };
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).wz3 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wz3(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).yny = function (it, completion) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda(completion);
    i.vz3_1 = it;
    return i;
  };
  function AddChildProfilesViewModel$slambda$slambda$slambda_0(resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.wz3(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).fz4 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.fz4($completion);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).l78 = function (completion) {
    return new AddChildProfilesViewModel$slambda$slambda$slambda_1(completion);
  };
  function AddChildProfilesViewModel$slambda$slambda$slambda_2(resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.fz4($completion);
    };
    l.$arity = 0;
    return l;
  }
  function AddChildProfilesViewModel$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.dz5_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mz5(VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.vz5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).qqa = function (result, $completion) {
    var tmp = this.rqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.wz5_1.xq9_1;
            var tmp0_elvis_lhs = tmp_1 instanceof Person ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.xz5_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.vz5_1.dz5_1.t2().iz5_1;
            tmp_3.yz5_1 = replaceOrAppend(tmp_4, this.xz5_1, AddChildProfilesViewModel$slambda$slambda$slambda$lambda(this.xz5_1));
            this.hd_1 = 1;
            suspendResult = updateChildProfileList(this.vz5_1, this.yz5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).rqa = function (result, completion) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda_3(this.vz5_1, completion);
    i.wz5_1 = result;
    return i;
  };
  function AddChildProfilesViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.qqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$slambda$slambda(this$0, resultContinuation) {
    this.hz6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda).u1m = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_instance_3.n4r());
            var tmp_1 = listOf_0('persons');
            var tmp_2 = AddChildProfilesViewModel$slambda$slambda$slambda_0(null);
            var tmp_3 = AddChildProfilesViewModel$slambda$slambda$slambda_2(null);
            suspendResult = this.hz6_1.kqo(tmp_0, tmp_1, VOID, tmp_2, tmp_3, AddChildProfilesViewModel$slambda$slambda$lambda(this.hz6_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_4 = this.hz6_1.eqo(this.hz6_1.xqn(), 'person');
            var tmp_5 = AddChildProfilesViewModel$slambda$slambda$slambda_4(this.hz6_1, null);
            suspendResult = tmp_4.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_5), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new AddChildProfilesViewModel$slambda$slambda(this.hz6_1, completion);
    i.iz6_1 = $this$async;
    return i;
  };
  function AddChildProfilesViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.u1m($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function updateChildProfileList($this, newChildProfileList, $completion) {
    var tmp = new $updateChildProfileListCOROUTINE$77($this, newChildProfileList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_182() {
    this.uz6_1 = 'AddChildProfile';
    this.vz6_1 = 'person';
    this.wz6_1 = 'persons';
  }
  var Companion_instance_231;
  function Companion_getInstance_199() {
    return Companion_instance_231;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_33(function_0) {
    this.xz6_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_33).t1d = function (value, $completion) {
    return this.xz6_1(value, $completion);
  };
  function AddChildProfilesViewModel$onClickFinish$ref($boundThis) {
    var l = function () {
      $boundThis.yz6();
      return Unit_instance;
    };
    l.callableName = 'onClickFinish';
    return l;
  }
  function AddChildProfilesViewModel$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda).msc = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return true;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda).yny = function (it, completion) {
    var i = new AddChildProfilesViewModel$slambda(completion);
    i.hz7_1 = it;
    return i;
  };
  function AddChildProfilesViewModel$slambda_0(resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.msc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$slambda_1(this$0, resultContinuation) {
    this.qz7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          async(this.rz7_1, VOID, VOID, AddChildProfilesViewModel$slambda$slambda_0(this.qz7_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new AddChildProfilesViewModel$slambda_1(this.qz7_1, completion);
    i.rz7_1 = $this$launchIfHasPermission;
    return i;
  };
  function AddChildProfilesViewModel$slambda_2(this$0, resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$updateChildProfileList$slambda(this$0, $newChildProfileList, resultContinuation) {
    this.az8_1 = this$0;
    this.bz8_1 = $newChildProfileList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).nr0 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).he = function (p1, $completion) {
    return this.nr0((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.az8_1.m4r().r45(ListSerializer(Companion_instance_3.n4r()), this.bz8_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).v1m = function ($this$withContext, completion) {
    var i = new AddChildProfilesViewModel$updateChildProfileList$slambda(this.az8_1, this.bz8_1, completion);
    i.cz8_1 = $this$withContext;
    return i;
  };
  function AddChildProfilesViewModel$updateChildProfileList$slambda_0(this$0, $newChildProfileList, resultContinuation) {
    var i = new AddChildProfilesViewModel$updateChildProfileList$slambda(this$0, $newChildProfileList, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.nr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$onClickDeleteChildProfile$slambda(this$0, $person, resultContinuation) {
    this.lz8_1 = this$0;
    this.mz8_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.lz8_1.dz5_1.t2().iz5_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (!element.f96_1.equals(this.mz8_1.f96_1)) {
                destination.i1(element);
              }
            }

            suspendResult = updateChildProfileList(this.lz8_1, destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).v1m = function ($this$launch, completion) {
    var i = new AddChildProfilesViewModel$onClickDeleteChildProfile$slambda(this.lz8_1, this.mz8_1, completion);
    i.nz8_1 = $this$launch;
    return i;
  };
  function AddChildProfilesViewModel$onClickDeleteChildProfile$slambda_0(this$0, $person, resultContinuation) {
    var i = new AddChildProfilesViewModel$onClickDeleteChildProfile$slambda(this$0, $person, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$onProfileSelected$slambda(this$0, $profile, resultContinuation) {
    this.wz8_1 = this$0;
    this.xz8_1 = $profile;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 10;
            this.zz8_1 = new UstadGoOptions(VOID, VOID, true);
            if (!this.wz8_1.dz5_1.t2().iz5_1.c1()) {
              var tmp_0 = this;
              var tmp0_elvis_lhs = this.wz8_1.vqn();
              tmp_0.az9_1 = tmp0_elvis_lhs == null ? this.wz8_1.uqn() : tmp0_elvis_lhs;
              this.hd_1 = 1;
              suspendResult = this.az9_1.n7d().jg4(this.wz8_1.dz5_1.t2().iz5_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 7;
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            var this_0 = this.wz8_1.dz5_1.t2().iz5_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              var tmp0_ppjMinorPersonUid = item.f96_1;
              var tmp1_ppjParentPersonUid = this.wz8_1.qqn().joa().vky_1;
              var tmp3_ppjApprovalTiemstamp = systemTimeInMillis();
              destination.i1(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, tmp1_ppjParentPersonUid, tmp0_ppjMinorPersonUid, VOID, VOID, VOID, VOID, 1, tmp3_ppjApprovalTiemstamp));
            }

            tmp_1.bz9_1 = destination;
            var tmp_2 = this;
            tmp_2.cz9_1 = this.wz8_1.dz5_1.t2().iz5_1;
            this.dz9_1 = this.cz9_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.dz9_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.ez9_1 = this.dz9_1.e();
            var tmp_3 = this;
            tmp_3.fz9_1 = this.ez9_1;
            if (!this.fz9_1.equals(this.xz8_1)) {
              this.hd_1 = 3;
              suspendResult = this.wz8_1.qqn().wo2(this.fz9_1, this.wz8_1.qqn().loa().wnt_1, null, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.hd_1 = 2;
            continue $sm;
          case 5:
            this.hd_1 = 6;
            suspendResult = this.az9_1.x7e().tgs(this.bz9_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            if (!this.xz8_1.equals(this.wz8_1.qqn().uo9().onu_1)) {
              this.hd_1 = 8;
              suspendResult = this.wz8_1.qqn().wo2(this.xz8_1, this.wz8_1.qqn().loa().wnt_1, null, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 9;
              continue $sm;
            }

          case 8:
            var sessionWithPersonAndLearningSpace = suspendResult;
            this.wz8_1.qqn().onx(sessionWithPersonAndLearningSpace);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.wz8_1.mqu(this.wz8_1.cqn_1, appendSelectedAccount(this.wz8_1.ez5_1, this.xz8_1.f96_1, new LearningSpace(this.wz8_1.qqn().loa().wnt_1)), this.zz8_1);
            return Unit_instance;
          case 10:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 10) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).v1m = function ($this$launch, completion) {
    var i = new AddChildProfilesViewModel$onProfileSelected$slambda(this.wz8_1, this.xz8_1, completion);
    i.yz8_1 = $this$launch;
    return i;
  };
  function AddChildProfilesViewModel$onProfileSelected$slambda_0(this$0, $profile, resultContinuation) {
    var i = new AddChildProfilesViewModel$onProfileSelected$slambda(this$0, $profile, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $updateChildProfileListCOROUTINE$77(_this__u8e3s4, newChildProfileList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.rz6_1 = _this__u8e3s4;
    this.sz6_1 = newChildProfileList;
  }
  protoOf($updateChildProfileListCOROUTINE$77).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            l$ret$1: do {
              var this_0 = this.rz6_1.dz5_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mz5(VOID, this.sz6_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.tz6_1 = this.rz6_1.aqn_1;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, AddChildProfilesViewModel$updateChildProfileList$slambda_0(this.rz6_1, this.sz6_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.tz6_1.dqj('persons', ARGUMENT);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function AddChildProfilesViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'AddChildProfile');
    this.dz5_1 = MutableStateFlow(new AddChildProfilesUiState());
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_140();
      tmp_0 = 'CourseListHome';
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.ez5_1 = tmp_0;
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.fz5_1 = Instance(this_0, tmp$ret$0, null).a5d(this, repo$factory());
    this.gz5_1 = asStateFlow(this.dz5_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.dz5_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.<anonymous>' call
        var nextValue = prevValue.mz5(VOID, VOID, VOID, VOID, this.qqn().uo9().onu_1);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.<anonymous>' call
        var tmp0_title = this.aqo().moj(strings_getInstance().wnp_1);
        var tmp_3 = this.aqo().moj(strings_getInstance().ynp_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp_3, VOID, AddChildProfilesViewModel$onClickFinish$ref(this));
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp0_title, false, true, VOID, false, VOID, tmp1_actionBarButtonState);
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_4 = AddChildProfilesViewModel$slambda_0(null);
    this.mqo(tmp_4, VOID, VOID, AddChildProfilesViewModel$slambda_2(this, null));
  }
  protoOf(AddChildProfilesViewModel).gz9 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.fz5_1;
    repo$factory_0();
    return this_0.t2();
  };
  protoOf(AddChildProfilesViewModel).yz6 = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.dz5_1.t2().iz5_1.c1()) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.dz5_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onClickFinish.<anonymous>' call
          var nextValue = prevValue.mz5(VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      this.hz9(this.qqn().joa().dkz());
    }
  };
  protoOf(AddChildProfilesViewModel).iz9 = function () {
    var tmp0_nextViewName = 'EditChildProfile';
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onClickAddChileProfile.<anonymous>' call
    Companion_getInstance_115();
    this.aqn_1.ba('entity');
    var tmp2_args = this_0.f3();
    var tmp3_serializer = Companion_instance_3.n4r();
    this.iqo(tmp0_nextViewName, 'person', null, tmp3_serializer, tmp2_args);
  };
  protoOf(AddChildProfilesViewModel).jz9 = function (person) {
    var tmp0_nextViewName = 'EditChildProfile';
    var tmp2_serializer = Companion_instance_3.n4r();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onClickEditChileProfile.<anonymous>' call
    Companion_getInstance_115();
    this.aqn_1.ba('entity');
    var tmp3_args = this_0.f3();
    this.iqo(tmp0_nextViewName, 'person', person, tmp2_serializer, tmp3_args);
  };
  protoOf(AddChildProfilesViewModel).kz9 = function (person) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, AddChildProfilesViewModel$onClickDeleteChildProfile$slambda_0(this, person, null));
  };
  protoOf(AddChildProfilesViewModel).lz9 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.dz5_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onDismissLangDialog.<anonymous>' call
        var nextValue = prevValue.mz5(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(AddChildProfilesViewModel).hz9 = function (profile) {
    var tmp = this.rqn();
    launch(tmp, VOID, VOID, AddChildProfilesViewModel$onProfileSelected$slambda_0(this, profile, null));
  };
  function AddChildProfilesUiState(onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent) {
    onAddChildProfile = onAddChildProfile === VOID ? null : onAddChildProfile;
    childProfiles = childProfiles === VOID ? emptyList() : childProfiles;
    personParenJoinList = personParenJoinList === VOID ? emptyList() : personParenJoinList;
    showProfileSelectionDialog = showProfileSelectionDialog === VOID ? false : showProfileSelectionDialog;
    parent = parent === VOID ? null : parent;
    this.hz5_1 = onAddChildProfile;
    this.iz5_1 = childProfiles;
    this.jz5_1 = personParenJoinList;
    this.kz5_1 = showProfileSelectionDialog;
    this.lz5_1 = parent;
  }
  protoOf(AddChildProfilesUiState).mz9 = function () {
    var tmp0_safe_receiver = this.lz5_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesUiState.<get-personAndChildrenList>.<anonymous>' call
      tmp = listOf_0(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp;
    return plus(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, this.iz5_1);
  };
  protoOf(AddChildProfilesUiState).nz9 = function (onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent) {
    return new AddChildProfilesUiState(onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent);
  };
  protoOf(AddChildProfilesUiState).mz5 = function (onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent, $super) {
    onAddChildProfile = onAddChildProfile === VOID ? this.hz5_1 : onAddChildProfile;
    childProfiles = childProfiles === VOID ? this.iz5_1 : childProfiles;
    personParenJoinList = personParenJoinList === VOID ? this.jz5_1 : personParenJoinList;
    showProfileSelectionDialog = showProfileSelectionDialog === VOID ? this.kz5_1 : showProfileSelectionDialog;
    parent = parent === VOID ? this.lz5_1 : parent;
    return $super === VOID ? this.nz9(onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent) : $super.nz9.call(this, onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent);
  };
  protoOf(AddChildProfilesUiState).toString = function () {
    return 'AddChildProfilesUiState(onAddChildProfile=' + this.hz5_1 + ', childProfiles=' + this.iz5_1 + ', personParenJoinList=' + this.jz5_1 + ', showProfileSelectionDialog=' + this.kz5_1 + ', parent=' + this.lz5_1 + ')';
  };
  protoOf(AddChildProfilesUiState).hashCode = function () {
    var result = this.hz5_1 == null ? 0 : getStringHashCode(this.hz5_1);
    result = imul(result, 31) + hashCode(this.iz5_1) | 0;
    result = imul(result, 31) + hashCode(this.jz5_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kz5_1) | 0;
    result = imul(result, 31) + (this.lz5_1 == null ? 0 : this.lz5_1.hashCode()) | 0;
    return result;
  };
  protoOf(AddChildProfilesUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AddChildProfilesUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AddChildProfilesUiState ? other : THROW_CCE();
    if (!(this.hz5_1 == tmp0_other_with_cast.hz5_1))
      return false;
    if (!equals(this.iz5_1, tmp0_other_with_cast.iz5_1))
      return false;
    if (!equals(this.jz5_1, tmp0_other_with_cast.jz5_1))
      return false;
    if (!(this.kz5_1 === tmp0_other_with_cast.kz5_1))
      return false;
    if (!equals(this.lz5_1, tmp0_other_with_cast.lz5_1))
      return false;
    return true;
  };
  function repo$factory() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return receiver.gz9();
    }, null);
  }
  function repo$factory_0() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return receiver.gz9();
    }, null);
  }
  function EditChildProfileViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda$slambda).xz9 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EditChildProfileViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.xz9(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(EditChildProfileViewModel$slambda$slambda).yny = function (it, completion) {
    var i = new EditChildProfileViewModel$slambda$slambda(completion);
    i.wz9_1 = it;
    return i;
  };
  function EditChildProfileViewModel$slambda$slambda_0(resultContinuation) {
    var i = new EditChildProfileViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.xz9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EditChildProfileViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.gza_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda$slambda_1).hza = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EditChildProfileViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.hza($completion);
  };
  protoOf(EditChildProfileViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = get_doorPrimaryKeyManager(this.gza_1.uqn());
            suspendResult = tmp_0.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newUid = suspendResult;
            return new Person(newUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EditChildProfileViewModel$slambda$slambda_1).l78 = function (completion) {
    return new EditChildProfileViewModel$slambda$slambda_1(this.gza_1, completion);
  };
  function EditChildProfileViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new EditChildProfileViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.hza($completion);
    };
    l.$arity = 0;
    return l;
  }
  function EditChildProfileViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.fzb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ozb(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_genderConfig__kyr0zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hzb_1;
    genderConfig$factory_0();
    return this_0.t2();
  }
  function hasErrors_3(_this__u8e3s4, $this) {
    return ((!(_this__u8e3s4.jzb_1 == null) ? true : !(_this__u8e3s4.mzb_1 == null)) ? true : !(_this__u8e3s4.nzb_1 == null)) ? true : !(_this__u8e3s4.lzb_1 == null);
  }
  function Companion_183() {
    this.pzb_1 = 'EditChildProfile';
  }
  var Companion_instance_232;
  function Companion_getInstance_200() {
    return Companion_instance_232;
  }
  function EditChildProfileViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.rwv();
      return Unit_instance;
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function EditChildProfileViewModel$slambda(this$0, resultContinuation) {
    this.yzb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EditChildProfileViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.azc_1 = Companion_instance_3.n4r();
            this.hd_1 = 1;
            var tmp_0 = EditChildProfileViewModel$slambda$slambda_0(null);
            var tmp_1 = EditChildProfileViewModel$slambda$slambda_2(this.yzb_1, null);
            suspendResult = this.yzb_1.kqo(this.azc_1, VOID, VOID, tmp_0, tmp_1, EditChildProfileViewModel$slambda$lambda(this.yzb_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EditChildProfileViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new EditChildProfileViewModel$slambda(this.yzb_1, completion);
    i.zzb_1 = $this$launch;
    return i;
  };
  function EditChildProfileViewModel$slambda_0(this$0, resultContinuation) {
    var i = new EditChildProfileViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EditChildProfileViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.jzc_1 = $commitDelay;
    this.kzc_1 = $entity;
    this.lzc_1 = $this;
    this.mzc_1 = $key;
    this.nzc_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EditChildProfileViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.jzc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.kzc_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.lzc_1.gqo(this.lzc_1.aqn_1, this.mzc_1, this.nzc_1, this.kzc_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EditChildProfileViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new EditChildProfileViewModel$onEntityChanged$slambda(this.jzc_1, this.kzc_1, this.lzc_1, this.mzc_1, this.nzc_1, completion);
    i.ozc_1 = $this$launch;
    return i;
  };
  function EditChildProfileViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new EditChildProfileViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EditChildProfileViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'EditChildProfile');
    this.fzb_1 = MutableStateFlow(new EditChildProfileUiState());
    this.gzb_1 = asStateFlow(this.fzb_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.hzb_1 = Instance(this, tmp$ret$0, null).a5d(this, genderConfig$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var nextValue = prevValue.ozb(VOID, VOID, _get_genderConfig__kyr0zc(this).lq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var tmp0_title = this.aqo().moj(strings_getInstance().xnp_1);
        var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp0_title, false, true, VOID, false, VOID, VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.eqn_1;
      while (true) {
        var prevValue_1 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var tmp_1 = this.aqo().moj(strings_getInstance().qmr_1);
        var nextValue_1 = prevValue_1.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_1, VOID, EditChildProfileViewModel$onClickDone$ref(this)));
        if (this_2.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, EditChildProfileViewModel$slambda_0(this, null));
  }
  protoOf(EditChildProfileViewModel).pzc = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.izb_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l96_1;
        var tmp_0 = this.lqu(tmp, entity == null ? null : entity.l96_1, prevValue.lzb_1);
        var tmp2_safe_receiver = prevValue.izb_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.h96_1;
        var tmp_2 = this.lqu(tmp_1, entity == null ? null : entity.h96_1, prevValue.mzb_1);
        var tmp4_safe_receiver = prevValue.izb_1;
        var tmp_3 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.i96_1;
        var nextValue = prevValue.ozb(entity, VOID, VOID, tmp_0, tmp_2, this.lqu(tmp_3, entity == null ? null : entity.i96_1, prevValue.nzb_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_3.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_4 = this;
    var tmp_5 = this.rqn();
    tmp_4.hqt_1 = launch(tmp_5, VOID, VOID, EditChildProfileViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(EditChildProfileViewModel).rwv = function () {
    this.cqo(Companion_getInstance_97().tq6_1);
    var tmp0_elvis_lhs = this.fzb_1.t2().izb_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var savePerson = tmp;
    var requiredFieldMessage = this.aqo().moj(strings_getInstance().vmn_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.onClickDone.<anonymous>' call
        var tmp_0;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = savePerson.h96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_0 = requiredFieldMessage;
        } else {
          tmp_0 = null;
        }
        var tmp0_firstNameError = tmp_0;
        var tmp_1;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = savePerson.i96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_1 = requiredFieldMessage;
        } else {
          tmp_1 = null;
        }
        var tmp1_lastNameError = tmp_1;
        var tmp_2;
        if (savePerson.o96_1.equals(new Long(0, 0))) {
          tmp_2 = requiredFieldMessage;
        } else {
          tmp_2 = null;
        }
        var tmp2_dateOfBirthError = tmp_2;
        var tmp_3;
        var tmp_4 = savePerson.l96_1;
        if (tmp_4 === 0) {
          tmp_3 = requiredFieldMessage;
        } else {
          tmp_3 = null;
        }
        var tmp3_genderError = tmp_3;
        var nextValue = prevValue.ozb(VOID, tmp2_dateOfBirthError, VOID, tmp3_genderError, tmp0_firstNameError, tmp1_lastNameError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_3(this.fzb_1.t2(), this)) {
      this.cqo(Companion_getInstance_97().uq6_1);
      return Unit_instance;
    }
    this.lqt(this.fzb_1.t2().izb_1);
  };
  function EditChildProfileUiState(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError) {
    person = person === VOID ? null : person;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().nq7_1 : genderOptions;
    genderError = genderError === VOID ? null : genderError;
    firstNameError = firstNameError === VOID ? null : firstNameError;
    lastNameError = lastNameError === VOID ? null : lastNameError;
    this.izb_1 = person;
    this.jzb_1 = dateOfBirthError;
    this.kzb_1 = genderOptions;
    this.lzb_1 = genderError;
    this.mzb_1 = firstNameError;
    this.nzb_1 = lastNameError;
  }
  protoOf(EditChildProfileUiState).qzc = function (person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError) {
    return new EditChildProfileUiState(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError);
  };
  protoOf(EditChildProfileUiState).ozb = function (person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError, $super) {
    person = person === VOID ? this.izb_1 : person;
    dateOfBirthError = dateOfBirthError === VOID ? this.jzb_1 : dateOfBirthError;
    genderOptions = genderOptions === VOID ? this.kzb_1 : genderOptions;
    genderError = genderError === VOID ? this.lzb_1 : genderError;
    firstNameError = firstNameError === VOID ? this.mzb_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.nzb_1 : lastNameError;
    return $super === VOID ? this.qzc(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError) : $super.qzc.call(this, person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError);
  };
  protoOf(EditChildProfileUiState).toString = function () {
    return 'EditChildProfileUiState(person=' + this.izb_1 + ', dateOfBirthError=' + this.jzb_1 + ', genderOptions=' + this.kzb_1 + ', genderError=' + this.lzb_1 + ', firstNameError=' + this.mzb_1 + ', lastNameError=' + this.nzb_1 + ')';
  };
  protoOf(EditChildProfileUiState).hashCode = function () {
    var result = this.izb_1 == null ? 0 : this.izb_1.hashCode();
    result = imul(result, 31) + (this.jzb_1 == null ? 0 : getStringHashCode(this.jzb_1)) | 0;
    result = imul(result, 31) + hashCode(this.kzb_1) | 0;
    result = imul(result, 31) + (this.lzb_1 == null ? 0 : getStringHashCode(this.lzb_1)) | 0;
    result = imul(result, 31) + (this.mzb_1 == null ? 0 : getStringHashCode(this.mzb_1)) | 0;
    result = imul(result, 31) + (this.nzb_1 == null ? 0 : getStringHashCode(this.nzb_1)) | 0;
    return result;
  };
  protoOf(EditChildProfileUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EditChildProfileUiState))
      return false;
    var tmp0_other_with_cast = other instanceof EditChildProfileUiState ? other : THROW_CCE();
    if (!equals(this.izb_1, tmp0_other_with_cast.izb_1))
      return false;
    if (!(this.jzb_1 == tmp0_other_with_cast.jzb_1))
      return false;
    if (!equals(this.kzb_1, tmp0_other_with_cast.kzb_1))
      return false;
    if (!(this.lzb_1 == tmp0_other_with_cast.lzb_1))
      return false;
    if (!(this.mzb_1 == tmp0_other_with_cast.mzb_1))
      return false;
    if (!(this.nzb_1 == tmp0_other_with_cast.nzb_1))
      return false;
    return true;
  };
  function genderConfig$factory() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function genderConfig$factory_0() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).bzd = function (entity, permissions, $completion) {
    var tmp = this.czd(entity, permissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof PersonAndDisplayDetail) ? p1 : THROW_CCE();
    return this.bzd(tmp, p2 instanceof EditAndViewPermission ? p2 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.zzc_1;
          var tmp_0;
          if (this.azd_1.bi3_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).czd = function (entity, permissions, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.zzc_1 = entity;
    i.azd_1 = permissions;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissions, $completion) {
      return i.bzd(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.lzd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).nzd = function (person, $completion) {
    var tmp = this.ozd(person, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.nzd((p1 == null ? true : p1 instanceof PersonAndDisplayDetail) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.lzd_1.lze_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.mzd_1;
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
              var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k96_1;
              var tmp_0;
              if (tmp2_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = _get_phoneNumberUtil__i6ank8(this.lzd_1);
                tmp_0 = tmp0_safe_receiver_0 == null ? null : formatInternationalOrNull(tmp0_safe_receiver_0, tmp2_safe_receiver);
              }
              var nextValue = prevValue.zze(this.mzd_1, tmp_0);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.lzd_1.eqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_1 = this.mzd_1;
              var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.vg7_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver_0 == null ? null : personFullName(tmp1_safe_receiver_0);
              var tmp3_title = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              var tmp_1;
              if (!(this.mzd_1 == null)) {
                tmp_1 = Companion_getInstance_97().uq6_1;
              } else {
                tmp_1 = Companion_getInstance_97().tq6_1;
              }
              var tmp4_loadingState = tmp_1;
              var nextValue_0 = prevValue_0.mq6(VOID, tmp4_loadingState, tmp3_title);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).ozd = function (person, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this.lzd_1, completion);
    i.mzd_1 = person;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (person, $completion) {
      return i.nzd(person, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.izf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).lqf = function (it, $completion) {
    var tmp = this.mqf(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.izf_1.lze_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.zze(VOID, VOID, VOID, VOID, VOID, this.jzf_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).mqf = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this.izf_1, completion);
    i.jzf_1 = it;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.lqf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.ex6();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.szf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).uzf = function (it, $completion) {
    var tmp = this.vzf(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.uzf(p1 instanceof EditAndViewPermission ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.szf_1.lze_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.zze(VOID, VOID, VOID, VOID, this.tzf_1.ci3_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.szf_1.eqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp_0;
              if (this.tzf_1.ci3_1) {
                var tmp_1 = this.szf_1.aqo().moj(strings_getInstance().qmv_1);
                var tmp_2 = FabIcon_EDIT_getInstance();
                tmp_0 = new FabUiState(true, tmp_1, tmp_2, PersonDetailViewModel$onClickEdit$ref(this.szf_1));
              } else {
                tmp_0 = new FabUiState();
              }
              var nextValue_0 = prevValue_0.mq6(tmp_0);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).vzf = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this.szf_1, completion);
    i.tzf_1 = it;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.uzf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.ezg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).gzg = function (it, $completion) {
    var tmp = this.hzg(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.gzg((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ezg_1.lze_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.zze(VOID, VOID, VOID, this.fzg_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).hzg = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this.ezg_1, completion);
    i.fzg_1 = it;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.gzg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.qzg_1 = $entityFlow;
    this.rzg_1 = $viewAndEditPermissionFlow;
    this.szg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.qzg_1, this.rzg_1, PersonDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this.szg_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_34(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda(this.qzg_1, this.rzg_1, this.szg_1, completion);
    i.tzg_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_0($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_1($hasManagePermissionsPermissionFlow, this$0, resultContinuation) {
    this.czh_1 = $hasManagePermissionsPermissionFlow;
    this.dzh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.czh_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this.dzh_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_34(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_1(this.czh_1, this.dzh_1, completion);
    i.ezh_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_2($hasManagePermissionsPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_1($hasManagePermissionsPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_3($viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.nzh_1 = $viewAndEditPermissionFlow;
    this.ozh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = PersonDetailViewModel$slambda$slambda$slambda$slambda_6(this.ozh_1, null);
            suspendResult = this.nzh_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_34(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            throwKotlinNothingValueException();
            break;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_3(this.nzh_1, this.ozh_1, completion);
    i.pzh_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_4($viewAndEditPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_3($viewAndEditPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.yzh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.yzh_1.uqn().t7d().h93(this.yzh_1.sqn(), this.yzh_1.uqm_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this.yzh_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_34(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_5(this.yzh_1, completion);
    i.zzh_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation) {
    this.izi_1 = $this_launch;
    this.jzi_1 = $entityFlow;
    this.kzi_1 = $viewAndEditPermissionFlow;
    this.lzi_1 = this$0;
    this.mzi_1 = $hasManagePermissionsPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.izi_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_0(this.jzi_1, this.kzi_1, this.lzi_1, null));
          launch(this.izi_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_2(this.mzi_1, this.lzi_1, null));
          launch(this.izi_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_4(this.kzi_1, this.lzi_1, null));
          launch(this.izi_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_6(this.lzi_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new PersonDetailViewModel$slambda$slambda(this.izi_1, this.jzi_1, this.kzi_1, this.lzi_1, this.mzi_1, completion);
  };
  function PersonDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_phoneNumberUtil__i6ank8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.oze_1;
    phoneNumberUtil$factory_0();
    return this_0.t2();
  }
  function _get_onClickPhoneNumUseCase__2tcaut($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pze_1;
    onClickPhoneNumUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickSendSmsUseCase__plj4zm($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qze_1;
    onClickSendSmsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickEmailUseCase__v8uzjh($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rze_1;
    onClickEmailUseCase$factory_0();
    return this_0.t2();
  }
  function navigateToEditAccount($this) {
    Companion_getInstance_125();
    $this.cqn_1.rp6('AccountEdit', mapOf_0(to('entityUid', $this.nze_1.toString())));
  }
  function navigateToManageAccount($this) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.navigateToManageAccount.<anonymous>' call
    Companion_getInstance_125();
    this_0.s('entityUid', $this.nze_1.toString());
    var tmp0_safe_receiver = $this.lze_1.t2().sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    this_0.s('PersonUsername', toString_0(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_1));
    var tmp2_safe_receiver = $this.lze_1.t2().sze_1;
    var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vg7_1;
    this_0.s('PersonFullName', toString_0(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.ckr()));
    var tmp$ret$2 = this_0.f3();
    $this.cqn_1.rp6('ManageAccount', tmp$ret$2);
  }
  function Companion_184() {
    this.nzi_1 = 'PersonDetailView';
  }
  var Companion_instance_233;
  function Companion_getInstance_201() {
    return Companion_instance_233;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_34(function_0) {
    this.ozi_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_34).t1d = function (value, $completion) {
    return this.ozi_1(value, $completion);
  };
  function PersonDetailViewModel$onClickEdit$ref_0($boundThis) {
    var l = function () {
      $boundThis.ex6();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda(this$0, resultContinuation) {
    this.xzi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.zzi_1 = this.xzi_1.wqn().n7d().pg4(this.xzi_1.uqm_1, this.xzi_1.sqn());
            this.azj_1 = shareIn(this.xzi_1.wqn().p7f().xi0(this.xzi_1.sqn(), this.xzi_1.uqm_1), this.xzi_1.rqn(), Companion_getInstance_12().v1h());
            var tmp_0 = this;
            var tmp_1 = this.xzi_1.uqn().p7f();
            var tmp_2 = this.xzi_1.sqn();
            PermissionFlags_getInstance();
            tmp_0.bzj_1 = tmp_1.ui0(tmp_2, new Long(4096, 0));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.xzi_1.lze_1, PersonDetailViewModel$slambda$slambda_0(this.yzi_1, this.zzi_1, this.azj_1, this.xzi_1, this.bzj_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda(this.xzi_1, completion);
    i.yzi_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'PersonDetailView');
    this.lze_1 = MutableStateFlow(new PersonDetailUiState());
    this.mze_1 = asStateFlow(this.lze_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nze_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(IPhoneNumberUtil), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.oze_1 = InstanceOrNull(this, tmp$ret$0, null).a5d(this, phoneNumberUtil$factory());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(OnClickPhoneNumUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.pze_1 = Instance(this, tmp$ret$2, null).a5d(this, onClickPhoneNumUseCase$factory());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(OnClickSendSmsUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.qze_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, onClickSendSmsUseCase$factory());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(OnClickEmailUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.rze_1 = Instance(this, tmp$ret$6, null).a5d(this, onClickEmailUseCase$factory());
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var accountManager$delegate = Instance(this, tmp$ret$8, null).a5d(null, getLocalDelegateReference('accountManager', KProperty0, false, function () {
      return THROW_ISE();
    }));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_97().tq6_1;
        var tmp_9 = this.aqo().moj(strings_getInstance().qmv_1);
        var tmp_10 = FabIcon_EDIT_getInstance();
        var tmp1_fabState = new FabUiState(false, tmp_9, tmp_10, PersonDetailViewModel$onClickEdit$ref_0(this));
        var nextValue = prevValue.mq6(tmp1_fabState, tmp0_loadingState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.lze_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_isActiveUser = this.uqm_1.equals(this.sqn());
        var tmp1_canSendSms = !(_get_onClickSendSmsUseCase__plj4zm(this) == null);
        var nextValue_0 = prevValue_0.zze(VOID, VOID, tmp1_canSendSms, VOID, VOID, VOID, tmp0_isActiveUser);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_11 = this.rqn();
    launch(tmp_11, VOID, VOID, PersonDetailViewModel$slambda_0(this, null));
  }
  protoOf(PersonDetailViewModel).ex6 = function () {
    Companion_getInstance_202();
    Companion_getInstance_125();
    this.cqn_1.rp6('PersonEditView', mapOf_0(to('entityUid', this.nze_1.toString())));
  };
  protoOf(PersonDetailViewModel).czj = function () {
    return navigateToEditAccount(this);
  };
  protoOf(PersonDetailViewModel).dzj = function () {
    return navigateToManageAccount(this);
  };
  protoOf(PersonDetailViewModel).ezj = function () {
    Companion_getInstance_116();
    this.cqn_1.rp6('MessageList', mapOf_0(to('personUid', this.nze_1.toString())));
  };
  protoOf(PersonDetailViewModel).fzj = function () {
    var tmp0_safe_receiver = this.lze_1.t2().sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k96_1;
    if (tmp2_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.onClickDial.<anonymous>' call
      _get_onClickPhoneNumUseCase__2tcaut(this).wp1(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).gzj = function () {
    var tmp0_safe_receiver = this.lze_1.t2().sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j96_1;
    if (tmp2_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.onClickEmail.<anonymous>' call
      _get_onClickEmailUseCase__v8uzjh(this).wp1(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).qrx = function () {
    Companion_getInstance_125();
    this.cqn_1.rp6('SystemPermission', mapOf_0(to('personUid', this.uqm_1.toString())));
  };
  protoOf(PersonDetailViewModel).hzj = function () {
    var tmp0_safe_receiver = this.lze_1.t2().sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wg7_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zg7_1;
    var ppjUid = tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs;
    if (!ppjUid.equals(new Long(0, 0))) {
      Companion_getInstance_125();
      var tmp = to('entityUid', ppjUid.toString());
      Companion_getInstance_125();
      Companion_getInstance_116();
      this.cqn_1.rp6('ParentalConsentManagement', mapOf([tmp, to('next', '')]));
    }
  };
  function PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    person = person === VOID ? null : person;
    displayPhoneNum = displayPhoneNum === VOID ? null : displayPhoneNum;
    canSendSms = canSendSms === VOID ? false : canSendSms;
    clazzes = clazzes === VOID ? emptyList() : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? false : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? false : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? false : isActiveUser;
    this.sze_1 = person;
    this.tze_1 = displayPhoneNum;
    this.uze_1 = canSendSms;
    this.vze_1 = clazzes;
    this.wze_1 = hasChangePasswordPermission;
    this.xze_1 = showPermissionButton;
    this.yze_1 = isActiveUser;
  }
  protoOf(PersonDetailUiState).izj = function () {
    var tmp0_safe_receiver = this.sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    return isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o96_1);
  };
  protoOf(PersonDetailUiState).jzj = function () {
    var tmp;
    var tmp0_safe_receiver = this.sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l96_1) == null)) {
      var tmp2_safe_receiver = this.sze_1.vg7_1;
      tmp = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l96_1) === 0);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).kzj = function () {
    var tmp;
    var tmp0_safe_receiver = this.sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_1) == null)) {
      tmp = this.wze_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).lzj = function () {
    var tmp;
    var tmp_0;
    if (!(this.sze_1 == null)) {
      var tmp0_safe_receiver = this.sze_1.vg7_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g96_1) == null;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.wze_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).mzj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.p96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).nzj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).ozj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).pzj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).qzj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).rzj = function () {
    var tmp0_safe_receiver = this.sze_1;
    return !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wg7_1) == null);
  };
  protoOf(PersonDetailUiState).szj = function () {
    var tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.sze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_1;
    // Inline function 'kotlin.contracts.contract' call
    if (!(this_0 == null ? true : isBlank(this_0))) {
      tmp = !this.yze_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).tzj = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    return new PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).zze = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser, $super) {
    person = person === VOID ? this.sze_1 : person;
    displayPhoneNum = displayPhoneNum === VOID ? this.tze_1 : displayPhoneNum;
    canSendSms = canSendSms === VOID ? this.uze_1 : canSendSms;
    clazzes = clazzes === VOID ? this.vze_1 : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? this.wze_1 : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? this.xze_1 : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? this.yze_1 : isActiveUser;
    return $super === VOID ? this.tzj(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) : $super.tzj.call(this, person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).toString = function () {
    return 'PersonDetailUiState(person=' + this.sze_1 + ', displayPhoneNum=' + this.tze_1 + ', canSendSms=' + this.uze_1 + ', clazzes=' + this.vze_1 + ', hasChangePasswordPermission=' + this.wze_1 + ', showPermissionButton=' + this.xze_1 + ', isActiveUser=' + this.yze_1 + ')';
  };
  protoOf(PersonDetailUiState).hashCode = function () {
    var result = this.sze_1 == null ? 0 : this.sze_1.hashCode();
    result = imul(result, 31) + (this.tze_1 == null ? 0 : getStringHashCode(this.tze_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uze_1) | 0;
    result = imul(result, 31) + hashCode(this.vze_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wze_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xze_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yze_1) | 0;
    return result;
  };
  protoOf(PersonDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonDetailUiState ? other : THROW_CCE();
    if (!equals(this.sze_1, tmp0_other_with_cast.sze_1))
      return false;
    if (!(this.tze_1 == tmp0_other_with_cast.tze_1))
      return false;
    if (!(this.uze_1 === tmp0_other_with_cast.uze_1))
      return false;
    if (!equals(this.vze_1, tmp0_other_with_cast.vze_1))
      return false;
    if (!(this.wze_1 === tmp0_other_with_cast.wze_1))
      return false;
    if (!(this.xze_1 === tmp0_other_with_cast.xze_1))
      return false;
    if (!(this.yze_1 === tmp0_other_with_cast.yze_1))
      return false;
    return true;
  };
  function phoneNumberUtil$factory() {
    return getPropertyCallableRef('phoneNumberUtil', 1, KProperty1, function (receiver) {
      return _get_phoneNumberUtil__i6ank8(receiver);
    }, null);
  }
  function onClickPhoneNumUseCase$factory() {
    return getPropertyCallableRef('onClickPhoneNumUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickPhoneNumUseCase__2tcaut(receiver);
    }, null);
  }
  function onClickSendSmsUseCase$factory() {
    return getPropertyCallableRef('onClickSendSmsUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickSendSmsUseCase__plj4zm(receiver);
    }, null);
  }
  function onClickEmailUseCase$factory() {
    return getPropertyCallableRef('onClickEmailUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickEmailUseCase__v8uzjh(receiver);
    }, null);
  }
  function phoneNumberUtil$factory_0() {
    return getPropertyCallableRef('phoneNumberUtil', 1, KProperty1, function (receiver) {
      return _get_phoneNumberUtil__i6ank8(receiver);
    }, null);
  }
  function onClickPhoneNumUseCase$factory_0() {
    return getPropertyCallableRef('onClickPhoneNumUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickPhoneNumUseCase__2tcaut(receiver);
    }, null);
  }
  function onClickSendSmsUseCase$factory_0() {
    return getPropertyCallableRef('onClickSendSmsUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickSendSmsUseCase__plj4zm(receiver);
    }, null);
  }
  function onClickEmailUseCase$factory_0() {
    return getPropertyCallableRef('onClickEmailUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickEmailUseCase__v8uzjh(receiver);
    }, null);
  }
  function PersonEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.czk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda).xz9 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.xz9(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.dzk_1.n7d();
            var tmp_1;
            if (!_get_entityUid__ovkepw(this.czk_1).equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.ezk_1 = tmp_1;
            if (this.ezk_1 == null) {
              this.fzk_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.ezk_1.mg4(_get_entityUid__ovkepw(this.czk_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.fzk_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.fzk_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).yny = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this.czk_1, completion);
    i.dzk_1 = it;
    return i;
  };
  function PersonEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.xz9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation) {
    this.ozk_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).hza = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.hza($completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new Person();
          var tmp_0 = this_0;
          var tmp0_safe_receiver = this.ozk_1.ba('DateOfBirth');
          var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
          tmp_0.o96_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).l78 = function (completion) {
    return new PersonEditViewModel$slambda$slambda$slambda_1(this.ozk_1, completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_2($savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.hza($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$lambda(this$0) {
    return function (entityToDisplay) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mzl_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.tzm(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.czn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).ezn = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.ezn(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.dzn_1.f7e().yh3(_get_entityUid__ovkepw(this.czn_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).yny = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this.czn_1, completion);
    i.dzn_1 = it;
    return i;
  };
  function PersonEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ezn(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).nzn = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).m78 = function ($completion) {
    return this.nzn($completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).l78 = function (completion) {
    return new PersonEditViewModel$slambda$slambda$slambda_5(completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_6(resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.nzn($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (personPicture) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mzl_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.tzm(VOID, VOID, VOID, personPicture);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.wzn_1 = this$0;
    this.xzn_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda).zzn = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.zzn((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_3.n4r();
            var tmp_1 = PersonEditViewModel$slambda$slambda$slambda_0(this.wzn_1, null);
            var tmp_2 = PersonEditViewModel$slambda$slambda$slambda_2(this.xzn_1, null);
            suspendResult = this.wzn_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonEditViewModel$slambda$slambda$lambda(this.wzn_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new PersonEditViewModel$slambda$slambda(this.wzn_1, this.xzn_1, completion);
    i.yzn_1 = $this$async;
    return i;
  };
  function PersonEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.zzn($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.izo_1 = this$0;
    this.jzo_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda_1).lzo = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.lzo((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_7.n4r();
            var tmp_1 = listOf_0('picState');
            var tmp_2;
            if (!_get_entityUid__ovkepw(this.izo_1).equals(new Long(0, 0))) {
              tmp_2 = PersonEditViewModel$slambda$slambda$slambda_4(this.izo_1, null);
            } else {
              tmp_2 = null;
            }

            var tmp_3 = tmp_2;
            var tmp_4 = PersonEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.izo_1.kqo(tmp_0, tmp_1, VOID, tmp_3, tmp_4, PersonEditViewModel$slambda$slambda$lambda_0(this.izo_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_123();
            var tmp1_elvis_lhs = this_0 == null ? null : this_0.g97_1;
            setIfNoValueSetYet(this.jzo_1, 'initPicUri', tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            return this_0;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new PersonEditViewModel$slambda$slambda_1(this.izo_1, this.jzo_1, completion);
    i.kzo_1 = $this$async;
    return i;
  };
  function PersonEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.lzo($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    this.uzo_1 = this$0;
    this.vzo_1 = $savePerson;
    this.wzo_1 = $consentToUpsert;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).dzp = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.dzp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (this.uzo_1.iqt_1.equals(new Long(0, 0))) {
              this.hd_1 = 4;
              suspendResult = _get_addNewPersonUseCase__raa2qa(this.uzo_1).lpl(this.vzo_1, this.uzo_1.sqn(), true, VOID, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.uzo_1.wqn().n7d().ng4(this.vzo_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.zzo_1 = this.wzo_1;
            if (this.zzo_1 == null) {
              this.azp_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.bzp_1 = this.zzo_1;
              var tmp_1 = this;
              tmp_1.czp_1 = this.bzp_1;
              this.hd_1 = 2;
              suspendResult = this.uzo_1.wqn().x7e().ugs(this.czp_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.azp_1 = this.bzp_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.yzo_1 = this.azp_1;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.yzo_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return this.yzo_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).yny = function (it, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this.uzo_1, this.vzo_1, this.wzo_1, completion);
    i.xzo_1 = it;
    return i;
  };
  function PersonEditViewModel$onClickSave$slambda$slambda_0(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation);
    var l = function (it, $completion) {
      return i.dzp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_apiUrlConfig__mldllg_4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pzl_1;
    apiUrlConfig$factory_10();
    return this_0.t2();
  }
  function _get_entityUid__ovkepw($this) {
    Companion_getInstance_116();
    var tmp0_safe_receiver = $this.aqn_1.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function _get_phoneNumValidatorUseCase__4guu7i($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.szl_1;
    phoneNumValidatorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wzl_1;
    genderConfig$factory_2();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xzl_1;
    enqueueSavePictureUseCase$factory_0();
    return this_0.t2();
  }
  function _get_addNewPersonUseCase__raa2qa($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yzl_1;
    addNewPersonUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_4(_this__u8e3s4, $this) {
    return ((((((((!(_this__u8e3s4.hzm_1 == null) ? true : !(_this__u8e3s4.jzm_1 == null)) ? true : !(_this__u8e3s4.lzm_1 == null)) ? true : !(_this__u8e3s4.mzm_1 == null)) ? true : !(_this__u8e3s4.pzm_1 == null)) ? true : !(_this__u8e3s4.qzm_1 == null)) ? true : !(_this__u8e3s4.ozm_1 == null)) ? true : !(_this__u8e3s4.kzm_1 == null)) ? true : !(_this__u8e3s4.nzm_1 == null)) ? true : !(_this__u8e3s4.rzm_1 == null);
  }
  function Companion_185() {
    Companion_instance_234 = this;
    this.ezp_1 = 'picState';
    this.fzp_1 = 'PersonEditView';
    this.gzp_1 = 'Register';
    this.hzp_1 = listOf(['PersonEditView', 'Register']);
    this.izp_1 = 'RegMode';
    this.jzp_1 = 'DateOfBirth';
    this.kzp_1 = 'RegViaLink';
    this.lzp_1 = 0;
    this.mzp_1 = 1;
    this.nzp_1 = 2;
    var tmp = this;
    Companion_getInstance_116();
    Companion_getInstance_116();
    Companion_getInstance_125();
    Companion_getInstance_125();
    tmp.ozp_1 = listOf(['learningSpaceUrl', 'showAccept', 'popUpToOnFinish', 'next', 'RegViaLink', 'DateOfBirth', 'RegMode', 'noSessionChange']);
    this.pzp_1 = 'initDob';
  }
  var Companion_instance_234;
  function Companion_getInstance_202() {
    if (Companion_instance_234 == null)
      new Companion_185();
    return Companion_instance_234;
  }
  function PersonEditViewModel$slambda(this$0, resultContinuation) {
    this.yzp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda).msc = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!(this.yzp_1.ozl_1 === 0) ? this.yzp_1.iqt_1.equals(new Long(0, 0)) : false) {
              this.azq_1 = true;
              this.hd_1 = 4;
              continue $sm;
            } else {
              if (!this.yzp_1.iqt_1.equals(new Long(0, 0)) ? this.yzp_1.sqn().equals(this.yzp_1.iqt_1) : false) {
                this.azq_1 = true;
                this.hd_1 = 4;
                continue $sm;
              } else {
                if (this.yzp_1.iqt_1.equals(new Long(0, 0))) {
                  this.hd_1 = 2;
                  var tmp_0 = this.zzp_1.p7f();
                  var tmp_1 = this.yzp_1.sqn();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_0.ti0(tmp_1, new Long(1024, 0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.hd_1 = 1;
                  var tmp_2 = this.zzp_1.p7f();
                  var tmp_3 = this.yzp_1.sqn();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_2.ti0(tmp_3, new Long(32768, 0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 1:
            this.azq_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.azq_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 3:
            throw this.kd_1;
          case 4:
            return this.azq_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda).yny = function (db, completion) {
    var i = new PersonEditViewModel$slambda(this.yzp_1, completion);
    i.zzp_1 = db;
    return i;
  };
  function PersonEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.msc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mzl_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.tzm(VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.jzq_1 = this$0;
    this.kzq_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = async(this.lzq_1, VOID, VOID, PersonEditViewModel$slambda$slambda_0(this.jzq_1, this.kzq_1, null));
            suspendResult = awaitAll([tmp_0, async(this.lzq_1, VOID, VOID, PersonEditViewModel$slambda$slambda_2(this.jzq_1, this.kzq_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.jzq_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (hasFlag(this.jzq_1.ozl_1, 1)) {
                  tmp_1 = this.jzq_1.aqo().moj(strings_getInstance().nmk_1);
                } else {
                  tmp_1 = this.jzq_1.aqo().moj(strings_getInstance().en3_1);
                }
                var tmp_2 = tmp_1;
                var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_2, VOID, PersonEditViewModel$onClickSave$ref(this.jzq_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp_3;
            if (hasFlag(this.jzq_1.ozl_1, 2)) {
              tmp_3 = new PersonParentJoin();
            } else {
              tmp_3 = null;
            }

            var personParentJoin = tmp_3;
            l$ret$3: do {
              var this_1 = this.jzq_1.mzl_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.tzm(VOID, VOID, VOID, VOID, true, personParentJoin);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.jzq_1.cqo(Companion_getInstance_97().uq6_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new PersonEditViewModel$slambda_1(this.jzq_1, this.kzq_1, completion);
    i.lzq_1 = $this$launchIfHasPermission;
    return i;
  };
  function PersonEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onEntityChanged$lambda(this$0, $entity) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_elvis_lhs = $entity.g96_1;
      tmp.g96_1 = this$0.vzl_1.tpe(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, '');
      return Unit_instance;
    };
  }
  function PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.uzq_1 = $commitDelay;
    this.vzq_1 = $entity;
    this.wzq_1 = $this;
    this.xzq_1 = $key;
    this.yzq_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.uzq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.vzq_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.wzq_1.gqo(this.wzq_1.aqn_1, this.xzq_1, this.yzq_1, this.vzq_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onEntityChanged$slambda(this.uzq_1, this.vzq_1, this.wzq_1, this.xzq_1, this.yzq_1, completion);
    i.zzq_1 = $this$launch;
    return i;
  };
  function PersonEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation) {
    this.izr_1 = this$0;
    this.jzr_1 = $personPicture;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.izr_1.gqo(this.izr_1.aqn_1, 'picState', Companion_instance_7.n4r(), this.jzr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onPersonPictureChanged$slambda(this.izr_1, this.jzr_1, completion);
    i.kzr_1 = $this$launch;
    return i;
  };
  function PersonEditViewModel$onPersonPictureChanged$slambda_0(this$0, $personPicture, resultContinuation) {
    var i = new PersonEditViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$lambda($this$shallowCopy) {
    var tmp = $this$shallowCopy;
    var tmp0_safe_receiver = $this$shallowCopy.k96_1;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var tmp1_safe_receiver = tmp_0;
    tmp.k96_1 = tmp1_safe_receiver == null ? null : replace(tmp1_safe_receiver, ' ', '');
    var tmp_1 = $this$shallowCopy;
    var tmp2_safe_receiver = $this$shallowCopy.j96_1;
    var tmp_2;
    if (tmp2_safe_receiver == null) {
      tmp_2 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_2 = toString(trim(isCharSequence(tmp2_safe_receiver) ? tmp2_safe_receiver : THROW_CCE()));
    }
    tmp_1.j96_1 = tmp_2;
    return Unit_instance;
  }
  function PersonEditViewModel$onClickSave$slambda($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation) {
    this.tzr_1 = $isRegistrationMode;
    this.uzr_1 = this$0;
    this.vzr_1 = $savePerson;
    this.wzr_1 = $requiredFieldMessage;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            if (this.tzr_1) {
              this.yzr_1 = this.uzr_1.mzl_1.t2().fzm_1;
              this.zzr_1 = this.uzr_1.mzl_1.t2().bzm_1;
              var tmp_0 = this;
              var tmp$ret$0;
              l$ret$1: do {
                var this_0 = this.uzr_1.mzl_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_1;
                  var this_1 = this.vzr_1.g96_1;
                  if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
                    tmp_1 = this.wzr_1;
                  } else {
                    tmp_1 = null;
                  }
                  var tmp3_usernameError = tmp_1;
                  var tmp_2;
                  var this_2 = this.zzr_1;
                  if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
                    tmp_2 = this.wzr_1;
                  } else {
                    tmp_2 = null;
                  }
                  var tmp4_passwordError = tmp_2;
                  var tmp_3;
                  if (!hasFlag(this.uzr_1.ozl_1, 2)) {
                    tmp_3 = null;
                  } else {
                    var tmp0_safe_receiver = this.yzr_1;
                    var this_3 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hg8_1;
                    if (this_3 == null ? true : charSequenceLength(this_3) === 0) {
                      tmp_3 = this.wzr_1;
                    } else {
                      var tmp1_safe_receiver = this.yzr_1;
                      var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.hg8_1;
                      var tmp_4;
                      if (tmp2_safe_receiver == null) {
                        tmp_4 = null;
                      } else {
                        tmp_4 = this.uzr_1.tzl_1.up9(tmp2_safe_receiver);
                      }
                      if (tmp_4 == null) {
                        tmp_3 = this.uzr_1.aqo().moj(strings_getInstance().pna_1);
                      } else {
                        tmp_3 = null;
                      }
                    }
                  }
                  var tmp5_parentContactError = tmp_3;
                  var tmp_5;
                  if (this.vzr_1.o96_1.equals(new Long(0, 0))) {
                    tmp_5 = this.wzr_1;
                  } else {
                    tmp_5 = null;
                  }
                  var tmp6_dateOfBirthError = tmp_5;
                  var nextValue = prevValue.tzm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_usernameError, VOID, tmp4_passwordError, VOID, VOID, tmp6_dateOfBirthError, tmp5_parentContactError);
                  if (this_0.y1k(prevValue, nextValue)) {
                    tmp$ret$0 = nextValue;
                    break l$ret$1;
                  }
                }
              }
               while (false);
              tmp_0.azs_1 = tmp$ret$0;
              if (hasErrors_4(this.azs_1, this.uzr_1) ? true : this.zzr_1 == null) {
                this.uzr_1.cqo(Companion_getInstance_97().uq6_1);
                l$ret$3: do {
                  var this_4 = this.uzr_1.mzl_1;
                  while (true) {
                    var prevValue_0 = this_4.t2();
                    var nextValue_0 = prevValue_0.tzm(VOID, VOID, VOID, VOID, true);
                    if (this_4.y1k(prevValue_0, nextValue_0)) {
                      break l$ret$3;
                    }
                  }
                }
                 while (false);
                return Unit_instance;
              }
              this.hd_1 = 9;
              continue $sm;
            } else {
              var tmp_6;
              if (!this.uzr_1.iqt_1.equals(new Long(0, 0)) ? isDateOfBirthAMinor(Companion_getInstance_6().fmh(this.vzr_1.o96_1)) : false) {
                var tmp_7 = Companion_getInstance_6();
                var tmp0_safe_receiver_0 = this.uzr_1.aqn_1.ba('initDob');
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
                tmp_6 = !isDateOfBirthAMinor(tmp_7.fmh(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs));
              } else {
                tmp_6 = false;
              }
              if (tmp_6) {
                this.hd_1 = 1;
                suspendResult = this.uzr_1.wqn().x7e().xgs(this.vzr_1.f96_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.dzs_1 = false;
                this.hd_1 = 2;
                continue $sm;
              }
            }

          case 1:
            this.ezs_1 = suspendResult;
            this.dzs_1 = !this.ezs_1;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.dzs_1) {
              var tmp_8 = this;
              var this_5 = new PersonParentJoin();
              this_5.fg8_1 = this.vzr_1.f96_1;
              this_5.eg8_1 = this.uzr_1.qqn().joa().vky_1;
              var tmp_9 = this_5;
              tmp_9.kg8_1 = 1;
              this_5.lg8_1 = systemTimeInMillis();
              tmp_8.czs_1 = this_5;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.czs_1 = null;
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            this.fzs_1 = this.czs_1;
            this.hd_1 = 4;
            var tmp_11 = this.uzr_1.wqn();
            suspendResult = withDoorTransactionAsync(tmp_11, VOID, PersonEditViewModel$onClickSave$slambda$slambda_0(this.uzr_1, this.vzr_1, this.fzs_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.gzs_1 = this.uzr_1.mzl_1.t2().dzm_1;
            if (!(this.gzs_1 == null)) {
              this.gzs_1.e97_1 = this.vzr_1.f96_1;
              this.gzs_1.f97_1 = systemTimeInMillis();
              var tmp_12 = this;
              Companion_getInstance_123();
              var tmp2_elvis_lhs = this.uzr_1.aqn_1.ba('initPicUri');
              tmp_12.hzs_1 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              this.izs_1 = this.gzs_1.g97_1;
              if (!(this.hzs_1 === this.izs_1)) {
                this.hd_1 = 5;
                suspendResult = this.uzr_1.uqn().f7e().xh3(this.gzs_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 7;
                continue $sm;
              }
            } else {
              this.hd_1 = 8;
              continue $sm;
            }

          case 5:
            this.hd_1 = 6;
            var tmp_13 = _get_enqueueSavePictureUseCase__rl1s31(this.uzr_1);
            var tmp_14 = this.vzr_1.f96_1;
            suspendResult = tmp_13.bos(tmp_14, 50, this.izs_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var tmp_15 = this;
            tmp_15.jzs_1 = this.uzr_1.aqn_1.ba('goToOnPersonSelected');
            if (!(this.jzs_1 == null)) {
              var tmp_16 = UMFileUtil_getInstance().parseURLQueryString(this.jzs_1);
              Companion_getInstance_116();
              var args = plus_0(tmp_16, mapOf_0(to('personUid', this.vzr_1.f96_1.toString())));
              this.uzr_1.cqn_1.rp6(substringBefore_0(this.jzs_1, '?'), args);
            } else {
              this.uzr_1.kqt('PersonDetailView', this.vzr_1.f96_1, this.vzr_1);
            }

            this.hd_1 = 17;
            continue $sm;
          case 9:
            this.hd_1 = 10;
            continue $sm;
          case 10:
            this.id_1 = 13;
            this.id_1 = 12;
            this.hd_1 = 11;
            suspendResult = this.uzr_1.qqn().poa(this.vzr_1, this.zzr_1, this.uzr_1.qzl_1, new AccountRegisterOptions(!hasFlag(this.uzr_1.ozl_1, 2) ? !this.uzr_1.zzl_1 : false, this.yzr_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            var registeredPerson = suspendResult;
            var tmp_17 = this;
            var tmp_18;
            if (hasFlag(this.uzr_1.ozl_1, 2)) {
              var goOptions = new UstadGoOptions('RegisterAgeRedirect', true);
              var this_6 = LinkedHashMap_init_$Create$();
              var key = 'username';
              var tmp0_elvis_lhs = this.vzr_1.g96_1;
              var value = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
              this_6.s(key, value);
              var key_0 = 'parentContact';
              var tmp1_safe_receiver_0 = this.yzr_1;
              var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.hg8_1;
              var value_0 = tmp2_elvis_lhs_0 == null ? '' : tmp2_elvis_lhs_0;
              this_6.s(key_0, value_0);
              var key_1 = 'password';
              var tmp3_elvis_lhs = this.uzr_1.mzl_1.t2().bzm_1;
              var value_1 = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
              this_6.s(key_1, value_1);
              Companion_getInstance_116();
              putFromSavedStateIfPresent(this_6, this.uzr_1.aqn_1, 'popUpToOnFinish');
              var args_0 = this_6;
              this.uzr_1.cqn_1.lq9('WaitForParent', args_0, goOptions);
              tmp_18 = Unit_instance;
            } else {
              this.uzr_1.mqu(this.uzr_1.cqn_1, appendSelectedAccount(this.uzr_1.rzl_1, registeredPerson.f96_1, new LearningSpace(this.uzr_1.qzl_1)), new UstadGoOptions(VOID, VOID, true));
              tmp_18 = Unit_instance;
            }

            tmp_17.bzs_1 = tmp_18;
            this.id_1 = 14;
            this.hd_1 = 16;
            continue $sm;
          case 12:
            this.id_1 = 13;
            var tmp_19 = this.kd_1;
            if (tmp_19 instanceof Exception) {
              var e = this.kd_1;
              if (e instanceof IllegalStateException) {
                l$ret$7: do {
                  var this_7 = this.uzr_1.mzl_1;
                  while (true) {
                    var prevValue_1 = this_7.t2();
                    var nextValue_1 = prevValue_1.tzm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.uzr_1.aqo().moj(strings_getInstance().vn7_1));
                    if (this_7.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$7;
                    }
                  }
                }
                 while (false);
              } else {
                this.uzr_1.yqn().bq7(new Snack(this.uzr_1.aqo().moj(strings_getInstance().amj_1)));
              }
              this.kzs_1 = Unit_instance;
              this.id_1 = 14;
              this.hd_1 = 15;
              var tmp_20 = this;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 13:
            this.id_1 = 14;
            var t = this.kd_1;
            this.uzr_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$11: do {
              var this_8 = this.uzr_1.mzl_1;
              while (true) {
                var prevValue_2 = this_8.t2();
                var nextValue_2 = prevValue_2.tzm(VOID, VOID, VOID, VOID, true);
                if (this_8.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            throw t;
          case 14:
            throw this.kd_1;
          case 15:
            this.id_1 = 14;
            this.uzr_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$13: do {
              var this_9 = this.uzr_1.mzl_1;
              while (true) {
                var prevValue_3 = this_9.t2();
                var nextValue_3 = prevValue_3.tzm(VOID, VOID, VOID, VOID, true);
                if (this_9.y1k(prevValue_3, nextValue_3)) {
                  break l$ret$13;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 16:
            this.id_1 = 14;
            this.uzr_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$15: do {
              var this_10 = this.uzr_1.mzl_1;
              while (true) {
                var prevValue_4 = this_10.t2();
                var nextValue_4 = prevValue_4.tzm(VOID, VOID, VOID, VOID, true);
                if (this_10.y1k(prevValue_4, nextValue_4)) {
                  break l$ret$15;
                }
              }
            }
             while (false);
            this.hd_1 = 17;
            continue $sm;
          case 17:
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda(this.tzr_1, this.uzr_1, this.vzr_1, this.wzr_1, completion);
    i.xzr_1 = $this$launch;
    return i;
  };
  function PersonEditViewModel$onClickSave$slambda_0($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation) {
    var i = new PersonEditViewModel$onClickSave$slambda($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_202();
    destName = destName === VOID ? 'PersonEditView' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.mzl_1 = MutableStateFlow(new PersonEditUiState());
    this.nzl_1 = asStateFlow(this.mzl_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('RegMode');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    tmp.ozl_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.pzl_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_9());
    var tmp_2 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('learningSpaceUrl');
    var tmp1_elvis_lhs_0 = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg_4(this).yo5_1 : tmp0_elvis_lhs;
    tmp_2.qzl_1 = tmp1_elvis_lhs_0 == null ? 'http://localhost' : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('next');
    tmp_3.rzl_1 = tmp0_elvis_lhs_0 == null ? this.aqo().gq5() : tmp0_elvis_lhs_0;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(PhoneNumValidatorUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.szl_1 = Instance(this, tmp$ret$2, null).a5d(this, phoneNumValidatorUseCase$factory());
    this.tzl_1 = new ValidateEmailUseCase();
    this.uzl_1 = new ValidateUsernameUseCase_0();
    this.vzl_1 = new FilterUsernameUseCase();
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.wzl_1 = Instance(this, tmp$ret$4, null).a5d(this, genderConfig$factory_1());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.qqn().loa();
    var trigger = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_9 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp$ret$7 = tmp_9.h57(tmp$ret$6, context);
    var this_0 = On(this, tmp$ret$7, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_8.xzl_1 = Instance(this_0, tmp$ret$9, null).a5d(this, enqueueSavePictureUseCase$factory());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$11 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.yzl_1 = Instance(this_1, tmp$ret$11, null).a5d(this, addNewPersonUseCase$factory());
    var tmp_14 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    tmp_14.zzl_1 = tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1;
    this.cqo(Companion_getInstance_97().tq6_1);
    var tmp_15;
    if (hasFlag(this.ozl_1, 1)) {
      tmp_15 = this.aqo().moj(strings_getInstance().knl_1);
    } else {
      tmp_15 = _get_entityUid__ovkepw(this).equals(new Long(0, 0)) ? this.aqo().moj(strings_getInstance().qn1_1) : this.aqo().moj(strings_getInstance().rn1_1);
    }
    var title = tmp_15;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.eqn_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var tmp0_navigationVisible = !hasFlag(this.ozl_1, 1);
        var nextValue = new AppUiState(VOID, VOID, title, tmp0_navigationVisible, true);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.mzl_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.tzm(VOID, VOID, _get_genderConfig__kyr0zc_0(this).lq7_1, VOID, VOID, VOID, this.ozl_1);
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_16 = PersonEditViewModel$slambda_0(this, null);
    var tmp_17 = PersonEditViewModel$lambda(this);
    this.lqo(tmp_16, true, tmp_17, PersonEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(PersonEditViewModel).pzc = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.mzl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onEntityChanged.<anonymous>' call
        var tmp;
        var tmp_0 = entity == null ? null : entity.g96_1;
        var tmp1_safe_receiver = this.mzl_1.t2().azm_1;
        if (!(tmp_0 == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_1))) {
          var tmp_1;
          if (entity == null) {
            tmp_1 = null;
          } else {
            tmp_1 = shallowCopy(entity, PersonEditViewModel$onEntityChanged$lambda(this, entity));
          }
          tmp = tmp_1;
        } else {
          tmp = entity;
        }
        var tmp15_person = tmp;
        var tmp7_safe_receiver = prevValue.azm_1;
        var tmp_2 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.l96_1;
        var tmp16_genderError = this.lqu(tmp_2, entity == null ? null : entity.l96_1, prevValue.ozm_1);
        var tmp9_safe_receiver = prevValue.azm_1;
        var tmp_3 = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.h96_1;
        var tmp17_firstNameError = this.lqu(tmp_3, entity == null ? null : entity.h96_1, prevValue.pzm_1);
        var tmp11_safe_receiver = prevValue.azm_1;
        var tmp_4 = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.i96_1;
        var tmp18_lastNameError = this.lqu(tmp_4, entity == null ? null : entity.i96_1, prevValue.qzm_1);
        var tmp13_safe_receiver = prevValue.azm_1;
        var tmp_5 = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.k96_1;
        var tmp19_phoneNumError = this.lqu(tmp_5, entity == null ? null : entity.k96_1, prevValue.rzm_1);
        var tmp5_safe_receiver = prevValue.azm_1;
        var tmp_6 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.j96_1;
        var tmp20_emailError = this.lqu(tmp_6, entity == null ? null : entity.j96_1, prevValue.kzm_1);
        var tmp3_safe_receiver = prevValue.azm_1;
        var tmp_7 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.g96_1;
        var tmp21_usernameError = this.lqu(tmp_7, entity == null ? null : entity.g96_1, prevValue.hzm_1);
        var nextValue = prevValue.tzm(tmp15_person, VOID, VOID, VOID, VOID, VOID, VOID, tmp21_usernameError, VOID, VOID, tmp20_emailError, VOID, VOID, VOID, tmp16_genderError, tmp17_firstNameError, tmp18_lastNameError, tmp19_phoneNumError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_3.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.hqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_8 = this;
    var tmp_9 = this.rqn();
    tmp_8.hqt_1 = launch(tmp_9, VOID, VOID, PersonEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonEditViewModel).lzs = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.mzl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.tzm(VOID, password, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).mzs = function (pictureUri) {
    // Inline function 'kotlin.apply' call
    var this_0 = new PersonPicture();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
    var tmp = this_0;
    var tmp0_safe_receiver = this.mzl_1.t2().dzm_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e97_1;
    tmp.e97_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this_0.g97_1 = pictureUri;
    var personPicture = this_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.mzl_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.tzm(VOID, VOID, VOID, personPicture);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, PersonEditViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(PersonEditViewModel).nzs = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.mzl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onApprovalPersonParentJoinChanged.<anonymous>' call
        var nextValue = prevValue.tzm(VOID, VOID, VOID, VOID, VOID, personParentJoin);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).ozs = function (phoneNumSet) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.mzl_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onNationalPhoneNumSetChanged.<anonymous>' call
    if (!(this_0.t2().szm_1 === phoneNumSet)) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        while (true) {
          var prevValue = tmp0_safe_receiver.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onNationalPhoneNumSetChanged.<anonymous>' call
          var nextValue = prevValue.tzm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, phoneNumSet);
          if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(PersonEditViewModel).asa = function () {
    if (!this.mzl_1.t2().ezm_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.mzl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.tzm(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.cqo(Companion_getInstance_97().tq6_1);
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.mzl_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue_0 = prevValue_0.tzm(VOID, VOID, VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.mzl_1.t2().azm_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy(tmp0_safe_receiver, PersonEditViewModel$onClickSave$lambda);
    }
    var tmp1_elvis_lhs = tmp;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var savePerson = tmp_0;
    var requiredFieldMessage = this.aqo().moj(strings_getInstance().vmn_1);
    var currentTime = systemTimeInMillis();
    var isRegistrationMode = hasFlag(this.ozl_1, 1);
    var tmp2_safe_receiver = savePerson.j96_1;
    var tmp_1;
    if (tmp2_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
      tmp_1 = this.tzl_1.up9(tmp2_safe_receiver);
    }
    var validatedEmailAddr = tmp_1;
    var tmp_2;
    if (isRegistrationMode) {
      var tmp3_elvis_lhs = savePerson.g96_1;
      tmp_2 = this.uzl_1.up9(tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs);
    } else {
      tmp_2 = null;
    }
    var validationResult = tmp_2;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.mzl_1;
      while (true) {
        var prevValue_1 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var tmp_3;
        if (isRegistrationMode) {
          var tmp_4;
          if ((validationResult == null ? null : validationResult.upo_1) == null) {
            tmp_4 = null;
          } else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>.<anonymous>' call
            tmp_4 = this.aqo().moj(strings_getInstance().hmq_1);
          }
          tmp_3 = tmp_4;
        } else {
          tmp_3 = null;
        }
        var tmp3_usernameError = tmp_3;
        var tmp_5;
        var tmp_6;
        if (isRegistrationMode) {
          // Inline function 'kotlin.text.isNullOrBlank' call
          var this_3 = savePerson.g96_1;
          // Inline function 'kotlin.contracts.contract' call
          tmp_6 = this_3 == null ? true : isBlank(this_3);
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp_5 = this.aqo().moj(strings_getInstance().vmn_1);
        } else {
          tmp_5 = null;
        }
        var tmp4_passwordError = tmp_5;
        var tmp_7;
        if (savePerson.o96_1.c7(currentTime) > 0) {
          tmp_7 = this.aqo().moj(strings_getInstance().hmq_1);
        } else if (isRegistrationMode ? !isDateSet(savePerson.o96_1) : false) {
          tmp_7 = this.aqo().moj(strings_getInstance().vmn_1);
        } else {
          tmp_7 = null;
        }
        var tmp5_dateOfBirthError = tmp_7;
        var tmp_8;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_4 = savePerson.h96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_4 == null ? true : charSequenceLength(this_4) === 0) {
          tmp_8 = requiredFieldMessage;
        } else {
          tmp_8 = null;
        }
        var tmp6_firstNameError = tmp_8;
        var tmp_9;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_5 = savePerson.i96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_5 == null ? true : charSequenceLength(this_5) === 0) {
          tmp_9 = requiredFieldMessage;
        } else {
          tmp_9 = null;
        }
        var tmp7_lastNameError = tmp_9;
        var tmp_10;
        var tmp_11 = savePerson.l96_1;
        if (tmp_11 === 0) {
          tmp_10 = requiredFieldMessage;
        } else {
          tmp_10 = null;
        }
        var tmp8_genderError = tmp_10;
        var tmp_12;
        var tmp_13;
        if (this.mzl_1.t2().szm_1) {
          var tmp2_safe_receiver_0 = savePerson.k96_1;
          var tmp_14;
          if (tmp2_safe_receiver_0 == null) {
            tmp_14 = null;
          } else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>.<anonymous>' call
            tmp_14 = _get_phoneNumValidatorUseCase__4guu7i(this).iph(tmp2_safe_receiver_0);
          }
          tmp_13 = !(tmp_14 === true);
        } else {
          tmp_13 = false;
        }
        if (tmp_13) {
          tmp_12 = this.aqo().moj(strings_getInstance().hmq_1);
        } else {
          tmp_12 = null;
        }
        var tmp9_phoneNumError = tmp_12;
        var tmp_15;
        var tmp_16;
        // Inline function 'kotlin.text.isNullOrBlank' call
        var this_6 = savePerson.j96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (!(this_6 == null ? true : isBlank(this_6))) {
          tmp_16 = validatedEmailAddr == null;
        } else {
          tmp_16 = false;
        }
        if (tmp_16) {
          tmp_15 = this.aqo().moj(strings_getInstance().hmq_1);
        } else {
          tmp_15 = null;
        }
        var tmp10_emailError = tmp_15;
        var nextValue_1 = prevValue_1.tzm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_usernameError, VOID, tmp4_passwordError, tmp10_emailError, null, tmp5_dateOfBirthError, null, tmp8_genderError, tmp6_firstNameError, tmp7_lastNameError, tmp9_phoneNumError);
        if (this_2.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (hasErrors_4(this.mzl_1.t2(), this)) {
      this.cqo(Companion_getInstance_97().uq6_1);
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_7 = this.mzl_1;
        while (true) {
          var prevValue_2 = this_7.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
          var nextValue_2 = prevValue_2.tzm(VOID, VOID, VOID, VOID, true);
          if (this_7.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_17 = this.rqn();
    launch(tmp_17, VOID, VOID, PersonEditViewModel$onClickSave$slambda_0(isRegistrationMode, this, savePerson, requiredFieldMessage, null));
  };
  function PersonEditUiState(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().nq7_1 : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? null : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    usernameError = usernameError === VOID ? null : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? null : passwordConfirmedError;
    passwordError = passwordError === VOID ? null : passwordError;
    emailError = emailError === VOID ? null : emailError;
    confirmError = confirmError === VOID ? null : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    parentContactError = parentContactError === VOID ? null : parentContactError;
    genderError = genderError === VOID ? null : genderError;
    firstNameError = firstNameError === VOID ? null : firstNameError;
    lastNameError = lastNameError === VOID ? null : lastNameError;
    phoneNumError = phoneNumError === VOID ? null : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? false : nationalPhoneNumSet;
    this.azm_1 = person;
    this.bzm_1 = password;
    this.czm_1 = genderOptions;
    this.dzm_1 = personPicture;
    this.ezm_1 = fieldsEnabled;
    this.fzm_1 = approvalPersonParentJoin;
    this.gzm_1 = registrationMode;
    this.hzm_1 = usernameError;
    this.izm_1 = passwordConfirmedError;
    this.jzm_1 = passwordError;
    this.kzm_1 = emailError;
    this.lzm_1 = confirmError;
    this.mzm_1 = dateOfBirthError;
    this.nzm_1 = parentContactError;
    this.ozm_1 = genderError;
    this.pzm_1 = firstNameError;
    this.qzm_1 = lastNameError;
    this.rzm_1 = phoneNumError;
    this.szm_1 = nationalPhoneNumSet;
  }
  protoOf(PersonEditUiState).pzs = function () {
    return !(this.fzm_1 == null);
  };
  protoOf(PersonEditUiState).izj = function () {
    return !hasFlag(this.gzm_1, 1);
  };
  protoOf(PersonEditUiState).xyy = function () {
    return hasFlag(this.gzm_1, 1);
  };
  protoOf(PersonEditUiState).qzs = function () {
    return hasFlag(this.gzm_1, 1);
  };
  protoOf(PersonEditUiState).ozj = function () {
    return !hasFlag(this.gzm_1, 2);
  };
  protoOf(PersonEditUiState).nzj = function () {
    return !hasFlag(this.gzm_1, 2);
  };
  protoOf(PersonEditUiState).mzj = function () {
    return !hasFlag(this.gzm_1, 2);
  };
  protoOf(PersonEditUiState).rzs = function (person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) {
    return new PersonEditUiState(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet);
  };
  protoOf(PersonEditUiState).tzm = function (person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet, $super) {
    person = person === VOID ? this.azm_1 : person;
    password = password === VOID ? this.bzm_1 : password;
    genderOptions = genderOptions === VOID ? this.czm_1 : genderOptions;
    personPicture = personPicture === VOID ? this.dzm_1 : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? this.ezm_1 : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? this.fzm_1 : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? this.gzm_1 : registrationMode;
    usernameError = usernameError === VOID ? this.hzm_1 : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? this.izm_1 : passwordConfirmedError;
    passwordError = passwordError === VOID ? this.jzm_1 : passwordError;
    emailError = emailError === VOID ? this.kzm_1 : emailError;
    confirmError = confirmError === VOID ? this.lzm_1 : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? this.mzm_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.nzm_1 : parentContactError;
    genderError = genderError === VOID ? this.ozm_1 : genderError;
    firstNameError = firstNameError === VOID ? this.pzm_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.qzm_1 : lastNameError;
    phoneNumError = phoneNumError === VOID ? this.rzm_1 : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? this.szm_1 : nationalPhoneNumSet;
    return $super === VOID ? this.rzs(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) : $super.rzs.call(this, person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet);
  };
  protoOf(PersonEditUiState).toString = function () {
    return 'PersonEditUiState(person=' + this.azm_1 + ', password=' + this.bzm_1 + ', genderOptions=' + this.czm_1 + ', personPicture=' + this.dzm_1 + ', fieldsEnabled=' + this.ezm_1 + ', approvalPersonParentJoin=' + this.fzm_1 + ', registrationMode=' + this.gzm_1 + ', usernameError=' + this.hzm_1 + ', passwordConfirmedError=' + this.izm_1 + ', passwordError=' + this.jzm_1 + ', emailError=' + this.kzm_1 + ', confirmError=' + this.lzm_1 + ', dateOfBirthError=' + this.mzm_1 + ', parentContactError=' + this.nzm_1 + ', genderError=' + this.ozm_1 + ', firstNameError=' + this.pzm_1 + ', lastNameError=' + this.qzm_1 + ', phoneNumError=' + this.rzm_1 + ', nationalPhoneNumSet=' + this.szm_1 + ')';
  };
  protoOf(PersonEditUiState).hashCode = function () {
    var result = this.azm_1 == null ? 0 : this.azm_1.hashCode();
    result = imul(result, 31) + (this.bzm_1 == null ? 0 : getStringHashCode(this.bzm_1)) | 0;
    result = imul(result, 31) + hashCode(this.czm_1) | 0;
    result = imul(result, 31) + (this.dzm_1 == null ? 0 : this.dzm_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ezm_1) | 0;
    result = imul(result, 31) + (this.fzm_1 == null ? 0 : this.fzm_1.hashCode()) | 0;
    result = imul(result, 31) + this.gzm_1 | 0;
    result = imul(result, 31) + (this.hzm_1 == null ? 0 : getStringHashCode(this.hzm_1)) | 0;
    result = imul(result, 31) + (this.izm_1 == null ? 0 : getStringHashCode(this.izm_1)) | 0;
    result = imul(result, 31) + (this.jzm_1 == null ? 0 : getStringHashCode(this.jzm_1)) | 0;
    result = imul(result, 31) + (this.kzm_1 == null ? 0 : getStringHashCode(this.kzm_1)) | 0;
    result = imul(result, 31) + (this.lzm_1 == null ? 0 : getStringHashCode(this.lzm_1)) | 0;
    result = imul(result, 31) + (this.mzm_1 == null ? 0 : getStringHashCode(this.mzm_1)) | 0;
    result = imul(result, 31) + (this.nzm_1 == null ? 0 : getStringHashCode(this.nzm_1)) | 0;
    result = imul(result, 31) + (this.ozm_1 == null ? 0 : getStringHashCode(this.ozm_1)) | 0;
    result = imul(result, 31) + (this.pzm_1 == null ? 0 : getStringHashCode(this.pzm_1)) | 0;
    result = imul(result, 31) + (this.qzm_1 == null ? 0 : getStringHashCode(this.qzm_1)) | 0;
    result = imul(result, 31) + (this.rzm_1 == null ? 0 : getStringHashCode(this.rzm_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.szm_1) | 0;
    return result;
  };
  protoOf(PersonEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonEditUiState ? other : THROW_CCE();
    if (!equals(this.azm_1, tmp0_other_with_cast.azm_1))
      return false;
    if (!(this.bzm_1 == tmp0_other_with_cast.bzm_1))
      return false;
    if (!equals(this.czm_1, tmp0_other_with_cast.czm_1))
      return false;
    if (!equals(this.dzm_1, tmp0_other_with_cast.dzm_1))
      return false;
    if (!(this.ezm_1 === tmp0_other_with_cast.ezm_1))
      return false;
    if (!equals(this.fzm_1, tmp0_other_with_cast.fzm_1))
      return false;
    if (!(this.gzm_1 === tmp0_other_with_cast.gzm_1))
      return false;
    if (!(this.hzm_1 == tmp0_other_with_cast.hzm_1))
      return false;
    if (!(this.izm_1 == tmp0_other_with_cast.izm_1))
      return false;
    if (!(this.jzm_1 == tmp0_other_with_cast.jzm_1))
      return false;
    if (!(this.kzm_1 == tmp0_other_with_cast.kzm_1))
      return false;
    if (!(this.lzm_1 == tmp0_other_with_cast.lzm_1))
      return false;
    if (!(this.mzm_1 == tmp0_other_with_cast.mzm_1))
      return false;
    if (!(this.nzm_1 == tmp0_other_with_cast.nzm_1))
      return false;
    if (!(this.ozm_1 == tmp0_other_with_cast.ozm_1))
      return false;
    if (!(this.pzm_1 == tmp0_other_with_cast.pzm_1))
      return false;
    if (!(this.qzm_1 == tmp0_other_with_cast.qzm_1))
      return false;
    if (!(this.rzm_1 == tmp0_other_with_cast.rzm_1))
      return false;
    if (!(this.szm_1 === tmp0_other_with_cast.szm_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_9() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_4(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i(receiver);
    }, null);
  }
  function genderConfig$factory_1() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_0(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31(receiver);
    }, null);
  }
  function addNewPersonUseCase$factory() {
    return getPropertyCallableRef('addNewPersonUseCase', 1, KProperty1, function (receiver) {
      return _get_addNewPersonUseCase__raa2qa(receiver);
    }, null);
  }
  function apiUrlConfig$factory_10() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_4(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory_0() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i(receiver);
    }, null);
  }
  function genderConfig$factory_2() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_0(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_0() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31(receiver);
    }, null);
  }
  function addNewPersonUseCase$factory_0() {
    return getPropertyCallableRef('addNewPersonUseCase', 1, KProperty1, function (receiver) {
      return _get_addNewPersonUseCase__raa2qa(receiver);
    }, null);
  }
  function LearningSpaceListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.azt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).czt = function (learningSpaceList, $completion) {
    var tmp = this.dzt(learningSpaceList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.czt((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.azt_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.gzt(VOID, this.bzt_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).dzt = function (learningSpaceList, completion) {
    var i = new LearningSpaceListViewModel$slambda$slambda$slambda(this.azt_1, completion);
    i.bzt_1 = learningSpaceList;
    return i;
  };
  function LearningSpaceListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new LearningSpaceListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (learningSpaceList, $completion) {
      return i.czt(learningSpaceList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.pzt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.pzt_1.szu_1.yl3();
            var tmp_1 = LearningSpaceListViewModel$slambda$slambda$slambda_0(this.pzt_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_35(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda).l78 = function (completion) {
    return new LearningSpaceListViewModel$slambda$slambda(this.pzt_1, completion);
  };
  function LearningSpaceListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new LearningSpaceListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_impl__d88w17_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qzu_1;
    impl$factory_4();
    return this_0.t2();
  }
  function _get_goToLearningSpaceUseCase__yq7hh5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rzu_1;
    goToLearningSpaceUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_186() {
    this.tzu_1 = 'LearningSpaceList';
    this.uzu_1 = 'stateUrl';
  }
  var Companion_instance_235;
  function Companion_getInstance_203() {
    return Companion_instance_235;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_35(function_0) {
    this.vzu_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_35).t1d = function (value, $completion) {
    return this.vzu_1(value, $completion);
  };
  function LearningSpaceListViewModel$slambda(this$0, resultContinuation) {
    this.ezv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LearningSpaceListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LearningSpaceListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.ezv_1.vqv_1, LearningSpaceListViewModel$slambda$slambda_0(this.ezv_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LearningSpaceListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new LearningSpaceListViewModel$slambda(this.ezv_1, completion);
    i.fzv_1 = $this$launch;
    return i;
  };
  function LearningSpaceListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new LearningSpaceListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new LearningSpaceListUiState(), 'LearningSpaceList');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.qzu_1 = Instance(this, tmp$ret$0, null).a5d(this, impl$factory_3());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GoToLearningSpaceUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.rzu_1 = Instance(this, tmp$ret$2, null).a5d(this, goToLearningSpaceUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var tmp_4 = get_direct(di).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(CentralAppConfigDbDataSource), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_3.szu_1 = tmp_4.d58(tmp$ret$4, null).vl2();
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.<anonymous>' call
        var tmp0_title = _get_impl__d88w17_1(this).moj(strings_getInstance().gnq_1);
        var nextValue = prevValue.mq6(VOID, VOID, tmp0_title, false, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.vqv_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba(Companion_instance_235.uzu_1);
        var nextValue_0 = prevValue_0.gzt(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.rqn();
    launch(tmp_6, VOID, VOID, LearningSpaceListViewModel$slambda_0(this, null));
  }
  protoOf(LearningSpaceListViewModel).swk = function () {
    Companion_getInstance_218();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.onClickNext.<anonymous>' call
    Companion_getInstance_125();
    this.nqo(this_0, 'next');
    this.oqo(this_0, Companion_getInstance_213().kr7_1);
    var tmp$ret$2 = this_0.f3();
    this.cqn_1.rp6('LearningSpaceEnterLink', tmp$ret$2);
  };
  protoOf(LearningSpaceListViewModel).gzv = function (learningSpace) {
    var tmp;
    Companion_getInstance_213();
    var tmp_0 = this.aqn_1.ba('newOrExisting');
    Companion_getInstance_213();
    if (tmp_0 === 'new') {
      tmp = 'RegisterAgeRedirect';
    } else {
      tmp = 'Login';
    }
    var viewName = tmp;
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.onSelectLearningSpace.<anonymous>' call
    Companion_getInstance_125();
    this.nqo(this_0, 'next');
    this.oqo(this_0, Companion_getInstance_213().kr7_1);
    Companion_getInstance_116();
    this_0.s('learningSpaceUrl', learningSpace);
    var args = this_0.f3();
    _get_goToLearningSpaceUseCase__yq7hh5(this).opi(learningSpace, this.cqn_1, args, viewName);
  };
  protoOf(LearningSpaceListViewModel).pqw = function (searchText) {
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(LearningSpaceListViewModel).qqw = function () {
  };
  function LearningSpaceListUiState(siteLink, learningSpaces) {
    siteLink = siteLink === VOID ? '' : siteLink;
    learningSpaces = learningSpaces === VOID ? emptyList() : learningSpaces;
    this.ezt_1 = siteLink;
    this.fzt_1 = learningSpaces;
  }
  protoOf(LearningSpaceListUiState).hzv = function (siteLink, learningSpaces) {
    return new LearningSpaceListUiState(siteLink, learningSpaces);
  };
  protoOf(LearningSpaceListUiState).gzt = function (siteLink, learningSpaces, $super) {
    siteLink = siteLink === VOID ? this.ezt_1 : siteLink;
    learningSpaces = learningSpaces === VOID ? this.fzt_1 : learningSpaces;
    return $super === VOID ? this.hzv(siteLink, learningSpaces) : $super.hzv.call(this, siteLink, learningSpaces);
  };
  protoOf(LearningSpaceListUiState).toString = function () {
    return 'LearningSpaceListUiState(siteLink=' + this.ezt_1 + ', learningSpaces=' + this.fzt_1 + ')';
  };
  protoOf(LearningSpaceListUiState).hashCode = function () {
    var result = getStringHashCode(this.ezt_1);
    result = imul(result, 31) + hashCode(this.fzt_1) | 0;
    return result;
  };
  protoOf(LearningSpaceListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LearningSpaceListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LearningSpaceListUiState ? other : THROW_CCE();
    if (!(this.ezt_1 === tmp0_other_with_cast.ezt_1))
      return false;
    if (!equals(this.fzt_1, tmp0_other_with_cast.fzt_1))
      return false;
    return true;
  };
  function impl$factory_3() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_1(receiver);
    }, null);
  }
  function goToLearningSpaceUseCase$factory() {
    return getPropertyCallableRef('goToLearningSpaceUseCase', 1, KProperty1, function (receiver) {
      return _get_goToLearningSpaceUseCase__yq7hh5(receiver);
    }, null);
  }
  function impl$factory_4() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_1(receiver);
    }, null);
  }
  function goToLearningSpaceUseCase$factory_0() {
    return getPropertyCallableRef('goToLearningSpaceUseCase', 1, KProperty1, function (receiver) {
      return _get_goToLearningSpaceUseCase__yq7hh5(receiver);
    }, null);
  }
  function EmptyPagingSource() {
    PagingSource.call(this);
  }
  protoOf(EmptyPagingSource).p54 = function (params, $completion) {
    var tmp = Page_init_$Create$(emptyList(), null, null);
    return tmp instanceof LoadResult ? tmp : THROW_CCE();
  };
  function PersonListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function PersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.rzv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda$slambda).lqf = function (hasPermissionToList, $completion) {
    var tmp = this.mqf(hasPermissionToList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.rzv_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (this.szv_1) {
                tmp_0 = this.rzv_1.xzw_1;
              } else {
                tmp_0 = PersonListViewModel$slambda$slambda$slambda$lambda;
              }
              var tmp0_personList = tmp_0;
              var tmp1_showInviteViaLink = !(this.rzv_1.yzw_1 == null);
              var tmp2_inviteCode = this.rzv_1.yzw_1;
              var tmp3_showInviteViaContact = this.rzv_1.zzw_1;
              var nextValue = prevValue.lzx(tmp0_personList, VOID, VOID, VOID, tmp1_showInviteViaLink, tmp3_showInviteViaContact, tmp2_inviteCode, this.szv_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.rzv_1.eqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.eq6_1.wq5(this.szv_1));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).mqf = function (hasPermissionToList, completion) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this.rzv_1, completion);
    i.szv_1 = hasPermissionToList;
    return i;
  };
  function PersonListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermissionToList, $completion) {
      return i.lqf(hasPermissionToList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation) {
    this.uzx_1 = $hasPermissionToListFlow;
    this.vzx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(PersonListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.uzx_1);
            var tmp_1 = PersonListViewModel$slambda$slambda$slambda_0(this.vzx_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_36(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda).l78 = function (completion) {
    return new PersonListViewModel$slambda$slambda(this.uzx_1, this.vzx_1, completion);
  };
  function PersonListViewModel$slambda$slambda_0($hasPermissionToListFlow, this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.ezy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda_1).mt7 = function (it, $completion) {
    var tmp = this.nt7(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.mt7(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.fzy_1;
          var hasAddPermission = tmp0_container.y6();
          var hasViewAllPermission = tmp0_container.z6();
          var hasBulkAddPermission = hasAddPermission ? hasViewAllPermission : false;
          l$ret$1: do {
            var this_0 = this.ezy_1.vqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.lzx(VOID, VOID, VOID, this.ezy_1.aqw().equals(ListViewMode_PICKER_getInstance()) ? hasAddPermission : false, VOID, VOID, VOID, VOID, VOID, hasBulkAddPermission);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.ezy_1.eqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.mq6(prevValue_0.xq5_1.sq6(this.ezy_1.aqw().equals(ListViewMode_BROWSER_getInstance()) ? hasAddPermission : false));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda_1).nt7 = function (it, completion) {
    var i = new PersonListViewModel$slambda$slambda_1(this.ezy_1, completion);
    i.fzy_1 = it;
    return i;
  };
  function PersonListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mt7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_setClipboardStringUseCase__31i1s1_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.azx_1;
    setClipboardStringUseCase$factory_4();
    return this_0.t2();
  }
  function onClickFab($this) {
    if ($this.vqv_1.t2().kzx_1) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = $this.vqv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickFab.<anonymous>' call
          var nextValue = prevValue.lzx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      $this.qqw();
    }
  }
  function Companion_187() {
    Companion_instance_236 = this;
    this.gzy_1 = 'People';
    this.hzy_1 = 'PersonListHome';
    this.izy_1 = listOf(['People', 'PersonListHome']);
    this.jzy_1 = 'exlcudeFromClazz';
    this.kzy_1 = 'excludeAlreadySelectedList';
    this.lzy_1 = 'showAddViaInviteLink';
    this.mzy_1 = 'showAddViaContact';
    this.nzy_1 = 'role';
    this.ozy_1 = 'rptsl';
  }
  var Companion_instance_236;
  function Companion_getInstance_204() {
    if (Companion_instance_236 == null)
      new Companion_187();
    return Companion_instance_236;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_36(function_0) {
    this.pzy_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_36).t1d = function (value, $completion) {
    return this.pzy_1(value, $completion);
  };
  function PersonListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.wqn().n7d().og4(getSystemTimeInMillis(), this$0.tzw_1, this$0.vzw_1, this$0.sqn(), this$0.vqv_1.t2().dzx_1.tqc_1, toQueryLikeParam(this$0.eqn_1.t2().eq6_1.tq5_1));
    };
  }
  function PersonListViewModel$onClickFab$ref($boundThis) {
    var l = function () {
      onClickFab($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickFab';
    return l;
  }
  function PersonListViewModel$slambda(this$0, $hasPermissionToListFlow, resultContinuation) {
    this.yzy_1 = this$0;
    this.zzy_1 = $hasPermissionToListFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.yzy_1.vqv_1, PersonListViewModel$slambda$slambda_0(this.zzy_1, this.yzy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonListViewModel$slambda(this.yzy_1, this.zzy_1, completion);
    i.azz_1 = $this$launch;
    return i;
  };
  function PersonListViewModel$slambda_0(this$0, $hasPermissionToListFlow, resultContinuation) {
    var i = new PersonListViewModel$slambda(this$0, $hasPermissionToListFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda_1(this$0, resultContinuation) {
    this.jzz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.jzz_1.wqn().p7f();
            var tmp_1 = this.jzz_1.sqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            var tmp_3 = tmp_0.vi0(tmp_1, tmp_2, new Long(8192, 0));
            var tmp_4 = PersonListViewModel$slambda$slambda_2(this.jzz_1, null);
            suspendResult = tmp_3.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_36(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new PersonListViewModel$slambda_1(this.jzz_1, completion);
    i.kzz_1 = $this$launch;
    return i;
  };
  function PersonListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_204();
    destinationName = destinationName === VOID ? 'People' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new PersonListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('exlcudeFromClazz');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.tzw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('role');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.uzw_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.ba('excludeAlreadySelectedList');
    var tmp1_safe_receiver = tmp0_safe_receiver_1 == null ? null : split(tmp0_safe_receiver_1, [',']);
    var tmp_2;
    if (tmp1_safe_receiver == null) {
      tmp_2 = null;
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = tmp1_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.isNotEmpty' call
        if (charSequenceLength(element) > 0) {
          destination.i1(element);
        }
      }
      tmp_2 = destination;
    }
    var tmp2_safe_receiver = tmp_2;
    var tmp_3;
    if (tmp2_safe_receiver == null) {
      tmp_3 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_safe_receiver, 10));
      var tmp0_iterator_0 = tmp2_safe_receiver.w();
      while (tmp0_iterator_0.f()) {
        var item = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var tmp$ret$4 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
        var tmp$ret$5 = toLong_0(tmp$ret$4);
        destination_0.i1(tmp$ret$5);
      }
      tmp_3 = destination_0;
    }
    var tmp3_elvis_lhs = tmp_3;
    var tmp_4;
    if (tmp3_elvis_lhs == null) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_4 = emptyList();
    } else {
      tmp_4 = tmp3_elvis_lhs;
    }
    tmp_1.vzw_1 = tmp_4;
    var tmp_5 = this;
    var tmp0_safe_receiver_2 = savedStateHandle.ba('rptsl');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_5.wzw_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_6 = this;
    tmp_6.xzw_1 = PersonListViewModel$pagingSourceFactory$lambda(this);
    this.yzw_1 = savedStateHandle.ba('showAddViaInviteLink');
    this.zzw_1 = savedStateHandle.ba('showAddViaContact') === 'true';
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.azx_1 = Instance(this, tmp$ret$9, null).a5d(this, setClipboardStringUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.<anonymous>' call
        var tmp1_searchState = this.dqx(false);
        Companion_getInstance_125();
        var tmp0_elvis_lhs = savedStateHandle.ba('t');
        var tmp2_title = tmp0_elvis_lhs == null ? this.mqx(strings_getInstance().smu_1, strings_getInstance().nnl_1) : tmp0_elvis_lhs;
        var tmp_9 = this.aqo().moj(strings_getInstance().pn1_1);
        var tmp_10 = FabIcon_ADD_getInstance();
        var tmp3_fabState = new FabUiState(VOID, tmp_9, tmp_10, PersonListViewModel$onClickFab$ref(this));
        var nextValue = prevValue.mq6(tmp3_fabState, VOID, tmp2_title, true, VOID, VOID, VOID, tmp1_searchState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_11;
    if (this.wzw_1.equals(new Long(0, 0))) {
      tmp_11 = flowOf(true);
    } else {
      tmp_11 = this.wqn().p7f().ui0(this.sqn(), this.wzw_1);
    }
    var hasPermissionToListFlow = tmp_11;
    var tmp_12 = this.rqn();
    launch(tmp_12, VOID, VOID, PersonListViewModel$slambda_0(this, hasPermissionToListFlow, null));
    var tmp_13 = this.rqn();
    launch(tmp_13, VOID, VOID, PersonListViewModel$slambda_2(this, null));
  }
  protoOf(PersonListViewModel).pqw = function (searchText) {
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).nsz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.lzx(VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqv_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).lzz = function () {
    if (this.yzw_1 == null)
      return Unit_instance;
    Companion_getInstance_125();
    this.cqn_1.rp6('InviteWithLink', mapOf_0(to('inviteCode', this.yzw_1)));
  };
  protoOf(PersonListViewModel).mzz = function () {
    var tmp0_safe_receiver = this.vqv_1.t2().hzx_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickCopyInviteCode.<anonymous>' call
      _get_setClipboardStringUseCase__31i1s1_1(this).wp1(tmp0_safe_receiver);
      this.yqn().bq7(new Snack(this.aqo().moj(strings_getInstance().sn8_1)));
    }
  };
  protoOf(PersonListViewModel).nzz = function () {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickInviteViaContact.<anonymous>' call
    this_0.s('person_role', this.uzw_1.toString());
    this_0.s('clazz_uid', this.tzw_1.toString());
    var args = this_0.f3();
    this.cqn_1.rp6('invite_via_contact', args);
  };
  protoOf(PersonListViewModel).ozz = function () {
    this.cqn_1.rp6('BulkAddPersonSelectFile', emptyMap());
  };
  protoOf(PersonListViewModel).qqw = function () {
    Companion_getInstance_202();
    var tmp0_safe_receiver = this.aqn_1.ba('goToOnPersonSelected');
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickAdd.<anonymous>' call
      tmp = mapOf_0(to('goToOnPersonSelected', tmp0_safe_receiver));
    }
    var tmp1_elvis_lhs = tmp;
    this.iqx('PersonEditView', tmp1_elvis_lhs == null ? emptyMap() : tmp1_elvis_lhs);
  };
  protoOf(PersonListViewModel).pzz = function (entry) {
    var goToOnPersonSelected = this.aqn_1.ba('goToOnPersonSelected');
    if (!(goToOnPersonSelected == null)) {
      var tmp = UMFileUtil_getInstance().parseURLQueryString(goToOnPersonSelected);
      Companion_getInstance_116();
      var args = plus_0(tmp, mapOf_0(to('personUid', entry.f96_1.toString())));
      var goToDestName = substringBefore_0(goToOnPersonSelected, '?');
      var popUpTo = this.aqn_1.ba('popUpToOnPersonSelected');
      this.cqn_1.lq9(goToDestName, args, new UstadGoOptions(popUpTo, true));
    } else {
      this.lqx('PersonDetailView', entry.f96_1, entry);
    }
  };
  protoOf(PersonListViewModel).qzz = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onDismissAddSheetOrDialog.<anonymous>' call
        var nextValue = prevValue.lzx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  function PersonListUiState$_init_$lambda_st3t8h() {
    return new EmptyPagingSource();
  }
  function PersonListUiState(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) {
    var tmp;
    if (personList === VOID) {
      tmp = PersonListUiState$_init_$lambda_st3t8h;
    } else {
      tmp = personList;
    }
    personList = tmp;
    var tmp_0;
    if (sortOptions === VOID) {
      var tmp_1 = strings_getInstance().cmk_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, true);
      var tmp_3 = strings_getInstance().cmk_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, false);
      var tmp_5 = strings_getInstance().bmk_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, true);
      var tmp_7 = strings_getInstance().bmk_1;
      tmp_0 = listOf([tmp_2, tmp_4, tmp_6, new SortOrderOption(tmp_7, 4, false)]);
    } else {
      tmp_0 = sortOptions;
    }
    sortOptions = tmp_0;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showAddItem = showAddItem === VOID ? false : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? false : showInviteViaLink;
    showInviteViaContact = showInviteViaContact === VOID ? false : showInviteViaContact;
    inviteCode = inviteCode === VOID ? null : inviteCode;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? false : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? false : hasBulkImportPermission;
    this.bzx_1 = personList;
    this.czx_1 = sortOptions;
    this.dzx_1 = sortOption;
    this.ezx_1 = showAddItem;
    this.fzx_1 = showInviteViaLink;
    this.gzx_1 = showInviteViaContact;
    this.hzx_1 = inviteCode;
    this.izx_1 = showSortOptions;
    this.jzx_1 = addSheetOrDialogVisible;
    this.kzx_1 = hasBulkImportPermission;
  }
  protoOf(PersonListUiState).rzz = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) {
    return new PersonListUiState(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).lzx = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission, $super) {
    personList = personList === VOID ? this.bzx_1 : personList;
    sortOptions = sortOptions === VOID ? this.czx_1 : sortOptions;
    sortOption = sortOption === VOID ? this.dzx_1 : sortOption;
    showAddItem = showAddItem === VOID ? this.ezx_1 : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? this.fzx_1 : showInviteViaLink;
    showInviteViaContact = showInviteViaContact === VOID ? this.gzx_1 : showInviteViaContact;
    inviteCode = inviteCode === VOID ? this.hzx_1 : inviteCode;
    showSortOptions = showSortOptions === VOID ? this.izx_1 : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? this.jzx_1 : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? this.kzx_1 : hasBulkImportPermission;
    return $super === VOID ? this.rzz(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) : $super.rzz.call(this, personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).toString = function () {
    return 'PersonListUiState(personList=' + this.bzx_1 + ', sortOptions=' + this.czx_1 + ', sortOption=' + this.dzx_1 + ', showAddItem=' + this.ezx_1 + ', showInviteViaLink=' + this.fzx_1 + ', showInviteViaContact=' + this.gzx_1 + ', inviteCode=' + this.hzx_1 + ', showSortOptions=' + this.izx_1 + ', addSheetOrDialogVisible=' + this.jzx_1 + ', hasBulkImportPermission=' + this.kzx_1 + ')';
  };
  protoOf(PersonListUiState).hashCode = function () {
    var result = hashCode(this.bzx_1);
    result = imul(result, 31) + hashCode(this.czx_1) | 0;
    result = imul(result, 31) + this.dzx_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ezx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fzx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gzx_1) | 0;
    result = imul(result, 31) + (this.hzx_1 == null ? 0 : getStringHashCode(this.hzx_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.izx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jzx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kzx_1) | 0;
    return result;
  };
  protoOf(PersonListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonListUiState ? other : THROW_CCE();
    if (!equals(this.bzx_1, tmp0_other_with_cast.bzx_1))
      return false;
    if (!equals(this.czx_1, tmp0_other_with_cast.czx_1))
      return false;
    if (!this.dzx_1.equals(tmp0_other_with_cast.dzx_1))
      return false;
    if (!(this.ezx_1 === tmp0_other_with_cast.ezx_1))
      return false;
    if (!(this.fzx_1 === tmp0_other_with_cast.fzx_1))
      return false;
    if (!(this.gzx_1 === tmp0_other_with_cast.gzx_1))
      return false;
    if (!(this.hzx_1 == tmp0_other_with_cast.hzx_1))
      return false;
    if (!(this.izx_1 === tmp0_other_with_cast.izx_1))
      return false;
    if (!(this.jzx_1 === tmp0_other_with_cast.jzx_1))
      return false;
    if (!(this.kzx_1 === tmp0_other_with_cast.kzx_1))
      return false;
    return true;
  };
  function setClipboardStringUseCase$factory_3() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_1(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_4() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_1(receiver);
    }, null);
  }
  function ManageAccountViewModel$slambda$slambda(this$0, resultContinuation) {
    this.a100_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda$slambda).c100 = function (it, $completion) {
    var tmp = this.d100(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ManageAccountViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.c100((p1 == null ? true : p1 instanceof PersonAuth2) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.a100_1.d101_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.o101(VOID, VOID, VOID, VOID, VOID, this.b100_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ManageAccountViewModel$slambda$slambda).d100 = function (it, completion) {
    var i = new ManageAccountViewModel$slambda$slambda(this.a100_1, completion);
    i.b100_1 = it;
    return i;
  };
  function ManageAccountViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.c100(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.x101_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda$slambda_1).z101 = function (it, $completion) {
    var tmp = this.a102(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ManageAccountViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.z101((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.x101_1.d101_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_showCreatePasskey = this.y101_1.c1();
              var tmp1_passkeyCount = this.y101_1.u();
              var nextValue = prevValue.o101(tmp1_passkeyCount, tmp0_showCreatePasskey);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ManageAccountViewModel$slambda$slambda_1).a102 = function (it, completion) {
    var i = new ManageAccountViewModel$slambda$slambda_1(this.x101_1, completion);
    i.y101_1 = it;
    return i;
  };
  function ManageAccountViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.z101(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_apiUrlConfig__mldllg_5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.c101_1;
    apiUrlConfig$factory_12();
    return this_0.t2();
  }
  function _get_createPasskeyUseCase__ryoxza($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.e101_1;
    createPasskeyUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_188() {
    this.b102_1 = 'ManageAccount';
    this.c102_1 = 'PersonFullName';
    this.d102_1 = 'PersonUsername';
  }
  var Companion_instance_237;
  function Companion_getInstance_205() {
    return Companion_instance_237;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_37(function_0) {
    this.e102_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_37).t1d = function (value, $completion) {
    return this.e102_1(value, $completion);
  };
  function ManageAccountViewModel$slambda(this$0, resultContinuation) {
    this.n102_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ManageAccountViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.n102_1.tqn().wk2().a7f().zfz(this.n102_1.z100_1);
            var tmp_1 = ManageAccountViewModel$slambda$slambda_0(this.n102_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_37(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ManageAccountViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ManageAccountViewModel$slambda(this.n102_1, completion);
    i.o102_1 = $this$launch;
    return i;
  };
  function ManageAccountViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel$slambda_1($di, this$0, resultContinuation) {
    this.x102_1 = $di;
    this.y102_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ManageAccountViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var this_0 = this.x102_1;
            var context = new LearningSpace(_get_apiUrlConfig__mldllg_5(this.y102_1).xo5_1);
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.a103_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).vk2();
            this.b103_1 = this.a103_1.b7g().ugz(this.y102_1.qqn().joa().vky_1);
            this.hd_1 = 1;
            var tmp_5 = ManageAccountViewModel$slambda$slambda_2(this.y102_1, null);
            suspendResult = this.b103_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_37(tmp_5), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ManageAccountViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ManageAccountViewModel$slambda_1(this.x102_1, this.y102_1, completion);
    i.z102_1 = $this$launch;
    return i;
  };
  function ManageAccountViewModel$slambda_2($di, this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda_1($di, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'ManageAccount');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.z100_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('PersonFullName');
    tmp_0.a101_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp_1 = this;
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('PersonUsername');
    tmp_1.b101_1 = tmp0_elvis_lhs_0 == null ? '' : tmp0_elvis_lhs_0;
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.c101_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_11());
    this.d101_1 = MutableStateFlow(new ManageAccountUiState());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(CreatePasskeyUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.e101_1 = InstanceOrNull(this, tmp$ret$2, null).a5d(this, createPasskeyUseCase$factory());
    this.f101_1 = asStateFlow(this.d101_1);
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(_get_apiUrlConfig__mldllg_5(this).xo5_1);
    var trigger = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_7 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$5 = tmp_7.h57(tmp$ret$4, context);
    var tmp$ret$6 = On(di, tmp$ret$5, trigger);
    var tmp_9 = get_direct(tmp$ret$6).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(SavePersonPasskeyUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_6.g101_1 = tmp_9.e58(tmp$ret$7, null);
    var tmp_11 = this.rqn();
    launch(tmp_11, VOID, VOID, ManageAccountViewModel$slambda_0(this, null));
    var tmp_12;
    if (savedStateHandle.ba('listMode') === ListViewMode_PICKER_getInstance().zqj_1) {
      tmp_12 = this.aqo().moj(strings_getInstance().qna_1);
    } else {
      tmp_12 = this.aqo().moj(strings_getInstance().xml_1);
    }
    var tmp0_title = tmp_12;
    this.eqn_1.x1k(new AppUiState(VOID, VOID, tmp0_title, false, VOID, VOID, false));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.d101_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.manageaccount.ManageAccountViewModel.<anonymous>' call
        var tmp0_personUsername = this.b101_1;
        var tmp1_personName = this.a101_1;
        var tmp2_passkeySupported = !(_get_createPasskeyUseCase__ryoxza(this) == null) ? this.qqn().joa().vky_1.equals(this.z100_1) : false;
        var nextValue = prevValue.o101(VOID, VOID, tmp2_passkeySupported, tmp1_personName, tmp0_personUsername);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_13 = this.rqn();
    launch(tmp_13, VOID, VOID, ManageAccountViewModel$slambda_2(di, this, null));
  }
  protoOf(ManageAccountViewModel).c103 = function () {
    Companion_getInstance_125();
    this.cqn_1.rp6('AccountEdit', mapOf_0(to('entityUid', this.z100_1.toString())));
  };
  function ManageAccountUiState(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText) {
    passkeyCount = passkeyCount === VOID ? 0 : passkeyCount;
    showCreatePasskey = showCreatePasskey === VOID ? false : showCreatePasskey;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    personName = personName === VOID ? '' : personName;
    personUsername = personUsername === VOID ? '' : personUsername;
    personAuth = personAuth === VOID ? null : personAuth;
    errorText = errorText === VOID ? null : errorText;
    this.h101_1 = passkeyCount;
    this.i101_1 = showCreatePasskey;
    this.j101_1 = passkeySupported;
    this.k101_1 = personName;
    this.l101_1 = personUsername;
    this.m101_1 = personAuth;
    this.n101_1 = errorText;
  }
  protoOf(ManageAccountUiState).d103 = function (passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText) {
    return new ManageAccountUiState(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText);
  };
  protoOf(ManageAccountUiState).o101 = function (passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText, $super) {
    passkeyCount = passkeyCount === VOID ? this.h101_1 : passkeyCount;
    showCreatePasskey = showCreatePasskey === VOID ? this.i101_1 : showCreatePasskey;
    passkeySupported = passkeySupported === VOID ? this.j101_1 : passkeySupported;
    personName = personName === VOID ? this.k101_1 : personName;
    personUsername = personUsername === VOID ? this.l101_1 : personUsername;
    personAuth = personAuth === VOID ? this.m101_1 : personAuth;
    errorText = errorText === VOID ? this.n101_1 : errorText;
    return $super === VOID ? this.d103(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText) : $super.d103.call(this, passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, errorText);
  };
  protoOf(ManageAccountUiState).toString = function () {
    return 'ManageAccountUiState(passkeyCount=' + this.h101_1 + ', showCreatePasskey=' + this.i101_1 + ', passkeySupported=' + this.j101_1 + ', personName=' + this.k101_1 + ', personUsername=' + this.l101_1 + ', personAuth=' + this.m101_1 + ', errorText=' + this.n101_1 + ')';
  };
  protoOf(ManageAccountUiState).hashCode = function () {
    var result = this.h101_1;
    result = imul(result, 31) + getBooleanHashCode(this.i101_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.j101_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.k101_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.l101_1) | 0;
    result = imul(result, 31) + (this.m101_1 == null ? 0 : hashCode(this.m101_1)) | 0;
    result = imul(result, 31) + (this.n101_1 == null ? 0 : getStringHashCode(this.n101_1)) | 0;
    return result;
  };
  protoOf(ManageAccountUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ManageAccountUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ManageAccountUiState ? other : THROW_CCE();
    if (!(this.h101_1 === tmp0_other_with_cast.h101_1))
      return false;
    if (!(this.i101_1 === tmp0_other_with_cast.i101_1))
      return false;
    if (!(this.j101_1 === tmp0_other_with_cast.j101_1))
      return false;
    if (!(this.k101_1 === tmp0_other_with_cast.k101_1))
      return false;
    if (!(this.l101_1 === tmp0_other_with_cast.l101_1))
      return false;
    if (!equals(this.m101_1, tmp0_other_with_cast.m101_1))
      return false;
    if (!(this.n101_1 == tmp0_other_with_cast.n101_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_11() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_5(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza(receiver);
    }, null);
  }
  function apiUrlConfig$factory_12() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_5(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_0() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza(receiver);
    }, null);
  }
  function Companion_189() {
    this.e103_1 = 'RegisterAgeRedirect';
  }
  var Companion_instance_238;
  function Companion_getInstance_206() {
    return Companion_instance_238;
  }
  function RegisterAgeRedirectViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.swk();
      return Unit_instance;
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function RegisterAgeRedirectViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'RegisterAgeRedirect');
    this.a104_1 = MutableStateFlow(new RegisterAgeRedirectUiState(VOID, systemTimeInMillis()));
    this.b104_1 = asStateFlow(this.a104_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.<anonymous>' call
        var tmp0_title = this.aqo().moj(strings_getInstance().vnp_1);
        var tmp = this.aqo().moj(strings_getInstance().vmj_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, RegisterAgeRedirectViewModel$onClickNext$ref(this));
        var nextValue = prevValue.mq6(VOID, VOID, tmp0_title, false, VOID, VOID, false, VOID, tmp1_actionBarButtonState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(RegisterAgeRedirectViewModel).c104 = function (date) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.a104_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onSetDate.<anonymous>' call
        var nextValue = prevValue.g104(date, VOID, !prevValue.d104_1.equals(date) ? null : prevValue.f104_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(RegisterAgeRedirectViewModel).swk = function () {
    var date = this.a104_1.t2().d104_1;
    if (date.equals(new Long(0, 0))) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.a104_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.g104(VOID, VOID, this.aqo().moj(strings_getInstance().vmn_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    // Inline function 'kotlin.Long.minus' call
    var this_1 = systemTimeInMillis();
    var other = imul(24, get_MS_PER_HOUR());
    var tmp$ret$2 = this_1.mc(toLong(other));
    if (date.c7(tmp$ret$2) > 0) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.a104_1;
        while (true) {
          var prevValue_0 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue_0 = prevValue_0.g104(VOID, VOID, this.aqo().moj(strings_getInstance().hmq_1));
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_instance;
    }
    var dateOfBirthInstant = Companion_getInstance_6().fmh(date);
    var isMinor = isDateOfBirthAMinor(dateOfBirthInstant);
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_3 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
    this.oqo(this_3, Companion_getInstance_213().kr7_1);
    Companion_getInstance_125();
    this.nqo(this_3, 'next');
    this_3.s('showAccept', 'true');
    Companion_getInstance_202();
    this_3.s('DateOfBirth', date.toString());
    var args = this_3.f3();
    if (!isMinor) {
      this.cqn_1.rp6('Terms', args);
    }
  };
  function RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError) {
    dateOfBirth = dateOfBirth === VOID ? new Long(0, 0) : dateOfBirth;
    var tmp;
    if (maxDate === VOID) {
      Companion_getInstance_2();
      tmp = new Long(-1, 2147483647);
    } else {
      tmp = maxDate;
    }
    maxDate = tmp;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    this.d104_1 = dateOfBirth;
    this.e104_1 = maxDate;
    this.f104_1 = dateOfBirthError;
  }
  protoOf(RegisterAgeRedirectUiState).h104 = function (dateOfBirth, maxDate, dateOfBirthError) {
    return new RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).g104 = function (dateOfBirth, maxDate, dateOfBirthError, $super) {
    dateOfBirth = dateOfBirth === VOID ? this.d104_1 : dateOfBirth;
    maxDate = maxDate === VOID ? this.e104_1 : maxDate;
    dateOfBirthError = dateOfBirthError === VOID ? this.f104_1 : dateOfBirthError;
    return $super === VOID ? this.h104(dateOfBirth, maxDate, dateOfBirthError) : $super.h104.call(this, dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).toString = function () {
    return 'RegisterAgeRedirectUiState(dateOfBirth=' + this.d104_1.toString() + ', maxDate=' + this.e104_1.toString() + ', dateOfBirthError=' + this.f104_1 + ')';
  };
  protoOf(RegisterAgeRedirectUiState).hashCode = function () {
    var result = this.d104_1.hashCode();
    result = imul(result, 31) + this.e104_1.hashCode() | 0;
    result = imul(result, 31) + (this.f104_1 == null ? 0 : getStringHashCode(this.f104_1)) | 0;
    return result;
  };
  protoOf(RegisterAgeRedirectUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterAgeRedirectUiState))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterAgeRedirectUiState ? other : THROW_CCE();
    if (!this.d104_1.equals(tmp0_other_with_cast.d104_1))
      return false;
    if (!this.e104_1.equals(tmp0_other_with_cast.e104_1))
      return false;
    if (!(this.f104_1 == tmp0_other_with_cast.f104_1))
      return false;
    return true;
  };
  function Companion_190() {
    this.i104_1 = 'WaitForParent';
    this.j104_1 = 'username';
    this.k104_1 = 'password';
    this.l104_1 = 'parentContact';
  }
  var Companion_instance_239;
  function Companion_getInstance_207() {
    return Companion_instance_239;
  }
  function RegisterMinorWaitForParentViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'WaitForParent');
    this.h105_1 = MutableStateFlow(new RegisterMinorWaitForParentUiState());
    this.i105_1 = asStateFlow(this.h105_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().nmk_1), false, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.h105_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba('username');
        var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
        var tmp1_elvis_lhs = savedStateHandle.ba('password');
        var tmp_0 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
        var tmp2_elvis_lhs = savedStateHandle.ba('parentContact');
        var nextValue_0 = prevValue_0.m105(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(RegisterMinorWaitForParentViewModel).n105 = function () {
    this.cqn_1.mq9('WaitForParent', true);
  };
  function RegisterMinorWaitForParentUiState(username, password, parentContact) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    parentContact = parentContact === VOID ? '' : parentContact;
    this.j105_1 = username;
    this.k105_1 = password;
    this.l105_1 = parentContact;
  }
  protoOf(RegisterMinorWaitForParentUiState).m105 = function (username, password, parentContact) {
    return new RegisterMinorWaitForParentUiState(username, password, parentContact);
  };
  protoOf(RegisterMinorWaitForParentUiState).toString = function () {
    return 'RegisterMinorWaitForParentUiState(username=' + this.j105_1 + ', password=' + this.k105_1 + ', parentContact=' + this.l105_1 + ')';
  };
  protoOf(RegisterMinorWaitForParentUiState).hashCode = function () {
    var result = getStringHashCode(this.j105_1);
    result = imul(result, 31) + getStringHashCode(this.k105_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.l105_1) | 0;
    return result;
  };
  protoOf(RegisterMinorWaitForParentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterMinorWaitForParentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterMinorWaitForParentUiState ? other : THROW_CCE();
    if (!(this.j105_1 === tmp0_other_with_cast.j105_1))
      return false;
    if (!(this.k105_1 === tmp0_other_with_cast.k105_1))
      return false;
    if (!(this.l105_1 === tmp0_other_with_cast.l105_1))
      return false;
    return true;
  };
  function RedirectViewModel$slambda$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function RedirectViewModel$slambda$lambda_0($di) {
    return function (it) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var this_0 = $di;
      var trigger = this_0.d57();
      // Inline function 'org.kodein.di.diContext' call
      var tmp = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
      var tmp$ret$1 = tmp.h57(tmp$ret$0, it);
      var tmp$ret$2 = On(this_0, tmp$ret$1, trigger);
      var tmp_1 = get_direct(tmp$ret$2).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_2 = typeToken(createKType(getKClass(CheckRegistrationAllowedUseCase), arrayOf([]), false));
      var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
      return tmp_1.d58(tmp$ret$3, null);
    };
  }
  function _get_apiUrlConfig__mldllg_6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.l106_1;
    apiUrlConfig$factory_14();
    return this_0.t2();
  }
  function Companion_191() {
    this.m106_1 = '';
  }
  var Companion_instance_240;
  function Companion_getInstance_208() {
    return Companion_instance_240;
  }
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1(function_0) {
    this.n106_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1).cpj = function (url, target) {
    return this.n106_1(url, target);
  };
  function RedirectViewModel$slambda(this$0, $destinationArg, $destination, $di, resultContinuation) {
    this.w106_1 = this$0;
    this.x106_1 = $destinationArg;
    this.y106_1 = $destination;
    this.z106_1 = $di;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(RedirectViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(RedirectViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(RedirectViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_$receiver = this.w106_1.cqn_1;
          var tmp1_accountManager = this.w106_1.qqn();
          var tmp_0 = RedirectViewModel$slambda$lambda;
          var tmp2_openExternalLinkUseCase = new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1(tmp_0);
          var tmp3_userCanSelectServer = _get_apiUrlConfig__mldllg_6(this.w106_1).ao6_1;
          var tmp4_goOptions = new UstadGoOptions(VOID, VOID, true);
          var tmp5_forceAccountSelection = !(this.x106_1 == null);
          var tmp6_presetLearningSpaceUrl = _get_apiUrlConfig__mldllg_6(this.w106_1).yo5_1;
          navigateToLink(tmp0_$receiver, this.y106_1, tmp1_accountManager, tmp2_openExternalLinkUseCase, tmp4_goOptions, tmp5_forceAccountSelection, tmp3_userCanSelectServer, VOID, VOID, VOID, VOID, tmp6_presetLearningSpaceUrl, RedirectViewModel$slambda$lambda_0(this.z106_1));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(RedirectViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new RedirectViewModel$slambda(this.w106_1, this.x106_1, this.y106_1, this.z106_1, completion);
    i.a107_1 = $this$launch;
    return i;
  };
  function RedirectViewModel$slambda_0(this$0, $destinationArg, $destination, $di, resultContinuation) {
    var i = new RedirectViewModel$slambda(this$0, $destinationArg, $destination, $di, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RedirectViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, '');
    var tmp = this;
    Companion_getInstance_116();
    tmp.j106_1 = savedStateHandle.ba('next');
    var tmp_0 = this;
    Companion_getInstance_116();
    tmp_0.k106_1 = savedStateHandle.ba('openLink');
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.l106_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_13());
    this.eqn_1.x1k(new AppUiState(VOID, VOID, VOID, false, VOID, VOID, VOID, VOID, VOID, VOID, true));
    var tmp0_elvis_lhs = this.k106_1;
    var destinationArg = tmp0_elvis_lhs == null ? this.j106_1 : tmp0_elvis_lhs;
    var activeLearningSpace = this.qqn().loa();
    if (!contains(activeLearningSpace.wnt_1, 'localhost')) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var tmp_3 = get_direct(di).f58();
      // Inline function 'org.kodein.di.diContext' call
      var tmp_4 = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_5 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
      var tmp$ret$3 = tmp_4.h57(tmp$ret$2, activeLearningSpace);
      var tmp_6 = tmp_3.c58(tmp$ret$3).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$5 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var db = tmp_6.d58(tmp$ret$5, 1);
      println(db);
    }
    var tmp_8;
    if (destinationArg == null) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var context = this.qqn().uo9().pnu_1;
      var trigger = di.d57();
      // Inline function 'org.kodein.di.diContext' call
      var tmp_9 = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_10 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$7 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
      var tmp$ret$8 = tmp_9.h57(tmp$ret$7, context);
      var tmp$ret$9 = On(di, tmp$ret$8, trigger);
      var tmp_11 = get_direct(tmp$ret$9).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_12 = typeToken(createKType(getKClass(GetDefaultDestinationUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
      tmp_8 = tmp_11.d58(tmp$ret$10, null).xpe();
    } else {
      tmp_8 = destinationArg;
    }
    var destination = tmp_8;
    var tmp_13 = this.rqn();
    launch(tmp_13, VOID, VOID, RedirectViewModel$slambda_0(this, destinationArg, destination, di, null));
  }
  function apiUrlConfig$factory_13() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_6(receiver);
    }, null);
  }
  function apiUrlConfig$factory_14() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_6(receiver);
    }, null);
  }
  function ScheduleEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda).k107 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.k107(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).yny = function (it, completion) {
    var i = new ScheduleEditViewModel$slambda$slambda(completion);
    i.j107_1 = it;
    return i;
  };
  function ScheduleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.k107(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.t107_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda_1).w107 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.w107($completion);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.u107_1 = new Schedule();
            var tmp_1 = this;
            tmp_1.v107_1 = this.u107_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.t107_1.uqn());
            suspendResult = tmp_2.o62(21, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.v107_1.uhe_1 = ARGUMENT;
            this.v107_1.ghf_1 = true;
            this.v107_1.zhe_1 = Companion_instance_29.xkv_1;
            return this.u107_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new ScheduleEditViewModel$slambda$slambda_1(this.t107_1, completion);
  };
  function ScheduleEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.w107($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ScheduleEditViewModel$slambda$lambda(this$0) {
    return function (schedule) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.u108_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.a109(schedule);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_192() {
    this.b109_1 = 'ScheduleEdit';
  }
  var Companion_instance_241;
  function Companion_getInstance_209() {
    return Companion_instance_241;
  }
  function ScheduleEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ScheduleEditViewModel$slambda(this$0, resultContinuation) {
    this.k109_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.m109_1 = Companion_instance_29.n4r();
            this.hd_1 = 1;
            var tmp_0 = ScheduleEditViewModel$slambda$slambda_0(null);
            var tmp_1 = ScheduleEditViewModel$slambda$slambda_2(this.k109_1, null);
            suspendResult = this.k109_1.kqo(this.m109_1, VOID, VOID, tmp_0, tmp_1, ScheduleEditViewModel$slambda$lambda(this.k109_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.k109_1.u108_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.a109(VOID, VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ScheduleEditViewModel$slambda(this.k109_1, completion);
    i.l109_1 = $this$launch;
    return i;
  };
  function ScheduleEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ScheduleEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.v109_1 = $commitDelay;
    this.w109_1 = $entity;
    this.x109_1 = $this;
    this.y109_1 = $key;
    this.z109_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.v109_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.w109_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.x109_1.gqo(this.x109_1.aqn_1, this.y109_1, this.z109_1, this.w109_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ScheduleEditViewModel$onEntityChanged$slambda(this.v109_1, this.w109_1, this.x109_1, this.y109_1, this.z109_1, completion);
    i.a10a_1 = $this$launch;
    return i;
  };
  function ScheduleEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ScheduleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ScheduleEdit');
    this.u108_1 = MutableStateFlow(new ScheduleEditUiState(VOID, VOID, VOID, false));
    this.v108_1 = asStateFlow(this.u108_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>' call
        var tmp0_title = this.kqu(strings_getInstance().ymu_1, strings_getInstance().zmu_1);
        var tmp = this.aqo().moj(strings_getInstance().qmr_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, ScheduleEditViewModel$onClickSave$ref(this));
        var nextValue = prevValue.mq6(VOID, VOID, tmp0_title, VOID, true, VOID, VOID, VOID, tmp1_actionBarButtonState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, ScheduleEditViewModel$slambda_0(this, null));
  }
  protoOf(ScheduleEditViewModel).b10a = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.u108_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.onEntityChanged.<anonymous>' call
        var tmp2_safe_receiver = prevValue.w108_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vhe_1;
        var tmp4_toTimeError = this.lqu(tmp, entity == null ? null : entity.vhe_1, prevValue.y108_1);
        var tmp0_safe_receiver = prevValue.w108_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.whe_1;
        var tmp5_fromTimeError = this.lqu(tmp_0, entity == null ? null : entity.whe_1, prevValue.x108_1);
        var nextValue = prevValue.a109(entity, tmp5_fromTimeError, tmp4_toTimeError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_29.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.rqn();
    tmp_1.hqt_1 = launch(tmp_2, VOID, VOID, ScheduleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ScheduleEditViewModel).asa = function () {
    var tmp0_elvis_lhs = this.u108_1.t2().w108_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var schedule = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.u108_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.onClickSave.<anonymous>' call
        var tmp_0;
        if (schedule.vhe_1.equals(new Long(0, 0))) {
          tmp_0 = this.aqo().moj(strings_getInstance().vmn_1);
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        if (schedule.whe_1.equals(new Long(0, 0))) {
          tmp_2 = this.aqo().moj(strings_getInstance().vmn_1);
        } else if (schedule.whe_1.c7(schedule.vhe_1) <= 0) {
          tmp_2 = this.aqo().moj(strings_getInstance().pn9_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.a109(VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (this.u108_1.t2().x108_1 == null ? this.u108_1.t2().y108_1 == null : false) {
      this.lqt(schedule);
    }
  };
  function ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    fromTimeError = fromTimeError === VOID ? null : fromTimeError;
    toTimeError = toTimeError === VOID ? null : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.w108_1 = entity;
    this.x108_1 = fromTimeError;
    this.y108_1 = toTimeError;
    this.z108_1 = fieldsEnabled;
  }
  protoOf(ScheduleEditUiState).c10a = function (entity, fromTimeError, toTimeError, fieldsEnabled) {
    return new ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).a109 = function (entity, fromTimeError, toTimeError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.w108_1 : entity;
    fromTimeError = fromTimeError === VOID ? this.x108_1 : fromTimeError;
    toTimeError = toTimeError === VOID ? this.y108_1 : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? this.z108_1 : fieldsEnabled;
    return $super === VOID ? this.c10a(entity, fromTimeError, toTimeError, fieldsEnabled) : $super.c10a.call(this, entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).toString = function () {
    return 'ScheduleEditUiState(entity=' + this.w108_1 + ', fromTimeError=' + this.x108_1 + ', toTimeError=' + this.y108_1 + ', fieldsEnabled=' + this.z108_1 + ')';
  };
  protoOf(ScheduleEditUiState).hashCode = function () {
    var result = this.w108_1 == null ? 0 : this.w108_1.hashCode();
    result = imul(result, 31) + (this.x108_1 == null ? 0 : getStringHashCode(this.x108_1)) | 0;
    result = imul(result, 31) + (this.y108_1 == null ? 0 : getStringHashCode(this.y108_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.z108_1) | 0;
    return result;
  };
  protoOf(ScheduleEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScheduleEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScheduleEditUiState ? other : THROW_CCE();
    if (!equals(this.w108_1, tmp0_other_with_cast.w108_1))
      return false;
    if (!(this.x108_1 == tmp0_other_with_cast.x108_1))
      return false;
    if (!(this.y108_1 == tmp0_other_with_cast.y108_1))
      return false;
    if (!(this.z108_1 === tmp0_other_with_cast.z108_1))
      return false;
    return true;
  };
  function Companion_193() {
    this.d10a_1 = 'DevSettings';
    this.e10a_1 = 'showDevSettings';
  }
  var Companion_instance_242;
  function Companion_getInstance_210() {
    return Companion_instance_242;
  }
  function SettingsViewModel$slambda$slambda(this$0, resultContinuation) {
    this.n10a_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda$slambda).lqf = function (siteAdminSettingsVisible, $completion) {
    var tmp = this.mqf(siteAdminSettingsVisible, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SettingsViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.n10a_1.k10b_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.t10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.o10a_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SettingsViewModel$slambda$slambda).mqf = function (siteAdminSettingsVisible, completion) {
    var i = new SettingsViewModel$slambda$slambda(this.n10a_1, completion);
    i.o10a_1 = siteAdminSettingsVisible;
    return i;
  };
  function SettingsViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SettingsViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (siteAdminSettingsVisible, $completion) {
      return i.lqf(siteAdminSettingsVisible, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_supportedLangConfig__llzj1v($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.m10b_1;
    supportedLangConfig$factory_0();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.n10b_1;
    setLanguageUseCase$factory_4();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplayOptsUseCase__lppxoi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.p10b_1;
    getHtmlContentDisplayOptsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplaySettingUseCase__usawf4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.q10b_1;
    getHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setHtmlContentDisplaySettingUseCase__8cgzqk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.r10b_1;
    setHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.s10b_1;
    getVersionUseCase$factory_4();
    return this_0.t2();
  }
  function _get_enableNearbySharingUseCase__zat9e6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.t10b_1;
    enableNearbySharingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_settings__lbkut4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.v10b_1;
    settings$factory_0();
    return this_0.t2();
  }
  function _get_zipFileUseCase__jhxb01($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.w10b_1;
    zipFileUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_194() {
    this.u10c_1 = 'Settings';
  }
  var Companion_instance_243;
  function Companion_getInstance_211() {
    return Companion_instance_243;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_38(function_0) {
    this.v10c_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_38).t1d = function (value, $completion) {
    return this.v10c_1(value, $completion);
  };
  function SettingsViewModel$slambda(this$0, resultContinuation) {
    this.e10d_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SettingsViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.e10d_1.wqn().p7f();
            var tmp_1 = this.e10d_1.sqn();
            PermissionFlags_getInstance();
            var tmp_2 = tmp_0.ui0(tmp_1, new Long(16384, 0));
            var tmp_3 = SettingsViewModel$slambda$slambda_0(this.e10d_1, null);
            suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_38(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SettingsViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SettingsViewModel$slambda(this.e10d_1, completion);
    i.f10d_1 = $this$launch;
    return i;
  };
  function SettingsViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SettingsViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SettingsViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'Settings');
    this.k10b_1 = MutableStateFlow(new SettingsUiState());
    this.l10b_1 = asStateFlow(this.k10b_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.m10b_1 = Instance(this, tmp$ret$0, null).a5d(this, supportedLangConfig$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.n10b_1 = Instance(this, tmp$ret$2, null).a5d(this, setLanguageUseCase$factory_3());
    this.o10b_1 = _get_supportedLangConfig__llzj1v(this).aq8(this.aqo());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(GetHtmlContentDisplayEngineOptionsUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.p10b_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, getHtmlContentDisplayOptsUseCase$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(GetHtmlContentDisplayEngineUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.q10b_1 = InstanceOrNull(this, tmp$ret$6, null).a5d(this, getHtmlContentDisplaySettingUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SetHtmlContentDisplayEngineUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.r10b_1 = InstanceOrNull(this, tmp$ret$8, null).a5d(this, setHtmlContentDisplaySettingUseCase$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.s10b_1 = Instance(this, tmp$ret$10, null).a5d(this, getVersionUseCase$factory_3());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(SetLocalSharingEnabledUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.t10b_1 = InstanceOrNull(this, tmp$ret$12, null).a5d(this, enableNearbySharingUseCase$factory());
    this.u10b_1 = atomic$int$1(0);
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(Settings), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.v10b_1 = Instance(this, tmp$ret$14, null).a5d(this, settings$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(ZipFileUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.w10b_1 = Instance(this, tmp$ret$16, null).a5d(this, zipFileUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().vmk_1), VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = _get_supportedLangConfig__llzj1v(this).sq7();
    var tmp_17;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_96();
      tmp_17 = '';
    } else {
      tmp_17 = tmp0_elvis_lhs;
    }
    var langSetting = tmp_17;
    var tmp$ret$21;
    $l$block_0: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = this.o10b_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        if (element.hq4_1 === langSetting) {
          tmp$ret$21 = element;
          break $l$block_0;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    var currentLang = tmp$ret$21;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.k10b_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var tmp3_currentLanguage = currentLang.iq4_1;
        var tmp4_availableLanguages = this.o10b_1;
        var tmp0_safe_receiver = _get_getHtmlContentDisplayOptsUseCase__lppxoi(this);
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xpe();
        var tmp5_htmlContentDisplayOptions = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
        var tmp2_safe_receiver = _get_getHtmlContentDisplaySettingUseCase__usawf4(this);
        var tmp6_currentHtmlContentDisplayOption = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.xpe();
        var tmp7_version = _get_getVersionUseCase__n7x57g_1(this).xpe().vpe_1;
        var tmp_18 = _get_settings__lbkut4(this);
        var tmp8_showDeveloperOptions = tmp_18.am8('showDevSettings', false);
        var tmp9_storageAndDataSettingsVisible = !(_get_enableNearbySharingUseCase__zat9e6(this) == null);
        var nextValue_0 = prevValue_0.t10c(VOID, VOID, VOID, VOID, VOID, VOID, tmp5_htmlContentDisplayOptions, tmp6_currentHtmlContentDisplayOption, VOID, VOID, VOID, VOID, VOID, tmp3_currentLanguage, tmp4_availableLanguages, VOID, tmp8_showDeveloperOptions, tmp7_version, VOID, VOID, VOID, tmp9_storageAndDataSettingsVisible);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_1;
        }
      }
    }
    var tmp_19 = this.rqn();
    launch(tmp_19, VOID, VOID, SettingsViewModel$slambda_0(this, null));
  }
  protoOf(SettingsViewModel).g10d = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.k10b_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLanguage.<anonymous>' call
        var nextValue = prevValue.t10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).h10d = function (lang) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.k10b_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
        var nextValue = prevValue.t10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var result = _get_setLanguageUseCase__st7nci_1(this).npi(lang, 'Settings', this.cqn_1);
    if (result.lpi_1) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.k10b_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
          var nextValue_0 = prevValue_0.t10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    } else {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.k10b_1;
        while (true) {
          var prevValue_1 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
          var nextValue_1 = prevValue_1.t10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, lang.iq4_1);
          if (this_2.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(SettingsViewModel).lz9 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.k10b_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onDismissLangDialog.<anonymous>' call
        var nextValue = prevValue.t10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).i10d = function () {
    this.cqn_1.rp6('Community', emptyMap());
  };
  protoOf(SettingsViewModel).j10d = function () {
    this.cqn_1.rp6('DeletedItems', emptyMap());
  };
  function SettingsUiState(sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, storageAndDataSettingsVisible) {
    sendAppOptionVisible = sendAppOptionVisible === VOID ? false : sendAppOptionVisible;
    selectedBackupFolderUri = selectedBackupFolderUri === VOID ? null : selectedBackupFolderUri;
    selectedBackupFolderName = selectedBackupFolderName === VOID ? null : selectedBackupFolderName;
    isCreatingBackup = isCreatingBackup === VOID ? false : isCreatingBackup;
    backupProgress = backupProgress === VOID ? 0.0 : backupProgress;
    selectedBackupPath = selectedBackupPath === VOID ? null : selectedBackupPath;
    htmlContentDisplayOptions = htmlContentDisplayOptions === VOID ? emptyList() : htmlContentDisplayOptions;
    currentHtmlContentDisplayOption = currentHtmlContentDisplayOption === VOID ? null : currentHtmlContentDisplayOption;
    holidayCalendarVisible = holidayCalendarVisible === VOID ? false : holidayCalendarVisible;
    workspaceSettingsVisible = workspaceSettingsVisible === VOID ? false : workspaceSettingsVisible;
    reasonLeavingVisible = reasonLeavingVisible === VOID ? false : reasonLeavingVisible;
    langDialogVisible = langDialogVisible === VOID ? false : langDialogVisible;
    htmlContentDisplayDialogVisible = htmlContentDisplayDialogVisible === VOID ? false : htmlContentDisplayDialogVisible;
    currentLanguage = currentLanguage === VOID ? '' : currentLanguage;
    availableLanguages = availableLanguages === VOID ? emptyList() : availableLanguages;
    waitForRestartDialogVisible = waitForRestartDialogVisible === VOID ? false : waitForRestartDialogVisible;
    showDeveloperOptions = showDeveloperOptions === VOID ? false : showDeveloperOptions;
    version = version === VOID ? '' : version;
    storageOptions = storageOptions === VOID ? emptyList() : storageOptions;
    selectedOfflineStorageOption = selectedOfflineStorageOption === VOID ? null : selectedOfflineStorageOption;
    storageOptionsDialogVisible = storageOptionsDialogVisible === VOID ? false : storageOptionsDialogVisible;
    storageAndDataSettingsVisible = storageAndDataSettingsVisible === VOID ? false : storageAndDataSettingsVisible;
    this.x10b_1 = sendAppOptionVisible;
    this.y10b_1 = selectedBackupFolderUri;
    this.z10b_1 = selectedBackupFolderName;
    this.a10c_1 = isCreatingBackup;
    this.b10c_1 = backupProgress;
    this.c10c_1 = selectedBackupPath;
    this.d10c_1 = htmlContentDisplayOptions;
    this.e10c_1 = currentHtmlContentDisplayOption;
    this.f10c_1 = holidayCalendarVisible;
    this.g10c_1 = workspaceSettingsVisible;
    this.h10c_1 = reasonLeavingVisible;
    this.i10c_1 = langDialogVisible;
    this.j10c_1 = htmlContentDisplayDialogVisible;
    this.k10c_1 = currentLanguage;
    this.l10c_1 = availableLanguages;
    this.m10c_1 = waitForRestartDialogVisible;
    this.n10c_1 = showDeveloperOptions;
    this.o10c_1 = version;
    this.p10c_1 = storageOptions;
    this.q10c_1 = selectedOfflineStorageOption;
    this.r10c_1 = storageOptionsDialogVisible;
    this.s10c_1 = storageAndDataSettingsVisible;
  }
  protoOf(SettingsUiState).k10d = function (sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, storageAndDataSettingsVisible) {
    return new SettingsUiState(sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, storageAndDataSettingsVisible);
  };
  protoOf(SettingsUiState).t10c = function (sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, storageAndDataSettingsVisible, $super) {
    sendAppOptionVisible = sendAppOptionVisible === VOID ? this.x10b_1 : sendAppOptionVisible;
    selectedBackupFolderUri = selectedBackupFolderUri === VOID ? this.y10b_1 : selectedBackupFolderUri;
    selectedBackupFolderName = selectedBackupFolderName === VOID ? this.z10b_1 : selectedBackupFolderName;
    isCreatingBackup = isCreatingBackup === VOID ? this.a10c_1 : isCreatingBackup;
    backupProgress = backupProgress === VOID ? this.b10c_1 : backupProgress;
    selectedBackupPath = selectedBackupPath === VOID ? this.c10c_1 : selectedBackupPath;
    htmlContentDisplayOptions = htmlContentDisplayOptions === VOID ? this.d10c_1 : htmlContentDisplayOptions;
    currentHtmlContentDisplayOption = currentHtmlContentDisplayOption === VOID ? this.e10c_1 : currentHtmlContentDisplayOption;
    holidayCalendarVisible = holidayCalendarVisible === VOID ? this.f10c_1 : holidayCalendarVisible;
    workspaceSettingsVisible = workspaceSettingsVisible === VOID ? this.g10c_1 : workspaceSettingsVisible;
    reasonLeavingVisible = reasonLeavingVisible === VOID ? this.h10c_1 : reasonLeavingVisible;
    langDialogVisible = langDialogVisible === VOID ? this.i10c_1 : langDialogVisible;
    htmlContentDisplayDialogVisible = htmlContentDisplayDialogVisible === VOID ? this.j10c_1 : htmlContentDisplayDialogVisible;
    currentLanguage = currentLanguage === VOID ? this.k10c_1 : currentLanguage;
    availableLanguages = availableLanguages === VOID ? this.l10c_1 : availableLanguages;
    waitForRestartDialogVisible = waitForRestartDialogVisible === VOID ? this.m10c_1 : waitForRestartDialogVisible;
    showDeveloperOptions = showDeveloperOptions === VOID ? this.n10c_1 : showDeveloperOptions;
    version = version === VOID ? this.o10c_1 : version;
    storageOptions = storageOptions === VOID ? this.p10c_1 : storageOptions;
    selectedOfflineStorageOption = selectedOfflineStorageOption === VOID ? this.q10c_1 : selectedOfflineStorageOption;
    storageOptionsDialogVisible = storageOptionsDialogVisible === VOID ? this.r10c_1 : storageOptionsDialogVisible;
    storageAndDataSettingsVisible = storageAndDataSettingsVisible === VOID ? this.s10c_1 : storageAndDataSettingsVisible;
    return $super === VOID ? this.k10d(sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, storageAndDataSettingsVisible) : $super.k10d.call(this, sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, storageAndDataSettingsVisible);
  };
  protoOf(SettingsUiState).toString = function () {
    return 'SettingsUiState(sendAppOptionVisible=' + this.x10b_1 + ', selectedBackupFolderUri=' + this.y10b_1 + ', selectedBackupFolderName=' + this.z10b_1 + ', isCreatingBackup=' + this.a10c_1 + ', backupProgress=' + this.b10c_1 + ', selectedBackupPath=' + this.c10c_1 + ', htmlContentDisplayOptions=' + this.d10c_1 + ', currentHtmlContentDisplayOption=' + this.e10c_1 + ', holidayCalendarVisible=' + this.f10c_1 + ', workspaceSettingsVisible=' + this.g10c_1 + ', reasonLeavingVisible=' + this.h10c_1 + ', langDialogVisible=' + this.i10c_1 + ', htmlContentDisplayDialogVisible=' + this.j10c_1 + ', currentLanguage=' + this.k10c_1 + ', availableLanguages=' + this.l10c_1 + ', waitForRestartDialogVisible=' + this.m10c_1 + ', showDeveloperOptions=' + this.n10c_1 + ', version=' + this.o10c_1 + ', storageOptions=' + this.p10c_1 + ', selectedOfflineStorageOption=' + this.q10c_1 + ', storageOptionsDialogVisible=' + this.r10c_1 + ', storageAndDataSettingsVisible=' + this.s10c_1 + ')';
  };
  protoOf(SettingsUiState).hashCode = function () {
    var result = getBooleanHashCode(this.x10b_1);
    result = imul(result, 31) + (this.y10b_1 == null ? 0 : getStringHashCode(this.y10b_1)) | 0;
    result = imul(result, 31) + (this.z10b_1 == null ? 0 : getStringHashCode(this.z10b_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.a10c_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.b10c_1) | 0;
    result = imul(result, 31) + (this.c10c_1 == null ? 0 : getStringHashCode(this.c10c_1)) | 0;
    result = imul(result, 31) + hashCode(this.d10c_1) | 0;
    result = imul(result, 31) + (this.e10c_1 == null ? 0 : this.e10c_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.f10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.g10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.h10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.i10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.j10c_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.k10c_1) | 0;
    result = imul(result, 31) + hashCode(this.l10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.m10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.n10c_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.o10c_1) | 0;
    result = imul(result, 31) + hashCode(this.p10c_1) | 0;
    result = imul(result, 31) + (this.q10c_1 == null ? 0 : this.q10c_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.r10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.s10c_1) | 0;
    return result;
  };
  protoOf(SettingsUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SettingsUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SettingsUiState ? other : THROW_CCE();
    if (!(this.x10b_1 === tmp0_other_with_cast.x10b_1))
      return false;
    if (!(this.y10b_1 == tmp0_other_with_cast.y10b_1))
      return false;
    if (!(this.z10b_1 == tmp0_other_with_cast.z10b_1))
      return false;
    if (!(this.a10c_1 === tmp0_other_with_cast.a10c_1))
      return false;
    if (!equals(this.b10c_1, tmp0_other_with_cast.b10c_1))
      return false;
    if (!(this.c10c_1 == tmp0_other_with_cast.c10c_1))
      return false;
    if (!equals(this.d10c_1, tmp0_other_with_cast.d10c_1))
      return false;
    if (!equals(this.e10c_1, tmp0_other_with_cast.e10c_1))
      return false;
    if (!(this.f10c_1 === tmp0_other_with_cast.f10c_1))
      return false;
    if (!(this.g10c_1 === tmp0_other_with_cast.g10c_1))
      return false;
    if (!(this.h10c_1 === tmp0_other_with_cast.h10c_1))
      return false;
    if (!(this.i10c_1 === tmp0_other_with_cast.i10c_1))
      return false;
    if (!(this.j10c_1 === tmp0_other_with_cast.j10c_1))
      return false;
    if (!(this.k10c_1 === tmp0_other_with_cast.k10c_1))
      return false;
    if (!equals(this.l10c_1, tmp0_other_with_cast.l10c_1))
      return false;
    if (!(this.m10c_1 === tmp0_other_with_cast.m10c_1))
      return false;
    if (!(this.n10c_1 === tmp0_other_with_cast.n10c_1))
      return false;
    if (!(this.o10c_1 === tmp0_other_with_cast.o10c_1))
      return false;
    if (!equals(this.p10c_1, tmp0_other_with_cast.p10c_1))
      return false;
    if (!equals(this.q10c_1, tmp0_other_with_cast.q10c_1))
      return false;
    if (!(this.r10c_1 === tmp0_other_with_cast.r10c_1))
      return false;
    if (!(this.s10c_1 === tmp0_other_with_cast.s10c_1))
      return false;
    return true;
  };
  function supportedLangConfig$factory() {
    return getPropertyCallableRef('supportedLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLangConfig__llzj1v(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_3() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_1(receiver);
    }, null);
  }
  function getHtmlContentDisplayOptsUseCase$factory() {
    return getPropertyCallableRef('getHtmlContentDisplayOptsUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplayOptsUseCase__lppxoi(receiver);
    }, null);
  }
  function getHtmlContentDisplaySettingUseCase$factory() {
    return getPropertyCallableRef('getHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplaySettingUseCase__usawf4(receiver);
    }, null);
  }
  function setHtmlContentDisplaySettingUseCase$factory() {
    return getPropertyCallableRef('setHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setHtmlContentDisplaySettingUseCase__8cgzqk(receiver);
    }, null);
  }
  function getVersionUseCase$factory_3() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_1(receiver);
    }, null);
  }
  function enableNearbySharingUseCase$factory() {
    return getPropertyCallableRef('enableNearbySharingUseCase', 1, KProperty1, function (receiver) {
      return _get_enableNearbySharingUseCase__zat9e6(receiver);
    }, null);
  }
  function settings$factory() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4(receiver);
    }, null);
  }
  function zipFileUseCase$factory() {
    return getPropertyCallableRef('zipFileUseCase', 1, KProperty1, function (receiver) {
      return _get_zipFileUseCase__jhxb01(receiver);
    }, null);
  }
  function supportedLangConfig$factory_0() {
    return getPropertyCallableRef('supportedLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLangConfig__llzj1v(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_4() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_1(receiver);
    }, null);
  }
  function getHtmlContentDisplayOptsUseCase$factory_0() {
    return getPropertyCallableRef('getHtmlContentDisplayOptsUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplayOptsUseCase__lppxoi(receiver);
    }, null);
  }
  function getHtmlContentDisplaySettingUseCase$factory_0() {
    return getPropertyCallableRef('getHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplaySettingUseCase__usawf4(receiver);
    }, null);
  }
  function setHtmlContentDisplaySettingUseCase$factory_0() {
    return getPropertyCallableRef('setHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setHtmlContentDisplaySettingUseCase__8cgzqk(receiver);
    }, null);
  }
  function getVersionUseCase$factory_4() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_1(receiver);
    }, null);
  }
  function enableNearbySharingUseCase$factory_0() {
    return getPropertyCallableRef('enableNearbySharingUseCase', 1, KProperty1, function (receiver) {
      return _get_enableNearbySharingUseCase__zat9e6(receiver);
    }, null);
  }
  function settings$factory_0() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4(receiver);
    }, null);
  }
  function zipFileUseCase$factory_0() {
    return getPropertyCallableRef('zipFileUseCase', 1, KProperty1, function (receiver) {
      return _get_zipFileUseCase__jhxb01(receiver);
    }, null);
  }
  function Companion_195() {
    this.l10d_1 = 'otheroption';
    this.m10d_1 = 'otheroptionperson';
    this.n10d_1 = 'otheroptionpersonprofilepic';
    this.o10d_1 = 'isparent';
  }
  var Companion_instance_244;
  function Companion_getInstance_212() {
    return Companion_instance_244;
  }
  function SignUpViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda).xz9 = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.xz9(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda).yny = function (it, completion) {
    var i = new SignUpViewModel$slambda$slambda(completion);
    i.x10d_1 = it;
    return i;
  };
  function SignUpViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.xz9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_1).hza = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.hza($completion);
  };
  protoOf(SignUpViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Person();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda_1).l78 = function (completion) {
    return new SignUpViewModel$slambda$slambda_1(completion);
  };
  function SignUpViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.hza($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SignUpViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.d10f_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp1_safe_receiver = it == null ? null : it.ckr();
          var tmp;
          if (tmp1_safe_receiver == null) {
            tmp = null;
          } else {
            // Inline function 'kotlin.text.trim' call
            tmp = toString(trim(isCharSequence(tmp1_safe_receiver) ? tmp1_safe_receiver : THROW_CCE()));
          }
          var tmp2_elvis_lhs = tmp;
          var nextValue = prevValue.j10g(it, VOID, VOID, VOID, VOID, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SignUpViewModel$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_3).ezn = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.ezn(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda_3).yny = function (it, completion) {
    var i = new SignUpViewModel$slambda$slambda_3(completion);
    i.s10g_1 = it;
    return i;
  };
  function SignUpViewModel$slambda$slambda_4(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda_3(resultContinuation);
    var l = function (it, $completion) {
      return i.ezn(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_5).nzn = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda$slambda_5).m78 = function ($completion) {
    return this.nzn($completion);
  };
  protoOf(SignUpViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new PersonPicture();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda_5).l78 = function (completion) {
    return new SignUpViewModel$slambda$slambda_5(completion);
  };
  function SignUpViewModel$slambda$slambda_6(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.nzn($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SignUpViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.d10f_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.j10g(VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SignUpViewModel$onFullNameFocusedChanged$slambda$lambda($suggestedUsername) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.g96_1 = $suggestedUsername;
      return Unit_instance;
    };
  }
  function SignUpViewModel$onClickSignup$slambda$lambda($e) {
    return function () {
      return 'exception ' + $e.message;
    };
  }
  function _get_apiUrlConfig__mldllg_7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.g10f_1;
    apiUrlConfig$factory_16();
    return this_0.t2();
  }
  function _get_getLocalAccountsSupportedUseCase__hoi7c7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.h10f_1;
    getLocalAccountsSupportedUseCase$factory_0();
    return this_0.t2();
  }
  function _get_createPasskeyUseCase__ryoxza_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.j10f_1;
    createPasskeyUseCase$factory_2();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.l10f_1;
    genderConfig$factory_4();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.p10f_1;
    enqueueSavePictureUseCase$factory_2();
    return this_0.t2();
  }
  function hasErrors_5(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.z10f_1 == null) ? true : !(_this__u8e3s4.y10f_1 == null)) ? true : !(_this__u8e3s4.g10g_1 == null);
  }
  function navigateToAppropriateScreen($this, savePerson) {
    if ($this.d10f_1.t2().a10g_1) {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.navigateToAppropriateScreen.<anonymous>' call
      Companion_getInstance_125();
      this_0.s('next', $this.e10f_1);
      $this.oqo(this_0, Companion_getInstance_213().kr7_1);
      Companion_getInstance_125();
      $this.nqo(this_0, 'next');
      var tmp$ret$2 = this_0.f3();
      $this.cqn_1.rp6('AddChildProfile', tmp$ret$2);
    } else {
      var goOptions = new UstadGoOptions(VOID, VOID, true);
      var tmp = Napier_getInstance();
      tmp.k5e(VOID, VOID, SignUpViewModel$navigateToAppropriateScreen$lambda($this));
      $this.mqu($this.cqn_1, appendSelectedAccount($this.e10f_1, savePerson.f96_1, new LearningSpace($this.qqn().loa().wnt_1)), goOptions);
    }
  }
  function enrollToCourseFromInviteUid($this, personUid, $completion) {
    var tmp = new $enrollToCourseFromInviteUidCOROUTINE$79($this, personUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_196() {
    Companion_instance_245 = this;
    this.dr7_1 = 'picState';
    this.er7_1 = 'SignUp';
    this.fr7_1 = 'DateOfBirth';
    this.gr7_1 = 'personalAccount';
    this.hr7_1 = 'newOrExisting';
    this.ir7_1 = 'new';
    this.jr7_1 = 'existing';
    var tmp = this;
    Companion_getInstance_116();
    Companion_getInstance_116();
    Companion_getInstance_202();
    tmp.kr7_1 = listOf(['learningSpaceUrl', 'showAccept', 'popUpToOnFinish', 'DateOfBirth', 'RegMode', 'newOrExisting', 'personalAccount']);
    this.lr7_1 = 'SignupWithUsernameAndPassword';
  }
  var Companion_instance_245;
  function Companion_getInstance_213() {
    if (Companion_instance_245 == null)
      new Companion_196();
    return Companion_instance_245;
  }
  function SignUpViewModel$slambda(this$0, resultContinuation) {
    this.u10h_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_3.n4r();
            var tmp_1 = SignUpViewModel$slambda$slambda_0(null);
            var tmp_2 = SignUpViewModel$slambda$slambda_2(null);
            suspendResult = this.u10h_1.kqo(tmp_0, VOID, 'otheroptionperson', tmp_1, tmp_2, SignUpViewModel$slambda$lambda(this.u10h_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = Companion_instance_7.n4r();
            var tmp_4 = SignUpViewModel$slambda$slambda_4(null);
            var tmp_5 = SignUpViewModel$slambda$slambda_6(null);
            suspendResult = this.u10h_1.kqo(tmp_3, VOID, 'otheroptionpersonprofilepic', tmp_4, tmp_5, SignUpViewModel$slambda$lambda_0(this.u10h_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$slambda(this.u10h_1, completion);
    i.v10h_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SignUpViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.e10i_1 = $commitDelay;
    this.f10i_1 = $entity;
    this.g10i_1 = $this;
    this.h10i_1 = $key;
    this.i10i_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.e10i_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.f10i_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.g10i_1.gqo(this.g10i_1.aqn_1, this.h10i_1, this.i10i_1, this.f10i_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$onEntityChanged$slambda(this.e10i_1, this.f10i_1, this.g10i_1, this.h10i_1, this.i10i_1, completion);
    i.j10i_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SignUpViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation) {
    this.s10i_1 = this$0;
    this.t10i_1 = $personPicture;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onPersonPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$onPersonPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onPersonPictureChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.s10i_1.gqo(this.s10i_1.aqn_1, 'picState', Companion_instance_7.n4r(), this.t10i_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onPersonPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$onPersonPictureChanged$slambda(this.s10i_1, this.t10i_1, completion);
    i.u10i_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$onPersonPictureChanged$slambda_0(this$0, $personPicture, resultContinuation) {
    var i = new SignUpViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onUsernameChanged$lambda($filteredValue) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.g96_1 = $filteredValue;
      return Unit_instance;
    };
  }
  function SignUpViewModel$onFullNameFocusedChanged$slambda(this$0, resultContinuation) {
    this.d10j_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.d10j_1.d10f_1.t2().w10f_1;
            tmp_0.f10j_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            if (isBlank(this.f10j_1))
              return Unit_instance;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.d10j_1.m10f_1.kpo(this.f10j_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var suggestedUsername = suspendResult;
            var tmp0_safe_receiver = this.d10j_1.d10f_1.t2().r10f_1;
            var tmp_1;
            if (tmp0_safe_receiver == null) {
              tmp_1 = null;
            } else {
              tmp_1 = shallowCopy(tmp0_safe_receiver, SignUpViewModel$onFullNameFocusedChanged$slambda$lambda(suggestedUsername));
            }

            var updatedPerson = tmp_1;
            l$ret$1: do {
              var this_0 = this.d10j_1.d10f_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_safe_receiver_0 = this.d10j_1.d10f_1.t2().r10f_1;
                var tmp_2 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.g96_1;
                var nextValue = prevValue.j10g(updatedPerson, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.d10j_1.lqu(tmp_2, updatedPerson == null ? null : updatedPerson.g96_1, this.d10j_1.d10f_1.t2().g10g_1));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof UsernameErrorException) {
              var e = this.kd_1;
              l$ret$3: do {
                var this_1 = this.d10j_1.d10f_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.j10g(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e, this.d10j_1.aqo()));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_4 = this.kd_1;
              if (tmp_4 instanceof Exception) {
                var e_0 = this.kd_1;
                l$ret$5: do {
                  var this_2 = this.d10j_1.d10f_1;
                  while (true) {
                    var prevValue_1 = this_2.t2();
                    var nextValue_1 = prevValue_1.j10g(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e_0, this.d10j_1.aqo()));
                    if (this_2.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
                this.hd_1 = 4;
                continue $sm;
              } else {
                throw this.kd_1;
              }
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.id_1 === 3) {
          throw e_1;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_1;
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$onFullNameFocusedChanged$slambda(this.d10j_1, completion);
    i.e10j_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$onFullNameFocusedChanged$slambda_0(this$0, resultContinuation) {
    var i = new SignUpViewModel$onFullNameFocusedChanged$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onClickSignup$lambda($firstName, $lastName) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.h96_1 = $firstName;
      $this$shallowCopy.i96_1 = $lastName;
      return Unit_instance;
    };
  }
  function SignUpViewModel$onClickSignup$slambda(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation) {
    this.o10j_1 = this$0;
    this.p10j_1 = $savePerson;
    this.q10j_1 = $createPasskeyUseCaseVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onClickSignup$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$onClickSignup$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onClickSignup$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 17;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 16;
            this.id_1 = 13;
            this.hd_1 = 3;
            var tmp_0 = get_doorPrimaryKeyManager(this.o10j_1.uqn());
            suspendResult = tmp_0.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.u10j_1 = suspendResult;
            this.p10j_1.f96_1 = this.u10j_1;
            if (!(this.q10j_1 == null)) {
              this.id_1 = 10;
              var tmp_1 = this;
              var tmp0_elvis_lhs = this.p10j_1.g96_1;
              var tmp_2;
              if (tmp0_elvis_lhs == null) {
                throw IllegalStateException_init_$Create$('username can not be null');
              } else {
                tmp_2 = tmp0_elvis_lhs;
              }
              tmp_1.v10j_1 = tmp_2;
              this.hd_1 = 4;
              suspendResult = this.q10j_1.ppb(this.v10j_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var this_0 = LinkedHashMap_init_$Create$();
              this.o10j_1.oqo(this_0, Companion_getInstance_213().kr7_1);
              Companion_getInstance_125();
              this.o10j_1.nqo(this_0, 'next');
              this_0.s('otheroptionperson', this.o10j_1.m4r().r45(Companion_instance_3.n4r(), this.p10j_1));
              var tmp_3 = this.o10j_1.m4r();
              var tmp_4 = Companion_instance_7.n4r();
              var tmp0_elvis_lhs_0 = this.o10j_1.d10f_1.t2().u10f_1;
              this_0.s('otheroptionpersonprofilepic', tmp_3.r45(tmp_4, tmp0_elvis_lhs_0 == null ? new PersonPicture() : tmp0_elvis_lhs_0));
              this_0.s('isparent', this.o10j_1.d10f_1.t2().a10g_1.toString());
              this.o10j_1.cqn_1.rp6('SignupEnterUsernamePassword', this_0.f3());
              this.hd_1 = 12;
              continue $sm;
            }

          case 4:
            this.w10j_1 = suspendResult;
            this.x10j_1 = this.w10j_1;
            var tmp_5 = this.x10j_1;
            if (tmp_5 instanceof PasskeyCreatedResult) {
              this.hd_1 = 5;
              suspendResult = this.o10j_1.qqn().ooa(this.o10j_1.i10f_1, this.w10j_1.b10k_1, this.p10j_1, this.o10j_1.d10f_1.t2().u10f_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_6 = this.x10j_1;
              if (tmp_6 instanceof Error_1) {
                l$ret$1: do {
                  var this_1 = this.o10j_1.d10f_1;
                  while (true) {
                    var prevValue = this_1.t2();
                    var nextValue = prevValue.j10g(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.w10j_1.a10k_1);
                    if (this_1.y1k(prevValue, nextValue)) {
                      break l$ret$1;
                    }
                  }
                }
                 while (false);
                this.hd_1 = 9;
                continue $sm;
              } else {
                var tmp_7 = this.x10j_1;
                if (tmp_7 instanceof UserCanceledResult) {
                  this.hd_1 = 9;
                  continue $sm;
                } else {
                  this.hd_1 = 9;
                  continue $sm;
                }
              }
            }

          case 5:
            this.y10j_1 = this.o10j_1.d10f_1.t2().u10f_1;
            if (!(this.y10j_1 == null)) {
              this.y10j_1.e97_1 = this.p10j_1.f96_1;
              this.y10j_1.f97_1 = systemTimeInMillis();
              this.z10j_1 = this.y10j_1.g97_1;
              this.hd_1 = 6;
              var tmp_8 = _get_enqueueSavePictureUseCase__rl1s31_0(this.o10j_1);
              var tmp_9 = this.p10j_1.f96_1;
              suspendResult = tmp_8.bos(tmp_9, 50, this.z10j_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 7;
              continue $sm;
            }

          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.hd_1 = 8;
            suspendResult = enrollToCourseFromInviteUid(this.o10j_1, this.p10j_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            navigateToAppropriateScreen(this.o10j_1, this.p10j_1);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.id_1 = 13;
            this.hd_1 = 11;
            continue $sm;
          case 10:
            this.id_1 = 13;
            var tmp_10 = this.kd_1;
            if (tmp_10 instanceof Exception) {
              var e = this.kd_1;
              l$ret$3: do {
                var this_2 = this.o10j_1.d10f_1;
                while (true) {
                  var prevValue_0 = this_2.t2();
                  var nextValue_0 = prevValue_0.j10g(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e, this.o10j_1.aqo()));
                  if (this_2.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 11;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 11:
            this.id_1 = 13;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            this.s10j_1 = Unit_instance;
            this.id_1 = 17;
            this.hd_1 = 15;
            continue $sm;
          case 13:
            this.id_1 = 16;
            var tmp_11 = this.kd_1;
            if (tmp_11 instanceof Exception) {
              var e_0 = this.kd_1;
              var tmp_12 = Napier_getInstance();
              tmp_12.k5e(VOID, VOID, SignUpViewModel$onClickSignup$slambda$lambda(e_0));
              this.o10j_1.yqn().bq7(new Snack(this.o10j_1.aqo().moj(strings_getInstance().qmi_1) + ':' + e_0.message));
              this.t10j_1 = Unit_instance;
              this.id_1 = 17;
              this.hd_1 = 14;
              var tmp_13 = this;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 14:
            this.id_1 = 17;
            this.o10j_1.cqo(Companion_getInstance_97().uq6_1);
            return Unit_instance;
          case 15:
            this.id_1 = 17;
            this.o10j_1.cqo(Companion_getInstance_97().uq6_1);
            return Unit_instance;
          case 16:
            this.id_1 = 17;
            var t = this.kd_1;
            this.o10j_1.cqo(Companion_getInstance_97().uq6_1);
            throw t;
          case 17:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.id_1 === 17) {
          throw e_1;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_1;
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onClickSignup$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$onClickSignup$slambda(this.o10j_1, this.p10j_1, this.q10j_1, completion);
    i.r10j_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$onClickSignup$slambda_0(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation) {
    var i = new SignUpViewModel$onClickSignup$slambda(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$navigateToAppropriateScreen$lambda(this$0) {
    return function () {
      return 'AddSignUpPresenter: go to next destination: ' + this$0.e10f_1;
    };
  }
  function $enrollToCourseFromInviteUidCOROUTINE$79(_this__u8e3s4, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.j10h_1 = _this__u8e3s4;
    this.k10h_1 = personUid;
  }
  protoOf($enrollToCourseFromInviteUidCOROUTINE$79).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            Companion_getInstance_116();
            tmp_0.l10h_1 = this.j10h_1.aqn_1.ba('next');
            var tmp_1;
            if (!(this.l10h_1 == null)) {
              tmp_1 = contains(this.l10h_1, 'ClazzInviteRedeem');
            } else {
              tmp_1 = false;
            }

            if (tmp_1) {
              var tmp_2 = this.j10h_1;
              Companion_getInstance_140();
              tmp_2.e10f_1 = 'CourseListHome';
              this.hd_1 = 1;
              suspendResult = this.j10h_1.q10f_1.fph(this.l10h_1, this.k10h_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SignUpViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_213();
    destName = destName === VOID ? 'SignUp' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.d10f_1 = MutableStateFlow(new SignUpUiState());
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_140();
      tmp_0 = 'CourseListHome';
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.e10f_1 = tmp_0;
    this.f10f_1 = asStateFlow(this.d10f_1);
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.g10f_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_15());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(GetLocalAccountsSupportedUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.h10f_1 = Instance(this, tmp$ret$2, null).a5d(this, getLocalAccountsSupportedUseCase$factory());
    var tmp_5 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('learningSpaceUrl');
    var tmp1_elvis_lhs = tmp0_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_7(this).zo5_1 : tmp0_elvis_lhs_0;
    tmp_5.i10f_1 = tmp1_elvis_lhs == null ? 'http://localhost' : tmp1_elvis_lhs;
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(this.i10f_1);
    var trigger = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_7 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$5 = tmp_7.h57(tmp$ret$4, context);
    var this_0 = On(di, tmp$ret$5, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(CreatePasskeyUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_6.j10f_1 = InstanceOrNull(this_0, tmp$ret$7, null).a5d(this, createPasskeyUseCase$factory_1());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = new LearningSpace(this.i10f_1);
    var trigger_0 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_11 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    var tmp$ret$10 = tmp_11.h57(tmp$ret$9, context_0);
    var tmp$ret$11 = On(di, tmp$ret$10, trigger_0);
    var tmp_13 = get_direct(tmp$ret$11).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_10.k10f_1 = tmp_13.d58(tmp$ret$12, null);
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.l10f_1 = Instance(this, tmp$ret$14, null).a5d(this, genderConfig$factory_3());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_1 = new LearningSpace(this.i10f_1);
    var trigger_1 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_18 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_19 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
    var tmp$ret$17 = tmp_18.h57(tmp$ret$16, context_1);
    var tmp$ret$18 = On(di, tmp$ret$17, trigger_1);
    var tmp_20 = get_direct(tmp$ret$18).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_21 = typeToken(createKType(getKClass(GetUsernameSuggestionUseCase), arrayOf([]), false));
    var tmp$ret$19 = isInterface(tmp_21, TypeToken) ? tmp_21 : THROW_CCE();
    tmp_17.m10f_1 = tmp_20.d58(tmp$ret$19, null);
    this.n10f_1 = new FilterUsernameUseCase();
    this.o10f_1 = null;
    var tmp_22 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_2 = new LearningSpace(this.i10f_1);
    var trigger_2 = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_23 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_24 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$21 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
    var tmp$ret$22 = tmp_23.h57(tmp$ret$21, context_2);
    var this_1 = On(this, tmp$ret$22, trigger_2);
    // Inline function 'org.kodein.type.generic' call
    var tmp_25 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$24 = isInterface(tmp_25, TypeToken) ? tmp_25 : THROW_CCE();
    tmp_22.p10f_1 = Instance(this_1, tmp$ret$24, null).a5d(this, enqueueSavePictureUseCase$factory_1());
    var tmp_26 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_3 = new LearningSpace(this.i10f_1);
    var trigger_3 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_27 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_28 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$26 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
    var tmp$ret$27 = tmp_27.h57(tmp$ret$26, context_3);
    var tmp$ret$28 = On(di, tmp$ret$27, trigger_3);
    var tmp_29 = get_direct(tmp$ret$28).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_30 = typeToken(createKType(getKClass(EnrollToCourseFromInviteCodeUseCase), arrayOf([]), false));
    var tmp$ret$29 = isInterface(tmp_30, TypeToken) ? tmp_30 : THROW_CCE();
    tmp_26.q10f_1 = tmp_29.d58(tmp$ret$29, null);
    this.cqo(Companion_getInstance_97().tq6_1);
    var title = this.aqo().moj(strings_getInstance().rn7_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.eqn_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, false, VOID, VOID, false, VOID, VOID, VOID, false);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.d10f_1;
        while (true) {
          var prevValue_0 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.j10g(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      var tmp_31 = this;
      Companion_getInstance_169();
      tmp_31.e10f_1 = 'ContentEntryListHome';
    }
    var tmp_32 = this.rqn();
    launch(tmp_32, VOID, VOID, SignUpViewModel$slambda_0(this, null));
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.d10f_1;
      while (true) {
        var prevValue_1 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
        var tmp4_genderOptions = _get_genderConfig__kyr0zc_1(this).lq7_1;
        Companion_getInstance_202();
        var tmp0_safe_receiver = savedStateHandle.ba('DateOfBirth');
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        var tmp2_dateOfBirth = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        var tmp3_isPersonalAccount = this.d10f_1.t2().f10g_1;
        var tmp5_person = new Person(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_isPersonalAccount, tmp2_dateOfBirth);
        var tmp6_serverUrl_ = this.i10f_1;
        var tmp7_passkeySupported = !(_get_createPasskeyUseCase__ryoxza_0(this) == null);
        var tmp8_showOtherOption = _get_createPasskeyUseCase__ryoxza_0(this) == null ? _get_getLocalAccountsSupportedUseCase__hoi7c7(this).xpe() : false;
        var nextValue_1 = prevValue_1.j10g(tmp5_person, VOID, tmp4_genderOptions, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp7_passkeySupported, tmp6_serverUrl_, tmp8_showOtherOption);
        if (this_4.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
  }
  protoOf(SignUpViewModel).pzc = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.d10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.r10f_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l96_1;
        var tmp_0 = this.lqu(tmp, entity == null ? null : entity.l96_1, prevValue.y10f_1);
        var tmp2_safe_receiver = prevValue.r10f_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g96_1;
        var nextValue = prevValue.j10g(entity, VOID, VOID, VOID, VOID, VOID, VOID, tmp_0, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.lqu(tmp_1, entity == null ? null : entity.g96_1, prevValue.g10g_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_3.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.rqn();
    tmp_2.hqt_1 = launch(tmp_3, VOID, VOID, SignUpViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SignUpViewModel).c10k = function (checked) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.d10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onParentCheckChanged.<anonymous>' call
        var nextValue = prevValue.j10g(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, checked);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).d10k = function (checked) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.d10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onTeacherCheckChanged.<anonymous>' call
        var nextValue = prevValue.j10g(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, checked);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).mzs = function (pictureUri) {
    // Inline function 'kotlin.apply' call
    var this_0 = new PersonPicture();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onPersonPictureChanged.<anonymous>' call
    var tmp = this_0;
    var tmp0_safe_receiver = this.d10f_1.t2().u10f_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e97_1;
    tmp.e97_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this_0.g97_1 = pictureUri;
    var personPicture = this_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.d10f_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.j10g(VOID, VOID, VOID, personPicture);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, SignUpViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(SignUpViewModel).e10k = function (fullName) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.d10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onFullNameValueChange.<anonymous>' call
        var nextValue = prevValue.j10g(VOID, VOID, VOID, VOID, VOID, fullName, VOID, VOID, this.lqu(prevValue.w10f_1, fullName, prevValue.z10f_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).jyi = function (newValue) {
    var filteredValue = this.n10f_1.tpe(newValue, '');
    var tmp0_safe_receiver = this.d10f_1.t2().r10f_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy(tmp0_safe_receiver, SignUpViewModel$onUsernameChanged$lambda(filteredValue));
    }
    var updatedPerson = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.d10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onUsernameChanged.<anonymous>' call
        var tmp2_safe_receiver = this.d10f_1.t2().r10f_1;
        var tmp3_usernameSetByUser = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g96_1) === filteredValue);
        var tmp0_safe_receiver_0 = this.d10f_1.t2().r10f_1;
        var tmp_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.g96_1;
        var tmp4_usernameError = this.lqu(tmp_0, updatedPerson == null ? null : updatedPerson.g96_1, this.d10f_1.t2().g10g_1);
        var nextValue = prevValue.j10g(updatedPerson, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_usernameError, tmp3_usernameSetByUser);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).f10k = function (hasFocused) {
    if (hasFocused)
      return Unit_instance;
    var tmp;
    if (this.d10f_1.t2().h10g_1) {
      // Inline function 'kotlin.text.isNullOrEmpty' call
      var tmp0_safe_receiver = this.d10f_1.t2().r10f_1;
      var this_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ckr();
      // Inline function 'kotlin.contracts.contract' call
      tmp = !(this_0 == null ? true : charSequenceLength(this_0) === 0);
    } else {
      tmp = false;
    }
    if (tmp)
      return Unit_instance;
    var tmp1_safe_receiver = this.o10f_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.rqn();
    tmp_0.o10f_1 = launch(tmp_1, VOID, VOID, SignUpViewModel$onFullNameFocusedChanged$slambda_0(this, null));
  };
  protoOf(SignUpViewModel).g10k = function () {
    this.cqo(Companion_getInstance_97().tq6_1);
    var tmp0_safe_receiver = this.d10f_1.t2().w10f_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var fullName = tmp;
    var tmp_0;
    if (fullName == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(fullName) ? fullName : THROW_CCE()));
    }
    var tmp2_safe_receiver = tmp_0;
    var parts = tmp2_safe_receiver == null ? null : split(tmp2_safe_receiver, [' '], VOID, 2);
    var firstName = parts == null ? null : parts.v(0);
    var tmp_1;
    if (parts == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.getOrElse' call
      var tmp_2;
      if (1 >= 0 ? 1 <= get_lastIndex(parts) : false) {
        tmp_2 = parts.v(1);
      } else {
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickSignup.<anonymous>' call
        tmp_2 = '';
      }
      tmp_1 = tmp_2;
    }
    var lastName = tmp_1;
    var tmp5_safe_receiver = this.d10f_1.t2().r10f_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      tmp_3 = shallowCopy(tmp5_safe_receiver, SignUpViewModel$onClickSignup$lambda(firstName, lastName));
    }
    this.pzc(tmp_3);
    var tmp6_elvis_lhs = this.d10f_1.t2().r10f_1;
    var tmp_4;
    if (tmp6_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_4 = tmp6_elvis_lhs;
    }
    var savePerson = tmp_4;
    var requiredFieldMessage = this.aqo().moj(strings_getInstance().vmn_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.d10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickSignup.<anonymous>' call
        var tmp_5;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = savePerson.h96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_5 = requiredFieldMessage;
        } else {
          tmp_5 = null;
        }
        var tmp0_fullNameError = tmp_5;
        var tmp_6;
        var tmp_7 = savePerson.l96_1;
        if (tmp_7 === 0) {
          tmp_6 = requiredFieldMessage;
        } else {
          tmp_6 = null;
        }
        var tmp1_genderError = tmp_6;
        var tmp_8;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = savePerson.g96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_8 = requiredFieldMessage;
        } else {
          tmp_8 = null;
        }
        var tmp2_usernameError = tmp_8;
        var nextValue = prevValue.j10g(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_genderError, tmp0_fullNameError, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_usernameError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_5(this.d10f_1.t2(), this)) {
      this.cqo(Companion_getInstance_97().uq6_1);
      return Unit_instance;
    }
    var createPasskeyUseCaseVal = _get_createPasskeyUseCase__ryoxza_0(this);
    var tmp_9 = this.rqn();
    launch(tmp_9, VOID, VOID, SignUpViewModel$onClickSignup$slambda_0(this, savePerson, createPasskeyUseCaseVal, null));
  };
  function SignUpUiState(person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().nq7_1 : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    fullName = fullName === VOID ? null : fullName;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    genderError = genderError === VOID ? null : genderError;
    fullNameError = fullNameError === VOID ? null : fullNameError;
    isParent = isParent === VOID ? false : isParent;
    isTeacher = isTeacher === VOID ? false : isTeacher;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    serverUrl_ = serverUrl_ === VOID ? null : serverUrl_;
    showOtherOption = showOtherOption === VOID ? true : showOtherOption;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    usernameError = usernameError === VOID ? null : usernameError;
    usernameSetByUser = usernameSetByUser === VOID ? false : usernameSetByUser;
    errorText = errorText === VOID ? null : errorText;
    this.r10f_1 = person;
    this.s10f_1 = password;
    this.t10f_1 = genderOptions;
    this.u10f_1 = personPicture;
    this.v10f_1 = registrationMode;
    this.w10f_1 = fullName;
    this.x10f_1 = dateOfBirthError;
    this.y10f_1 = genderError;
    this.z10f_1 = fullNameError;
    this.a10g_1 = isParent;
    this.b10g_1 = isTeacher;
    this.c10g_1 = passkeySupported;
    this.d10g_1 = serverUrl_;
    this.e10g_1 = showOtherOption;
    this.f10g_1 = isPersonalAccount;
    this.g10g_1 = usernameError;
    this.h10g_1 = usernameSetByUser;
    this.i10g_1 = errorText;
  }
  protoOf(SignUpUiState).h10k = function (person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText) {
    return new SignUpUiState(person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText);
  };
  protoOf(SignUpUiState).j10g = function (person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText, $super) {
    person = person === VOID ? this.r10f_1 : person;
    password = password === VOID ? this.s10f_1 : password;
    genderOptions = genderOptions === VOID ? this.t10f_1 : genderOptions;
    personPicture = personPicture === VOID ? this.u10f_1 : personPicture;
    registrationMode = registrationMode === VOID ? this.v10f_1 : registrationMode;
    fullName = fullName === VOID ? this.w10f_1 : fullName;
    dateOfBirthError = dateOfBirthError === VOID ? this.x10f_1 : dateOfBirthError;
    genderError = genderError === VOID ? this.y10f_1 : genderError;
    fullNameError = fullNameError === VOID ? this.z10f_1 : fullNameError;
    isParent = isParent === VOID ? this.a10g_1 : isParent;
    isTeacher = isTeacher === VOID ? this.b10g_1 : isTeacher;
    passkeySupported = passkeySupported === VOID ? this.c10g_1 : passkeySupported;
    serverUrl_ = serverUrl_ === VOID ? this.d10g_1 : serverUrl_;
    showOtherOption = showOtherOption === VOID ? this.e10g_1 : showOtherOption;
    isPersonalAccount = isPersonalAccount === VOID ? this.f10g_1 : isPersonalAccount;
    usernameError = usernameError === VOID ? this.g10g_1 : usernameError;
    usernameSetByUser = usernameSetByUser === VOID ? this.h10g_1 : usernameSetByUser;
    errorText = errorText === VOID ? this.i10g_1 : errorText;
    return $super === VOID ? this.h10k(person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText) : $super.h10k.call(this, person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText);
  };
  protoOf(SignUpUiState).toString = function () {
    return 'SignUpUiState(person=' + this.r10f_1 + ', password=' + this.s10f_1 + ', genderOptions=' + this.t10f_1 + ', personPicture=' + this.u10f_1 + ', registrationMode=' + this.v10f_1 + ', fullName=' + this.w10f_1 + ', dateOfBirthError=' + this.x10f_1 + ', genderError=' + this.y10f_1 + ', fullNameError=' + this.z10f_1 + ', isParent=' + this.a10g_1 + ', isTeacher=' + this.b10g_1 + ', passkeySupported=' + this.c10g_1 + ', serverUrl_=' + this.d10g_1 + ', showOtherOption=' + this.e10g_1 + ', isPersonalAccount=' + this.f10g_1 + ', usernameError=' + this.g10g_1 + ', usernameSetByUser=' + this.h10g_1 + ', errorText=' + this.i10g_1 + ')';
  };
  protoOf(SignUpUiState).hashCode = function () {
    var result = this.r10f_1 == null ? 0 : this.r10f_1.hashCode();
    result = imul(result, 31) + (this.s10f_1 == null ? 0 : getStringHashCode(this.s10f_1)) | 0;
    result = imul(result, 31) + hashCode(this.t10f_1) | 0;
    result = imul(result, 31) + (this.u10f_1 == null ? 0 : this.u10f_1.hashCode()) | 0;
    result = imul(result, 31) + this.v10f_1 | 0;
    result = imul(result, 31) + (this.w10f_1 == null ? 0 : getStringHashCode(this.w10f_1)) | 0;
    result = imul(result, 31) + (this.x10f_1 == null ? 0 : getStringHashCode(this.x10f_1)) | 0;
    result = imul(result, 31) + (this.y10f_1 == null ? 0 : getStringHashCode(this.y10f_1)) | 0;
    result = imul(result, 31) + (this.z10f_1 == null ? 0 : getStringHashCode(this.z10f_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.a10g_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.b10g_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.c10g_1) | 0;
    result = imul(result, 31) + (this.d10g_1 == null ? 0 : getStringHashCode(this.d10g_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.e10g_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.f10g_1) | 0;
    result = imul(result, 31) + (this.g10g_1 == null ? 0 : getStringHashCode(this.g10g_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.h10g_1) | 0;
    result = imul(result, 31) + (this.i10g_1 == null ? 0 : getStringHashCode(this.i10g_1)) | 0;
    return result;
  };
  protoOf(SignUpUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SignUpUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SignUpUiState ? other : THROW_CCE();
    if (!equals(this.r10f_1, tmp0_other_with_cast.r10f_1))
      return false;
    if (!(this.s10f_1 == tmp0_other_with_cast.s10f_1))
      return false;
    if (!equals(this.t10f_1, tmp0_other_with_cast.t10f_1))
      return false;
    if (!equals(this.u10f_1, tmp0_other_with_cast.u10f_1))
      return false;
    if (!(this.v10f_1 === tmp0_other_with_cast.v10f_1))
      return false;
    if (!(this.w10f_1 == tmp0_other_with_cast.w10f_1))
      return false;
    if (!(this.x10f_1 == tmp0_other_with_cast.x10f_1))
      return false;
    if (!(this.y10f_1 == tmp0_other_with_cast.y10f_1))
      return false;
    if (!(this.z10f_1 == tmp0_other_with_cast.z10f_1))
      return false;
    if (!(this.a10g_1 === tmp0_other_with_cast.a10g_1))
      return false;
    if (!(this.b10g_1 === tmp0_other_with_cast.b10g_1))
      return false;
    if (!(this.c10g_1 === tmp0_other_with_cast.c10g_1))
      return false;
    if (!(this.d10g_1 == tmp0_other_with_cast.d10g_1))
      return false;
    if (!(this.e10g_1 === tmp0_other_with_cast.e10g_1))
      return false;
    if (!(this.f10g_1 === tmp0_other_with_cast.f10g_1))
      return false;
    if (!(this.g10g_1 == tmp0_other_with_cast.g10g_1))
      return false;
    if (!(this.h10g_1 === tmp0_other_with_cast.h10g_1))
      return false;
    if (!(this.i10g_1 == tmp0_other_with_cast.i10g_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_15() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_7(receiver);
    }, null);
  }
  function getLocalAccountsSupportedUseCase$factory() {
    return getPropertyCallableRef('getLocalAccountsSupportedUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocalAccountsSupportedUseCase__hoi7c7(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_1() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza_0(receiver);
    }, null);
  }
  function genderConfig$factory_3() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_1(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_1() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_0(receiver);
    }, null);
  }
  function apiUrlConfig$factory_16() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_7(receiver);
    }, null);
  }
  function getLocalAccountsSupportedUseCase$factory_0() {
    return getPropertyCallableRef('getLocalAccountsSupportedUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocalAccountsSupportedUseCase__hoi7c7(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_2() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza_0(receiver);
    }, null);
  }
  function genderConfig$factory_4() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_1(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_2() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_0(receiver);
    }, null);
  }
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda$lambda($e) {
    return function () {
      return 'enrollToCourseFromInviteCodeUseCase :' + $e.message;
    };
  }
  function _get_apiUrlConfig__mldllg_8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.j10l_1;
    apiUrlConfig$factory_18();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.n10l_1;
    genderConfig$factory_6();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.p10l_1;
    enqueueSavePictureUseCase$factory_4();
    return this_0.t2();
  }
  function hasErrors_6(_this__u8e3s4, $this) {
    return !(_this__u8e3s4.w10l_1 == null);
  }
  function navigateToAppropriateScreen_0($this, savePerson) {
    if ($this.k10l_1) {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.navigateToAppropriateScreen.<anonymous>' call
      Companion_getInstance_125();
      this_0.s('next', $this.h10l_1);
      $this.oqo(this_0, Companion_getInstance_213().kr7_1);
      Companion_getInstance_125();
      $this.nqo(this_0, 'next');
      var tmp$ret$2 = this_0.f3();
      $this.cqn_1.rp6('AddChildProfile', tmp$ret$2);
    } else {
      var goOptions = new UstadGoOptions(VOID, VOID, true);
      var tmp = Napier_getInstance();
      tmp.k5e(VOID, VOID, SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$lambda($this));
      $this.mqu($this.cqn_1, appendSelectedAccount($this.h10l_1, savePerson.f96_1, new LearningSpace($this.qqn().loa().wnt_1)), goOptions);
    }
  }
  function Companion_197() {
    this.d10m_1 = 'SignupEnterUsernamePassword';
  }
  var Companion_instance_246;
  function Companion_getInstance_214() {
    return Companion_instance_246;
  }
  function SignupEnterUsernamePasswordViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.m10m_1 = this$0;
    this.n10m_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignupEnterUsernamePasswordViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.m10m_1.fqo(this.n10m_1, 'otheroptionperson', Companion_instance_3.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.p10m_1 = suspendResult;
            this.q10m_1 = this.p10m_1 == null ? new Person() : this.p10m_1;
            this.hd_1 = 2;
            suspendResult = this.m10m_1.fqo(this.n10m_1, 'otheroptionpersonprofilepic', Companion_instance_7.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var personPicture = suspendResult;
            l$ret$1: do {
              var this_0 = this.m10m_1.f10l_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (this.q10m_1.h96_1 === '') {
                  tmp_0 = null;
                } else {
                  tmp_0 = this.q10m_1.ckr();
                }
                var nextValue = prevValue.r10m(this.q10m_1, VOID, VOID, personPicture, VOID, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$slambda(this.m10m_1, this.n10m_1, completion);
    i.o10m_1 = $this$launch;
    return i;
  };
  function SignupEnterUsernamePasswordViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.a10n_1 = $commitDelay;
    this.b10n_1 = $entity;
    this.c10n_1 = $this;
    this.d10n_1 = $key;
    this.e10n_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.a10n_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.b10n_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.c10n_1.gqo(this.c10n_1.aqn_1, this.d10n_1, this.e10n_1, this.b10n_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda(this.a10n_1, this.b10n_1, this.c10n_1, this.d10n_1, this.e10n_1, completion);
    i.f10n_1 = $this$launch;
    return i;
  };
  function SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$lambda($firstName, $lastName) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.h96_1 = $firstName;
      $this$shallowCopy.i96_1 = $lastName;
      return Unit_instance;
    };
  }
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this$0, $savePerson, resultContinuation) {
    this.o10n_1 = this$0;
    this.p10n_1 = $savePerson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 16;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 15;
            this.id_1 = 14;
            this.hd_1 = 3;
            var tmp_0 = get_doorPrimaryKeyManager(this.o10n_1.uqn());
            suspendResult = tmp_0.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.t10n_1 = suspendResult;
            this.p10n_1.f96_1 = this.t10n_1;
            this.u10n_1 = this.o10n_1.f10l_1.t2().r10l_1;
            if (this.u10n_1 == null) {
              this.s10n_1 = Unit_instance;
              this.id_1 = 16;
              this.hd_1 = 17;
              var tmp_1 = this;
              continue $sm;
            } else {
              this.v10n_1 = this.u10n_1;
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            this.w10n_1 = this.v10n_1;
            this.hd_1 = 5;
            suspendResult = this.o10n_1.qqn().qoa(this.p10n_1, this.w10n_1, this.o10n_1.l10l_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.x10n_1 = this.o10n_1.f10l_1.t2().t10l_1;
            if (!(this.x10n_1 == null)) {
              this.x10n_1.e97_1 = this.p10n_1.f96_1;
              this.x10n_1.f97_1 = systemTimeInMillis();
              this.y10n_1 = this.x10n_1.g97_1;
              this.hd_1 = 6;
              var tmp_2 = _get_enqueueSavePictureUseCase__rl1s31_1(this.o10n_1);
              var tmp_3 = this.p10n_1.f96_1;
              suspendResult = tmp_2.bos(tmp_3, 50, this.y10n_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 7;
              continue $sm;
            }

          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            var tmp_4 = this;
            var this_0 = this.o10n_1.a57();
            var context = new LearningSpace(this.o10n_1.l10l_1);
            var trigger = this_0.d57();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_0, tmp_5.h57(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).f58();
            var tmp_8 = typeToken(createKType(getKClass(SavePasswordUseCase), arrayOf([]), false));
            tmp_4.z10n_1 = tmp_7.e58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), null);
            this.a10o_1 = this.z10n_1;
            if (this.a10o_1 == null) {
              this.b10o_1 = null;
              this.hd_1 = 9;
              continue $sm;
            } else {
              this.hd_1 = 8;
              suspendResult = this.a10o_1.vpc(toString_0(this.p10n_1.g96_1), this.w10n_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 8:
            var tmp_9 = this;
            tmp_9.b10o_1 = Unit_instance;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.id_1 = 12;
            var tmp_10 = this;
            Companion_getInstance_116();
            tmp_10.c10o_1 = this.o10n_1.aqn_1.ba('next');
            if (!(this.c10o_1 == null) ? contains(this.c10o_1, 'ClazzInviteRedeem') : false) {
              var tmp_11 = this.o10n_1;
              Companion_getInstance_140();
              tmp_11.h10l_1 = 'CourseListHome';
              this.hd_1 = 10;
              suspendResult = this.o10n_1.o10l_1.fph(this.c10o_1, this.p10n_1.f96_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 11;
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            continue $sm;
          case 11:
            this.id_1 = 14;
            this.hd_1 = 13;
            continue $sm;
          case 12:
            this.id_1 = 14;
            var tmp_12 = this.kd_1;
            if (tmp_12 instanceof Exception) {
              var e = this.kd_1;
              var tmp_13 = Napier_getInstance();
              tmp_13.k5e(VOID, VOID, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda$lambda(e));
              this.hd_1 = 13;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 13:
            this.id_1 = 14;
            var tmp_14 = this;
            navigateToAppropriateScreen_0(this.o10n_1, this.p10n_1);
            tmp_14.r10n_1 = Unit_instance;
            this.id_1 = 16;
            this.hd_1 = 18;
            continue $sm;
          case 14:
            this.id_1 = 15;
            var tmp_15 = this.kd_1;
            if (tmp_15 instanceof Exception) {
              var e_0 = this.kd_1;
              if (e_0 instanceof IllegalStateException) {
                l$ret$5: do {
                  var this_1 = this.o10n_1.f10l_1;
                  while (true) {
                    var prevValue = this_1.t2();
                    var nextValue = prevValue.r10m(VOID, VOID, VOID, VOID, VOID, VOID, this.o10n_1.aqo().moj(strings_getInstance().vn7_1));
                    if (this_1.y1k(prevValue, nextValue)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
              } else {
                this.o10n_1.yqn().bq7(new Snack(this.o10n_1.aqo().moj(strings_getInstance().amj_1)));
              }
              this.s10n_1 = Unit_instance;
              this.id_1 = 16;
              this.hd_1 = 17;
              var tmp_16 = this;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 15:
            this.id_1 = 16;
            var t = this.kd_1;
            this.o10n_1.cqo(Companion_getInstance_97().uq6_1);
            throw t;
          case 16:
            throw this.kd_1;
          case 17:
            this.id_1 = 16;
            this.o10n_1.cqo(Companion_getInstance_97().uq6_1);
            return Unit_instance;
          case 18:
            this.id_1 = 16;
            this.o10n_1.cqo(Companion_getInstance_97().uq6_1);
            return Unit_instance;
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.id_1 === 16) {
          throw e_1;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_1;
        }
      }
     while (true);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).v1m = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this.o10n_1, this.p10n_1, completion);
    i.q10n_1 = $this$launch;
    return i;
  };
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda_0(this$0, $savePerson, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this$0, $savePerson, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$lambda(this$0) {
    return function () {
      return 'AddSignupEnterUsernamePasswordPresenter: go to next destination: ' + this$0.h10l_1;
    };
  }
  function SignupEnterUsernamePasswordViewModel(di, savedStateHandle, destName) {
    destName = destName === VOID ? 'SignupEnterUsernamePassword' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.f10l_1 = MutableStateFlow(new SignupEnterUsernamePasswordUiState());
    this.g10l_1 = new ValidateUsernameUseCase();
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_140();
      tmp_0 = 'CourseListHome';
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.h10l_1 = tmp_0;
    this.i10l_1 = asStateFlow(this.f10l_1);
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.j10l_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_17());
    var tmp_3 = this;
    tmp_3.k10l_1 = toBoolean(savedStateHandle.ba('isparent'));
    var tmp_4 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('learningSpaceUrl');
    var tmp1_elvis_lhs = tmp0_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_8(this).zo5_1 : tmp0_elvis_lhs_0;
    tmp_4.l10l_1 = tmp1_elvis_lhs == null ? 'http://localhost' : tmp1_elvis_lhs;
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(this.l10l_1);
    var trigger = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_6 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$3 = tmp_6.h57(tmp$ret$2, context);
    var tmp$ret$4 = On(di, tmp$ret$3, trigger);
    var tmp_8 = get_direct(tmp$ret$4).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_5.m10l_1 = tmp_8.d58(tmp$ret$5, null);
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.n10l_1 = Instance(this, tmp$ret$7, null).a5d(this, genderConfig$factory_5());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = new LearningSpace(this.l10l_1);
    var trigger_0 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_13 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    var tmp$ret$10 = tmp_13.h57(tmp$ret$9, context_0);
    var tmp$ret$11 = On(di, tmp$ret$10, trigger_0);
    var tmp_15 = get_direct(tmp$ret$11).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(EnrollToCourseFromInviteCodeUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_12.o10l_1 = tmp_15.d58(tmp$ret$12, null);
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_1 = new LearningSpace(this.l10l_1);
    var trigger_1 = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_18 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_19 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
    var tmp$ret$15 = tmp_18.h57(tmp$ret$14, context_1);
    var this_0 = On(this, tmp$ret$15, trigger_1);
    // Inline function 'org.kodein.type.generic' call
    var tmp_20 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$17 = isInterface(tmp_20, TypeToken) ? tmp_20 : THROW_CCE();
    tmp_17.p10l_1 = Instance(this_0, tmp$ret$17, null).a5d(this, enqueueSavePictureUseCase$factory_3());
    this.cqo(Companion_getInstance_97().tq6_1);
    var title = this.aqo().moj(strings_getInstance().rn7_1);
    var tmp_21 = this.rqn();
    launch(tmp_21, VOID, VOID, SignupEnterUsernamePasswordViewModel$slambda_0(this, savedStateHandle, null));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, false, true, VOID, false, VOID, VOID, VOID, false);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    Companion_getInstance_213();
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.f10l_1;
        while (true) {
          var prevValue_0 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.r10m(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      var tmp_22 = this;
      Companion_getInstance_169();
      tmp_22.h10l_1 = 'ContentEntryListHome';
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.f10l_1;
      while (true) {
        var prevValue_1 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
        var tmp4_genderOptions = _get_genderConfig__kyr0zc_2(this).lq7_1;
        Companion_getInstance_202();
        var tmp0_safe_receiver = savedStateHandle.ba('DateOfBirth');
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        var tmp2_dateOfBirth = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        var tmp3_isPersonalAccount = this.f10l_1.t2().c10m_1;
        var tmp5_person = new Person(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_isPersonalAccount, tmp2_dateOfBirth);
        var nextValue_1 = prevValue_1.r10m(tmp5_person, VOID, tmp4_genderOptions);
        if (this_3.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
  }
  protoOf(SignupEnterUsernamePasswordViewModel).pzc = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.f10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.r10m(entity);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_3.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.hqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.rqn();
    tmp.hqt_1 = launch(tmp_0, VOID, VOID, SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SignupEnterUsernamePasswordViewModel).lzs = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.f10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.r10m(VOID, password, VOID, VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignupEnterUsernamePasswordViewModel).d10o = function () {
    this.cqo(Companion_getInstance_97().tq6_1);
    var tmp0_safe_receiver = this.f10l_1.t2().v10l_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var fullName = tmp;
    var tmp_0;
    if (fullName == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(fullName) ? fullName : THROW_CCE()));
    }
    var tmp2_safe_receiver = tmp_0;
    var parts = tmp2_safe_receiver == null ? null : split(tmp2_safe_receiver, [' '], VOID, 2);
    var firstName = parts == null ? null : parts.v(0);
    var tmp_1;
    if (parts == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.getOrElse' call
      var tmp_2;
      if (1 >= 0 ? 1 <= get_lastIndex(parts) : false) {
        tmp_2 = parts.v(1);
      } else {
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onClickedSignupEnterUsernamePassword.<anonymous>' call
        tmp_2 = '';
      }
      tmp_1 = tmp_2;
    }
    var lastName = tmp_1;
    var tmp5_safe_receiver = this.f10l_1.t2().q10l_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      tmp_3 = shallowCopy(tmp5_safe_receiver, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$lambda(firstName, lastName));
    }
    this.pzc(tmp_3);
    var tmp6_elvis_lhs = this.f10l_1.t2().q10l_1;
    var tmp_4;
    if (tmp6_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_4 = tmp6_elvis_lhs;
    }
    var savePerson = tmp_4;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.f10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onClickedSignupEnterUsernamePassword.<anonymous>' call
        var tmp_5;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = prevValue.r10l_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_5 = this.aqo().moj(strings_getInstance().vmn_1);
        } else {
          tmp_5 = null;
        }
        var nextValue = prevValue.r10m(VOID, VOID, VOID, VOID, VOID, VOID, tmp_5);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_6(this.f10l_1.t2(), this)) {
      this.cqo(Companion_getInstance_97().uq6_1);
      return Unit_instance;
    }
    var tmp_6 = this.rqn();
    launch(tmp_6, VOID, VOID, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda_0(this, savePerson, null));
  };
  function SignupEnterUsernamePasswordUiState(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().nq7_1 : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    firstName = firstName === VOID ? null : firstName;
    passwordError = passwordError === VOID ? null : passwordError;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    parentContactError = parentContactError === VOID ? null : parentContactError;
    genderError = genderError === VOID ? null : genderError;
    fullNameError = fullNameError === VOID ? null : fullNameError;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    this.q10l_1 = person;
    this.r10l_1 = password;
    this.s10l_1 = genderOptions;
    this.t10l_1 = personPicture;
    this.u10l_1 = registrationMode;
    this.v10l_1 = firstName;
    this.w10l_1 = passwordError;
    this.x10l_1 = dateOfBirthError;
    this.y10l_1 = parentContactError;
    this.z10l_1 = genderError;
    this.a10m_1 = fullNameError;
    this.b10m_1 = passkeySupported;
    this.c10m_1 = isPersonalAccount;
  }
  protoOf(SignupEnterUsernamePasswordUiState).e10o = function (person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) {
    return new SignupEnterUsernamePasswordUiState(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount);
  };
  protoOf(SignupEnterUsernamePasswordUiState).r10m = function (person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount, $super) {
    person = person === VOID ? this.q10l_1 : person;
    password = password === VOID ? this.r10l_1 : password;
    genderOptions = genderOptions === VOID ? this.s10l_1 : genderOptions;
    personPicture = personPicture === VOID ? this.t10l_1 : personPicture;
    registrationMode = registrationMode === VOID ? this.u10l_1 : registrationMode;
    firstName = firstName === VOID ? this.v10l_1 : firstName;
    passwordError = passwordError === VOID ? this.w10l_1 : passwordError;
    dateOfBirthError = dateOfBirthError === VOID ? this.x10l_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.y10l_1 : parentContactError;
    genderError = genderError === VOID ? this.z10l_1 : genderError;
    fullNameError = fullNameError === VOID ? this.a10m_1 : fullNameError;
    passkeySupported = passkeySupported === VOID ? this.b10m_1 : passkeySupported;
    isPersonalAccount = isPersonalAccount === VOID ? this.c10m_1 : isPersonalAccount;
    return $super === VOID ? this.e10o(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) : $super.e10o.call(this, person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount);
  };
  protoOf(SignupEnterUsernamePasswordUiState).toString = function () {
    return 'SignupEnterUsernamePasswordUiState(person=' + this.q10l_1 + ', password=' + this.r10l_1 + ', genderOptions=' + this.s10l_1 + ', personPicture=' + this.t10l_1 + ', registrationMode=' + this.u10l_1 + ', firstName=' + this.v10l_1 + ', passwordError=' + this.w10l_1 + ', dateOfBirthError=' + this.x10l_1 + ', parentContactError=' + this.y10l_1 + ', genderError=' + this.z10l_1 + ', fullNameError=' + this.a10m_1 + ', passkeySupported=' + this.b10m_1 + ', isPersonalAccount=' + this.c10m_1 + ')';
  };
  protoOf(SignupEnterUsernamePasswordUiState).hashCode = function () {
    var result = this.q10l_1 == null ? 0 : this.q10l_1.hashCode();
    result = imul(result, 31) + (this.r10l_1 == null ? 0 : getStringHashCode(this.r10l_1)) | 0;
    result = imul(result, 31) + hashCode(this.s10l_1) | 0;
    result = imul(result, 31) + (this.t10l_1 == null ? 0 : this.t10l_1.hashCode()) | 0;
    result = imul(result, 31) + this.u10l_1 | 0;
    result = imul(result, 31) + (this.v10l_1 == null ? 0 : getStringHashCode(this.v10l_1)) | 0;
    result = imul(result, 31) + (this.w10l_1 == null ? 0 : getStringHashCode(this.w10l_1)) | 0;
    result = imul(result, 31) + (this.x10l_1 == null ? 0 : getStringHashCode(this.x10l_1)) | 0;
    result = imul(result, 31) + (this.y10l_1 == null ? 0 : getStringHashCode(this.y10l_1)) | 0;
    result = imul(result, 31) + (this.z10l_1 == null ? 0 : getStringHashCode(this.z10l_1)) | 0;
    result = imul(result, 31) + (this.a10m_1 == null ? 0 : getStringHashCode(this.a10m_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.b10m_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.c10m_1) | 0;
    return result;
  };
  protoOf(SignupEnterUsernamePasswordUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SignupEnterUsernamePasswordUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SignupEnterUsernamePasswordUiState ? other : THROW_CCE();
    if (!equals(this.q10l_1, tmp0_other_with_cast.q10l_1))
      return false;
    if (!(this.r10l_1 == tmp0_other_with_cast.r10l_1))
      return false;
    if (!equals(this.s10l_1, tmp0_other_with_cast.s10l_1))
      return false;
    if (!equals(this.t10l_1, tmp0_other_with_cast.t10l_1))
      return false;
    if (!(this.u10l_1 === tmp0_other_with_cast.u10l_1))
      return false;
    if (!(this.v10l_1 == tmp0_other_with_cast.v10l_1))
      return false;
    if (!(this.w10l_1 == tmp0_other_with_cast.w10l_1))
      return false;
    if (!(this.x10l_1 == tmp0_other_with_cast.x10l_1))
      return false;
    if (!(this.y10l_1 == tmp0_other_with_cast.y10l_1))
      return false;
    if (!(this.z10l_1 == tmp0_other_with_cast.z10l_1))
      return false;
    if (!(this.a10m_1 == tmp0_other_with_cast.a10m_1))
      return false;
    if (!(this.b10m_1 === tmp0_other_with_cast.b10m_1))
      return false;
    if (!(this.c10m_1 === tmp0_other_with_cast.c10m_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_17() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_8(receiver);
    }, null);
  }
  function genderConfig$factory_5() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_2(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_3() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_1(receiver);
    }, null);
  }
  function apiUrlConfig$factory_18() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_8(receiver);
    }, null);
  }
  function genderConfig$factory_6() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_2(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_4() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_1(receiver);
    }, null);
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).p10o = function (site, hasAdminPermission, $completion) {
    var tmp = this.q10o(site, hasAdminPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof Site) ? p1 : THROW_CCE();
    return this.p10o(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Pair(this.n10o_1, this.o10o_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).q10o = function (site, hasAdminPermission, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.n10o_1 = site;
    i.o10o_1 = hasAdminPermission;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (site, hasAdminPermission, $completion) {
      return i.p10o(site, hasAdminPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.z10o_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).b10p = function (it, $completion) {
    var tmp = this.c10p(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.b10p(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.a10p_1;
          var entity = tmp0_container.y6();
          var hasEditSitePermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.z10o_1.z10p_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.d10q(entity);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.z10o_1.eqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.mq6(prevValue_0.xq5_1.sq6(!(this.a10p_1.w6_1 == null) ? hasEditSitePermission : false));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).c10p = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this.z10o_1, completion);
    i.a10p_1 = it;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.b10p(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, $uiLangList, resultContinuation) {
    this.m10q_1 = this$0;
    this.n10q_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).p10q = function (it, $completion) {
    var tmp = this.q10q(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.p10q((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$3: do {
            var this_0 = this.m10q_1.z10p_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.o10q_1;
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = this_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp0_iterator_0 = this.n10q_1.w();
                  while (tmp0_iterator_0.f()) {
                    var element_0 = tmp0_iterator_0.e();
                    if (element_0.hq4_1 === element.fht_1) {
                      tmp$ret$0 = element_0;
                      break l$ret$1;
                    }
                  }
                  tmp$ret$0 = null;
                }
                 while (false);
                var tmp0_safe_receiver = tmp$ret$0;
                var tmp_0;
                if (tmp0_safe_receiver == null) {
                  tmp_0 = null;
                } else {
                  tmp_0 = new SiteTermsAndLangName(element, tmp0_safe_receiver.iq4_1);
                }
                var tmp0_safe_receiver_0 = tmp_0;
                if (tmp0_safe_receiver_0 == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver_0);
                }
              }
              var nextValue = prevValue.d10q(VOID, destination);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).q10q = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this.m10q_1, this.n10q_1, completion);
    i.o10q_1 = it;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, $uiLangList, resultContinuation);
    var l = function (it, $completion) {
      return i.p10q(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda($siteFlow, $permissionFlow, this$0, resultContinuation) {
    this.z10q_1 = $siteFlow;
    this.a10r_1 = $permissionFlow;
    this.b10r_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.z10q_1, this.a10r_1, SiteDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_2(this.b10r_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_39(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda(this.z10q_1, this.a10r_1, this.b10r_1, completion);
    i.c10r_1 = $this$launch;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda_0($siteFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda($siteFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda_1(this$0, $uiLangList, resultContinuation) {
    this.l10r_1 = this$0;
    this.m10r_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.l10r_1.wqn().w7e().fhs(1);
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_4(this.l10r_1, this.m10r_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_39(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda_1(this.l10r_1, this.m10r_1, completion);
    i.n10r_1 = $this$launch;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda_2(this$0, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda_1(this$0, $uiLangList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda(this$0, $this_launch, $uiLangList, resultContinuation) {
    this.w10r_1 = this$0;
    this.x10r_1 = $this_launch;
    this.y10r_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var siteFlow = this.w10r_1.wqn().v7e().mhn();
          var tmp_0 = this.w10r_1.wqn().p7f();
          var tmp_1 = this.w10r_1.sqn();
          PermissionFlags_getInstance();
          var permissionFlow = tmp_0.ui0(tmp_1, new Long(16384, 0));
          launch(this.x10r_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_0(siteFlow, permissionFlow, this.w10r_1, null));
          launch(this.x10r_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_2(this.w10r_1, this.y10r_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new SiteDetailViewModel$slambda$slambda(this.w10r_1, this.x10r_1, this.y10r_1, completion);
  };
  function SiteDetailViewModel$slambda$slambda_0(this$0, $this_launch, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda(this$0, $this_launch, $uiLangList, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_198() {
    this.z10r_1 = 'Community';
  }
  var Companion_instance_247;
  function Companion_getInstance_215() {
    return Companion_instance_247;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_39(function_0) {
    this.a10s_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_39).t1d = function (value, $completion) {
    return this.a10s_1(value, $completion);
  };
  function SiteDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.ex6();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function SiteDetailViewModel$slambda(this$0, $uiLangList, resultContinuation) {
    this.j10s_1 = this$0;
    this.k10s_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.j10s_1.z10p_1, SiteDetailViewModel$slambda$slambda_0(this.j10s_1, this.l10s_1, this.k10s_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteDetailViewModel$slambda(this.j10s_1, this.k10s_1, completion);
    i.l10s_1 = $this$launch;
    return i;
  };
  function SiteDetailViewModel$slambda_0(this$0, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda(this$0, $uiLangList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'Community');
    this.z10p_1 = MutableStateFlow(new SiteDetailUiState());
    this.a10q_1 = asStateFlow(this.z10p_1);
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(this).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var supportLangConfig = tmp.d58(tmp$ret$0, null);
    var uiLangList = supportLangConfig.opm_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.detail.SiteDetailViewModel.<anonymous>' call
        var tmp0_text = this.aqo().moj(strings_getInstance().qmv_1);
        var tmp1_onClick = SiteDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.mq6(new FabUiState(false, tmp0_text, tmp2_icon, tmp1_onClick), VOID, this.aqo().moj(strings_getInstance().ana_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.rqn();
    launch(tmp_1, VOID, VOID, SiteDetailViewModel$slambda_0(this, uiLangList, null));
  }
  protoOf(SiteDetailViewModel).ex6 = function () {
    Companion_getInstance_125();
    var tmp0_safe_receiver = this.z10p_1.t2().b10q_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qhn_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    this.cqn_1.rp6('SiteEdit', mapOf_0(to('entityUid', tmp2_elvis_lhs == null ? '-1' : tmp2_elvis_lhs)));
  };
  protoOf(SiteDetailViewModel).m10s = function (termsAndLang) {
    var tmp0_elvis_lhs = termsAndLang.uka_1.fht_1;
    this.cqn_1.rp6('Terms', mapOf_0(to('locale', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
  };
  function SiteDetailUiState(site, siteTerms) {
    site = site === VOID ? null : site;
    siteTerms = siteTerms === VOID ? emptyList() : siteTerms;
    this.b10q_1 = site;
    this.c10q_1 = siteTerms;
  }
  protoOf(SiteDetailUiState).n10s = function (site, siteTerms) {
    return new SiteDetailUiState(site, siteTerms);
  };
  protoOf(SiteDetailUiState).d10q = function (site, siteTerms, $super) {
    site = site === VOID ? this.b10q_1 : site;
    siteTerms = siteTerms === VOID ? this.c10q_1 : siteTerms;
    return $super === VOID ? this.n10s(site, siteTerms) : $super.n10s.call(this, site, siteTerms);
  };
  protoOf(SiteDetailUiState).toString = function () {
    return 'SiteDetailUiState(site=' + this.b10q_1 + ', siteTerms=' + this.c10q_1 + ')';
  };
  protoOf(SiteDetailUiState).hashCode = function () {
    var result = this.b10q_1 == null ? 0 : hashCode(this.b10q_1);
    result = imul(result, 31) + hashCode(this.c10q_1) | 0;
    return result;
  };
  protoOf(SiteDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteDetailUiState ? other : THROW_CCE();
    if (!equals(this.b10q_1, tmp0_other_with_cast.b10q_1))
      return false;
    if (!equals(this.c10q_1, tmp0_other_with_cast.c10q_1))
      return false;
    return true;
  };
  function SiteEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.w10s_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda$slambda).qqa = function (it, $completion) {
    var tmp = this.rqa(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.x10s_1.xq9_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newTerms = tmp_1;
          this.w10s_1.z10t(newTerms);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda$slambda).rqa = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda$slambda(this.w10s_1, completion);
    i.x10s_1 = it;
    return i;
  };
  function SiteEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.qqa(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda).j10u = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.j10u(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.i10u_1.v7e().lhn(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda).yny = function (db, completion) {
    var i = new SiteEditViewModel$slambda$slambda(completion);
    i.i10u_1 = db;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.j10u(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_1).thp = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.thp($completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Site();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new SiteEditViewModel$slambda$slambda_1(completion);
  };
  function SiteEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.thp($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SiteEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.v10t_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.a10v(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$slambda$slambda_3($supportedLangCodes, resultContinuation) {
    this.j10v_1 = $supportedLangCodes;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_3).l10v = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.l10v(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.k10v_1.w7e().ghs(1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (contains_0(this.j10v_1, element.fht_1)) {
                destination.i1(element);
              }
            }

            var termsLoadedFromDb = destination;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = termsLoadedFromDb.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver = element_0.fht_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver);
              }
            }

            var langsLoadedFromDb = destination_0;
            var this_1 = ArrayList_init_$Create$();
            this_1.m1(termsLoadedFromDb);
            var this_2 = this.j10v_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element_1 = tmp0_iterator_1.e();
              if (!langsLoadedFromDb.a1(element_1)) {
                destination_1.i1(element_1);
              }
            }

            var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_1, 10));
            var tmp0_iterator_2 = destination_1.w();
            while (tmp0_iterator_2.f()) {
              var item = tmp0_iterator_2.e();
              var this_3 = new SiteTerms();
              this_3.fht_1 = item;
              destination_2.i1(this_3);
            }

            this_1.m1(destination_2);
            return this_1.f3();
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_3).yny = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda_3(this.j10v_1, completion);
    i.k10v_1 = it;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_4($supportedLangCodes, resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_3($supportedLangCodes, resultContinuation);
    var l = function (it, $completion) {
      return i.l10v(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_5).u10v = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).m78 = function ($completion) {
    return this.u10v($completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).l78 = function (completion) {
    return new SiteEditViewModel$slambda$slambda_5(completion);
  };
  function SiteEditViewModel$slambda$slambda_6(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.u10v($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SiteEditViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.v10t_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.a10v(VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SiteEditViewModel$slambda$slambda_7(this$0, resultContinuation) {
    this.d10w_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.d10w_1.eqo(this.d10w_1.xqn(), 'siteTermsHtml');
            var tmp_1 = SiteEditViewModel$slambda$slambda$slambda_0(this.d10w_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_40(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$slambda$slambda_7(this.d10w_1, completion);
    i.e10w_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_8(this$0, resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onClickSave$slambda$lambda($it) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      // Inline function 'kotlin.text.isNullOrBlank' call
      var tmp0_safe_receiver = $it.eht_1;
      var this_0 = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      // Inline function 'kotlin.contracts.contract' call
      tmp.hht_1 = !(this_0 == null ? true : isBlank(this_0));
      return Unit_instance;
    };
  }
  function _get_languagesConfig__hebcss_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.x10t_1;
    languagesConfig$factory_2();
    return this_0.t2();
  }
  function Companion_199() {
    this.f10w_1 = 'SiteEdit';
    this.g10w_1 = 'siteTermsLang';
    this.h10w_1 = 'termsList';
    this.i10w_1 = 'siteTermsHtml';
  }
  var Companion_instance_248;
  function Companion_getInstance_216() {
    return Companion_instance_248;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_40(function_0) {
    this.j10w_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_40).t1d = function (value, $completion) {
    return this.j10w_1(value, $completion);
  };
  function SiteEditViewModel$slambda(this$0, resultContinuation) {
    this.s10w_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda).msc = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.t10w_1.p7f();
            var tmp_1 = this.s10w_1.sqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ti0(tmp_1, new Long(16384, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda).yny = function (db, completion) {
    var i = new SiteEditViewModel$slambda(this.s10w_1, completion);
    i.t10w_1 = db;
    return i;
  };
  function SiteEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SiteEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.msc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$lambda(this$0) {
    return function (enabled) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.v10t_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.a10v(VOID, VOID, VOID, enabled);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$slambda_1(this$0, $supportedLangCodes, resultContinuation) {
    this.c10x_1 = this$0;
    this.d10x_1 = $supportedLangCodes;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_31.n4r();
            var tmp_1 = SiteEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SiteEditViewModel$slambda$slambda_2(null);
            suspendResult = this.c10x_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, SiteEditViewModel$slambda$lambda(this.c10x_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = ListSerializer(Companion_instance_47.n4r());
            var tmp_4 = listOf_0('termsList');
            var tmp_5 = SiteEditViewModel$slambda$slambda_4(this.d10x_1, null);
            var tmp_6 = SiteEditViewModel$slambda$slambda_6(null);
            suspendResult = this.c10x_1.jqo(tmp_3, tmp_4, 'termsList', tmp_5, tmp_6, SiteEditViewModel$slambda$lambda_0(this.c10x_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            l$ret$1: do {
              var this_0 = this.c10x_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_7 = this.c10x_1.aqo().moj(strings_getInstance().en3_1);
                var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_7, VOID, SiteEditViewModel$onClickSave$ref(this.c10x_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.e10x_1, VOID, VOID, SiteEditViewModel$slambda$slambda_8(this.c10x_1, null));
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new SiteEditViewModel$slambda_1(this.c10x_1, this.d10x_1, completion);
    i.e10x_1 = $this$launchIfHasPermission;
    return i;
  };
  function SiteEditViewModel$slambda_2(this$0, $supportedLangCodes, resultContinuation) {
    var i = new SiteEditViewModel$slambda_1(this$0, $supportedLangCodes, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onChangeTermsHtml$lambda($html) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.eht_1 = $html;
      return Unit_instance;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$lambda_0($prev) {
    return function (it) {
      return it.fht_1 === $prev.y10u_1.hq4_1;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$slambda(this$0, $newTerms, resultContinuation) {
    this.n10x_1 = this$0;
    this.o10x_1 = $newTerms;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.n10x_1.gqo(this.n10x_1.aqn_1, 'termsList', ListSerializer(Companion_instance_47.n4r()), this.o10x_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$onChangeTermsHtml$slambda(this.n10x_1, this.o10x_1, completion);
    i.p10x_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$onChangeTermsHtml$slambda_0(this$0, $newTerms, resultContinuation) {
    var i = new SiteEditViewModel$onChangeTermsHtml$slambda(this$0, $newTerms, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.y10x_1 = $commitDelay;
    this.z10x_1 = $entity;
    this.a10y_1 = $this;
    this.b10y_1 = $key;
    this.c10y_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.y10x_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.z10x_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.a10y_1.gqo(this.a10y_1.aqn_1, this.b10y_1, this.c10y_1, this.z10x_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$onEntityChanged$slambda(this.y10x_1, this.z10x_1, this.a10y_1, this.b10y_1, this.c10y_1, completion);
    i.d10y_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SiteEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onClickSave$slambda(this$0, $siteToSave, resultContinuation) {
    this.m10y_1 = this$0;
    this.n10y_1 = $siteToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.m10y_1.wqn().v7e().nhn(this.n10y_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.m10y_1.wqn().w7e();
            var this_0 = this.m10y_1.v10t_1.t2().t10u_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var tmp_1;
              var tmp0_safe_receiver = element.eht_1;
              var this_1 = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
              if (!(this_1 == null ? true : isBlank(this_1))) {
                tmp_1 = true;
              } else {
                tmp_1 = !element.dht_1.equals(new Long(0, 0));
              }
              if (tmp_1) {
                destination.i1(element);
              }
            }

            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
            var tmp0_iterator_0 = destination.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(shallowCopy_12(item, SiteEditViewModel$onClickSave$slambda$lambda(item)));
            }

            suspendResult = tmp_0.hhs(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.m10y_1.kqt('Community', this.n10y_1.qhn_1, this.n10y_1);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$onClickSave$slambda(this.m10y_1, this.n10y_1, completion);
    i.o10y_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$onClickSave$slambda_0(this$0, $siteToSave, resultContinuation) {
    var i = new SiteEditViewModel$onClickSave$slambda(this$0, $siteToSave, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SiteEdit');
    this.v10t_1 = MutableStateFlow(new SiteEditUiState());
    this.w10t_1 = asStateFlow(this.v10t_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.x10t_1 = Instance(this, tmp$ret$0, null).a5d(this, languagesConfig$factory_1());
    this.y10t_1 = null;
    var supportedLangs = _get_languagesConfig__hebcss_0(this).opm_1;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(supportedLangs, 10));
    var tmp0_iterator = supportedLangs.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
      var tmp$ret$2 = item.hq4_1;
      destination.i1(tmp$ret$2);
    }
    var supportedLangCodes = destination;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
        var tmp0_title = this.aqo().moj(strings_getInstance().zn9_1);
        var nextValue = prevValue.mq6(VOID, VOID, tmp0_title, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.v10t_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
        var tmp$ret$8;
        $l$block_0: {
          // Inline function 'kotlin.collections.first' call
          var tmp0_iterator_0 = supportedLangs.w();
          while (tmp0_iterator_0.f()) {
            var element = tmp0_iterator_0.e();
            // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>' call
            var tmp0_elvis_lhs = savedStateHandle.ba('siteTermsLang');
            if (element.hq4_1 === (tmp0_elvis_lhs == null ? _get_languagesConfig__hebcss_0(this).qpm_1 : tmp0_elvis_lhs)) {
              tmp$ret$8 = element;
              break $l$block_0;
            }
          }
          throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
        }
        var nextValue_0 = prevValue_0.a10v(VOID, VOID, supportedLangs, VOID, VOID, VOID, tmp$ret$8);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_1;
        }
      }
    }
    var tmp_1 = SiteEditViewModel$slambda_0(this, null);
    var tmp_2 = SiteEditViewModel$lambda(this);
    this.lqo(tmp_1, true, tmp_2, SiteEditViewModel$slambda_2(this, supportedLangCodes, null));
  }
  protoOf(SiteEditViewModel).p10y = function (uiLang) {
    this.aqn_1.dqj('siteTermsLang', uiLang.hq4_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.v10t_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onChangeTermsLanguage.<anonymous>' call
        var nextValue = prevValue.a10v(VOID, VOID, VOID, VOID, VOID, VOID, uiLang);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SiteEditViewModel).z10t = function (html) {
    var tmp0_elvis_lhs = this.v10t_1.t2().q10y();
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var currentSiteTerms = tmp;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.v10t_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onChangeTermsHtml.<anonymous>' call
        var tmp_0 = shallowCopy_12(currentSiteTerms, SiteEditViewModel$onChangeTermsHtml$lambda(html));
        var nextValue = prevValue.a10v(VOID, replace_0(prevValue.t10u_1, tmp_0, SiteEditViewModel$onChangeTermsHtml$lambda_0(prevValue)), VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newTerms = tmp$ret$1.t10u_1;
    var tmp1_safe_receiver = this.y10t_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.rqn();
    tmp_1.y10t_1 = launch(tmp_2, VOID, VOID, SiteEditViewModel$onChangeTermsHtml$slambda_0(this, newTerms, null));
  };
  protoOf(SiteEditViewModel).r10y = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.v10t_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.s10u_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vhn_1;
        var tmp_0 = this.lqu(tmp, entity == null ? null : entity.vhn_1, prevValue.w10u_1);
        var tmp2_safe_receiver = prevValue.s10u_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.xhn_1;
        var nextValue = prevValue.a10v(entity, VOID, VOID, VOID, tmp_0, this.lqu(tmp_1, entity == null ? null : entity.xhn_1, prevValue.x10u_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_31.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.hqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.rqn();
    tmp_2.hqt_1 = launch(tmp_3, VOID, VOID, SiteEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SiteEditViewModel).asa = function () {
    var tmp0_elvis_lhs = this.v10t_1.t2().s10u_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var siteToSave = tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = siteToSave.vhn_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : isBlank(this_0)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.v10t_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.a10v(VOID, VOID, VOID, VOID, this.aqo().moj(strings_getInstance().wnl_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    // Inline function 'kotlin.collections.map' call
    var this_2 = this.v10t_1.t2().t10u_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
    var tmp0_iterator = this_2.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
      var tmp2_elvis_lhs = item.fht_1;
      var tmp_0 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
      var tmp0_safe_receiver = item.eht_1;
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      var tmp$ret$3 = to(tmp_0, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
      destination.i1(tmp$ret$3);
    }
    var siteTermsPlainText = toMap(destination);
    var tmp_1;
    if (siteToSave.xhn_1) {
      var tmp$ret$6;
      $l$block_1: {
        // Inline function 'kotlin.collections.all' call
        if (siteTermsPlainText.c1()) {
          tmp$ret$6 = true;
          break $l$block_1;
        }
        // Inline function 'kotlin.collections.iterator' call
        var tmp0_iterator_0 = siteTermsPlainText.q2().w();
        while (tmp0_iterator_0.f()) {
          var element = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          if (!isBlank(element.t2())) {
            tmp$ret$6 = false;
            break $l$block_1;
          }
        }
        tmp$ret$6 = true;
      }
      tmp_1 = tmp$ret$6;
    } else {
      tmp_1 = false;
    }
    if (tmp_1) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.v10t_1;
        while (true) {
          var prevValue_0 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.a10v(VOID, VOID, VOID, VOID, VOID, this.aqo().moj(strings_getInstance().hnm_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if (this.v10t_1.t2().z10u_1)
      return Unit_instance;
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, SiteEditViewModel$onClickSave$slambda_0(this, siteToSave, null));
  };
  function SiteEditUiState(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) {
    site = site === VOID ? null : site;
    siteTerms = siteTerms === VOID ? emptyList() : siteTerms;
    uiLangs = uiLangs === VOID ? listOf_0(new UiLanguage('en', 'English')) : uiLangs;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    siteNameError = siteNameError === VOID ? null : siteNameError;
    registrationEnabledError = registrationEnabledError === VOID ? null : registrationEnabledError;
    currentSiteTermsLang = currentSiteTermsLang === VOID ? first_0(uiLangs) : currentSiteTermsLang;
    this.s10u_1 = site;
    this.t10u_1 = siteTerms;
    this.u10u_1 = uiLangs;
    this.v10u_1 = fieldsEnabled;
    this.w10u_1 = siteNameError;
    this.x10u_1 = registrationEnabledError;
    this.y10u_1 = currentSiteTermsLang;
    this.z10u_1 = !(this.w10u_1 == null) ? true : !(this.x10u_1 == null);
  }
  protoOf(SiteEditUiState).q10y = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.t10u_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditUiState.<get-currentSiteTerms>.<anonymous>' call
        if (element.fht_1 === this.y10u_1.hq4_1) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  };
  protoOf(SiteEditUiState).s10y = function () {
    var tmp0_safe_receiver = this.q10y();
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eht_1;
  };
  protoOf(SiteEditUiState).t10y = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) {
    return new SiteEditUiState(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).a10v = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang, $super) {
    site = site === VOID ? this.s10u_1 : site;
    siteTerms = siteTerms === VOID ? this.t10u_1 : siteTerms;
    uiLangs = uiLangs === VOID ? this.u10u_1 : uiLangs;
    fieldsEnabled = fieldsEnabled === VOID ? this.v10u_1 : fieldsEnabled;
    siteNameError = siteNameError === VOID ? this.w10u_1 : siteNameError;
    registrationEnabledError = registrationEnabledError === VOID ? this.x10u_1 : registrationEnabledError;
    currentSiteTermsLang = currentSiteTermsLang === VOID ? this.y10u_1 : currentSiteTermsLang;
    return $super === VOID ? this.t10y(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) : $super.t10y.call(this, site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).toString = function () {
    return 'SiteEditUiState(site=' + this.s10u_1 + ', siteTerms=' + this.t10u_1 + ', uiLangs=' + this.u10u_1 + ', fieldsEnabled=' + this.v10u_1 + ', siteNameError=' + this.w10u_1 + ', registrationEnabledError=' + this.x10u_1 + ', currentSiteTermsLang=' + this.y10u_1 + ')';
  };
  protoOf(SiteEditUiState).hashCode = function () {
    var result = this.s10u_1 == null ? 0 : hashCode(this.s10u_1);
    result = imul(result, 31) + hashCode(this.t10u_1) | 0;
    result = imul(result, 31) + hashCode(this.u10u_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.v10u_1) | 0;
    result = imul(result, 31) + (this.w10u_1 == null ? 0 : getStringHashCode(this.w10u_1)) | 0;
    result = imul(result, 31) + (this.x10u_1 == null ? 0 : getStringHashCode(this.x10u_1)) | 0;
    result = imul(result, 31) + this.y10u_1.hashCode() | 0;
    return result;
  };
  protoOf(SiteEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteEditUiState ? other : THROW_CCE();
    if (!equals(this.s10u_1, tmp0_other_with_cast.s10u_1))
      return false;
    if (!equals(this.t10u_1, tmp0_other_with_cast.t10u_1))
      return false;
    if (!equals(this.u10u_1, tmp0_other_with_cast.u10u_1))
      return false;
    if (!(this.v10u_1 === tmp0_other_with_cast.v10u_1))
      return false;
    if (!(this.w10u_1 == tmp0_other_with_cast.w10u_1))
      return false;
    if (!(this.x10u_1 == tmp0_other_with_cast.x10u_1))
      return false;
    if (!this.y10u_1.equals(tmp0_other_with_cast.y10u_1))
      return false;
    return true;
  };
  function languagesConfig$factory_1() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss_0(receiver);
    }, null);
  }
  function languagesConfig$factory_2() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss_0(receiver);
    }, null);
  }
  function Companion_200() {
    this.u10y_1 = 'locale';
    this.v10y_1 = 'Terms';
  }
  var Companion_instance_249;
  function Companion_getInstance_217() {
    return Companion_instance_249;
  }
  function _init_$lambda($getLocaleForSiteTermsUseCase$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('getLocaleForSiteTermsUseCase', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $getLocaleForSiteTermsUseCase$delegate.t2();
  }
  function SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, $learningSpace, this$0, $savedStateHandle, $getLocaleForSiteTermsUseCase$delegate, resultContinuation) {
    this.e10z_1 = $acceptButtonMode;
    this.f10z_1 = $apiUrl;
    this.g10z_1 = $di;
    this.h10z_1 = $learningSpace;
    this.i10z_1 = this$0;
    this.j10z_1 = $savedStateHandle;
    this.k10z_1 = $getLocaleForSiteTermsUseCase$delegate;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteTermsDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteTermsDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteTermsDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1;
            if (this.e10z_1 ? !(this.f10z_1 == null) : false) {
              var this_0 = get_direct(this.g10z_1);
              var context = this.h10z_1;
              var tmp_2 = this_0.f58();
              var tmp_3 = Companion_instance_0;
              var tmp_4 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
              var tmp_5 = tmp_2.c58(tmp_3.h57(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), context)).f58();
              var tmp_6 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
              tmp_1 = tmp_5.d58(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), null).wk2();
            } else {
              tmp_1 = this.i10z_1.wqn();
            }

            tmp_0.m10z_1 = tmp_1;
            this.n10z_1 = this.j10z_1.ba('locale');
            this.o10z_1 = this.n10z_1;
            if (this.o10z_1 == null) {
              this.hd_1 = 1;
              suspendResult = _init_$lambda(this.k10z_1).tpm(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.p10z_1 = this.o10z_1;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.p10z_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.q10z_1 = this.p10z_1;
            this.hd_1 = 3;
            suspendResult = this.m10z_1.w7e().jhs(this.q10z_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var displayTerms = suspendResult;
            if (!(displayTerms == null)) {
              l$ret$1: do {
                var this_1 = this.i10z_1.n110_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.s110(displayTerms, this.e10z_1);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            } else {
              l$ret$3: do {
                var this_2 = this.i10z_1.n110_1;
                while (true) {
                  var prevValue_0 = this_2.t2();
                  var nextValue_0 = prevValue_0.s110(VOID, VOID, this.i10z_1.aqo().moj(strings_getInstance().amj_1));
                  if (this_2.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteTermsDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteTermsDetailViewModel$slambda(this.e10z_1, this.f10z_1, this.g10z_1, this.h10z_1, this.i10z_1, this.j10z_1, this.k10z_1, completion);
    i.l10z_1 = $this$launch;
    return i;
  };
  function SiteTermsDetailViewModel$slambda_0($acceptButtonMode, $apiUrl, $di, $learningSpace, this$0, $savedStateHandle, $getLocaleForSiteTermsUseCase$delegate, resultContinuation) {
    var i = new SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, $learningSpace, this$0, $savedStateHandle, $getLocaleForSiteTermsUseCase$delegate, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteTermsDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'Terms');
    this.n110_1 = MutableStateFlow(new SiteTermsDetailUiState());
    this.o110_1 = asStateFlow(this.n110_1);
    var tmp0_safe_receiver = savedStateHandle.ba('showAccept');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    var acceptButtonMode = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    Companion_getInstance_116();
    var apiUrl = savedStateHandle.ba('learningSpaceUrl');
    var tmp;
    if (acceptButtonMode ? !(apiUrl == null) : false) {
      tmp = new LearningSpace(apiUrl);
    } else {
      tmp = this.qqn().loa();
    }
    var learningSpace = tmp;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var trigger = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(tmp$ret$0, learningSpace);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var getLocaleForSiteTermsUseCase$delegate = Instance(this_0, tmp$ret$3, null).a5d(null, getLocalDelegateReference('getLocaleForSiteTermsUseCase', KProperty0, false, function () {
      return THROW_ISE();
    }));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.termsdetail.SiteTermsDetailViewModel.<anonymous>' call
        var tmp0_navigationVisible = !acceptButtonMode;
        var tmp1_title = this.aqo().moj(strings_getInstance().tn9_1);
        var nextValue = prevValue.mq6(VOID, VOID, tmp1_title, tmp0_navigationVisible, true, VOID, false);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.rqn();
    launch(tmp_3, VOID, VOID, SiteTermsDetailViewModel$slambda_0(acceptButtonMode, apiUrl, di, learningSpace, this, savedStateHandle, getLocaleForSiteTermsUseCase$delegate, null));
  }
  protoOf(SiteTermsDetailViewModel).t110 = function () {
    Companion_getInstance_213();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.site.termsdetail.SiteTermsDetailViewModel.onClickAccept.<anonymous>' call
    this.oqo(this_0, Companion_getInstance_213().kr7_1);
    Companion_getInstance_125();
    this.nqo(this_0, 'next');
    var tmp$ret$2 = this_0.f3();
    this.cqn_1.rp6('SignUp', tmp$ret$2);
  };
  function SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error) {
    siteTerms = siteTerms === VOID ? null : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? false : acceptButtonVisible;
    error = error === VOID ? null : error;
    this.p110_1 = siteTerms;
    this.q110_1 = acceptButtonVisible;
    this.r110_1 = error;
  }
  protoOf(SiteTermsDetailUiState).u110 = function (siteTerms, acceptButtonVisible, error) {
    return new SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).s110 = function (siteTerms, acceptButtonVisible, error, $super) {
    siteTerms = siteTerms === VOID ? this.p110_1 : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? this.q110_1 : acceptButtonVisible;
    error = error === VOID ? this.r110_1 : error;
    return $super === VOID ? this.u110(siteTerms, acceptButtonVisible, error) : $super.u110.call(this, siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).toString = function () {
    return 'SiteTermsDetailUiState(siteTerms=' + this.p110_1 + ', acceptButtonVisible=' + this.q110_1 + ', error=' + this.r110_1 + ')';
  };
  protoOf(SiteTermsDetailUiState).hashCode = function () {
    var result = this.p110_1 == null ? 0 : hashCode(this.p110_1);
    result = imul(result, 31) + getBooleanHashCode(this.q110_1) | 0;
    result = imul(result, 31) + (this.r110_1 == null ? 0 : getStringHashCode(this.r110_1)) | 0;
    return result;
  };
  protoOf(SiteTermsDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteTermsDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteTermsDetailUiState ? other : THROW_CCE();
    if (!equals(this.p110_1, tmp0_other_with_cast.p110_1))
      return false;
    if (!(this.q110_1 === tmp0_other_with_cast.q110_1))
      return false;
    if (!(this.r110_1 == tmp0_other_with_cast.r110_1))
      return false;
    return true;
  };
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda$lambda($endpointUrl) {
    return function () {
      return 'LearningSpaceEnterLink: not working: ' + $endpointUrl;
    };
  }
  function _get_httpClient__2ty1zc_5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.s111_1;
    httpClient$factory_12();
    return this_0.t2();
  }
  function _get_impl__d88w17_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.t111_1;
    impl$factory_6();
    return this_0.t2();
  }
  function Companion_201() {
    Companion_instance_250 = this;
    this.u111_1 = 'LearningSpaceEnterLink';
    var tmp = this;
    Companion_getInstance_125();
    Companion_getInstance_116();
    Companion_getInstance_125();
    tmp.v111_1 = listOf(['next', 'intMsg', 'noSessionChange']);
    this.w111_1 = 'stateUrl';
  }
  var Companion_instance_250;
  function Companion_getInstance_218() {
    if (Companion_instance_250 == null)
      new Companion_201();
    return Companion_instance_250;
  }
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, $viewName, resultContinuation) {
    this.f112_1 = this$0;
    this.g112_1 = $endpointUrl;
    this.h112_1 = $viewName;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceEnterLinkViewModel$onClickNext$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LearningSpaceEnterLinkViewModel$onClickNext$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LearningSpaceEnterLinkViewModel$onClickNext$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = verifySite(_get_httpClient__2ty1zc_5(this.f112_1), this.g112_1, VOID, this.f112_1.m4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var site = suspendResult;
            Companion_getInstance_116();
            var tmp_0 = to('learningSpaceUrl', this.g112_1);
            Companion_getInstance_116();
            var this_0 = this.f112_1.m4r();
            var this_1 = this_0.t45();
            var this_2 = serializer(this_1, createKType(getKClass(Site), arrayOf([]), false));
            var args = mutableMapOf([tmp_0, to('site', this_0.r45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), site))]);
            var tmp0_iterator = Companion_getInstance_218().v111_1.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              this.f112_1.nqo(args, element);
            }

            this.f112_1.cqo(Companion_getInstance_97().uq6_1);
            l$ret$1: do {
              var this_3 = this.f112_1.q111_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.o112(VOID, true, VOID, null, true);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp_1;
            if (equals(this.h112_1, 'RegisterAgeRedirect')) {
              tmp_1 = !site.xhn_1;
            } else {
              tmp_1 = false;
            }

            if (tmp_1) {
              this.f112_1.cqo(Companion_getInstance_97().uq6_1);
              l$ret$3: do {
                var this_4 = this.f112_1.q111_1;
                while (true) {
                  var prevValue_0 = this_4.t2();
                  this.f112_1.cqo(Companion_getInstance_97().uq6_1);
                  var tmp0_linkError = _get_impl__d88w17_2(this.f112_1).moj(strings_getInstance().qnq_1);
                  var nextValue_0 = prevValue_0.o112(VOID, true, VOID, tmp0_linkError, true);
                  if (this_4.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              return Unit_instance;
            }

            this.f112_1.cqn_1.rp6(this.h112_1, args);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Error) {
              var e = this.kd_1;
              var tmp_3 = Napier_getInstance();
              tmp_3.k5e(e, VOID, LearningSpaceEnterLinkViewModel$onClickNext$slambda$lambda(this.g112_1));
              l$ret$5: do {
                var this_5 = this.f112_1.q111_1;
                while (true) {
                  var prevValue_1 = this_5.t2();
                  this.f112_1.cqo(Companion_getInstance_97().uq6_1);
                  var tmp0_linkError_0 = _get_impl__d88w17_2(this.f112_1).moj(strings_getInstance().umt_1);
                  var nextValue_1 = prevValue_1.o112(VOID, false, VOID, tmp0_linkError_0, true);
                  if (this_5.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(LearningSpaceEnterLinkViewModel$onClickNext$slambda).v1m = function ($this$launch, completion) {
    var i = new LearningSpaceEnterLinkViewModel$onClickNext$slambda(this.f112_1, this.g112_1, this.h112_1, completion);
    i.i112_1 = $this$launch;
    return i;
  };
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda_0(this$0, $endpointUrl, $viewName, resultContinuation) {
    var i = new LearningSpaceEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, $viewName, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceEnterLinkViewModel(di, savedStateHandle) {
    Companion_getInstance_218();
    UstadViewModel.call(this, di, savedStateHandle, 'LearningSpaceEnterLink');
    this.q111_1 = MutableStateFlow(new LearningSpaceEnterLinkUiState());
    this.r111_1 = asStateFlow(this.q111_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.s111_1 = Instance(this, tmp$ret$0, null).a5d(this, httpClient$factory_11());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.t111_1 = Instance(this, tmp$ret$2, null).a5d(this, impl$factory_5());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.<anonymous>' call
        var tmp0_title = _get_impl__d88w17_2(this).moj(strings_getInstance().rnc_1);
        var nextValue = prevValue.mq6(VOID, VOID, tmp0_title, false, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.q111_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba(Companion_getInstance_218().w111_1);
        var nextValue_0 = prevValue_0.o112(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(LearningSpaceEnterLinkViewModel).swk = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.q111_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.onClickNext.<anonymous>' call
        var nextValue = prevValue.o112(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp;
    Companion_getInstance_213();
    if (this.aqn_1.ba('newOrExisting') === 'new') {
      tmp = 'RegisterAgeRedirect';
    } else {
      tmp = 'Login';
    }
    var viewName = tmp;
    this.cqo(Companion_getInstance_97().tq6_1);
    var endpointUrl = requirePostfix(requireHttpPrefix(this.q111_1.t2().j112_1), '/');
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, LearningSpaceEnterLinkViewModel$onClickNext$slambda_0(this, endpointUrl, viewName, null));
  };
  protoOf(LearningSpaceEnterLinkViewModel).p112 = function (siteLink) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.q111_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.onSiteLinkUpdated.<anonymous>' call
        var nextValue = prevValue.o112(siteLink);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.aqn_1.dqj(Companion_getInstance_218().w111_1, siteLink);
  };
  function LearningSpaceEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    siteLink = siteLink === VOID ? '' : siteLink;
    validLink = validLink === VOID ? false : validLink;
    progressVisible = progressVisible === VOID ? false : progressVisible;
    linkError = linkError === VOID ? null : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.j112_1 = siteLink;
    this.k112_1 = validLink;
    this.l112_1 = progressVisible;
    this.m112_1 = linkError;
    this.n112_1 = fieldsEnabled;
  }
  protoOf(LearningSpaceEnterLinkUiState).q112 = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    return new LearningSpaceEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(LearningSpaceEnterLinkUiState).o112 = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled, $super) {
    siteLink = siteLink === VOID ? this.j112_1 : siteLink;
    validLink = validLink === VOID ? this.k112_1 : validLink;
    progressVisible = progressVisible === VOID ? this.l112_1 : progressVisible;
    linkError = linkError === VOID ? this.m112_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.n112_1 : fieldsEnabled;
    return $super === VOID ? this.q112(siteLink, validLink, progressVisible, linkError, fieldsEnabled) : $super.q112.call(this, siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(LearningSpaceEnterLinkUiState).toString = function () {
    return 'LearningSpaceEnterLinkUiState(siteLink=' + this.j112_1 + ', validLink=' + this.k112_1 + ', progressVisible=' + this.l112_1 + ', linkError=' + this.m112_1 + ', fieldsEnabled=' + this.n112_1 + ')';
  };
  protoOf(LearningSpaceEnterLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.j112_1);
    result = imul(result, 31) + getBooleanHashCode(this.k112_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.l112_1) | 0;
    result = imul(result, 31) + (this.m112_1 == null ? 0 : getStringHashCode(this.m112_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.n112_1) | 0;
    return result;
  };
  protoOf(LearningSpaceEnterLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LearningSpaceEnterLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LearningSpaceEnterLinkUiState ? other : THROW_CCE();
    if (!(this.j112_1 === tmp0_other_with_cast.j112_1))
      return false;
    if (!(this.k112_1 === tmp0_other_with_cast.k112_1))
      return false;
    if (!(this.l112_1 === tmp0_other_with_cast.l112_1))
      return false;
    if (!(this.m112_1 == tmp0_other_with_cast.m112_1))
      return false;
    if (!(this.n112_1 === tmp0_other_with_cast.n112_1))
      return false;
    return true;
  };
  function httpClient$factory_11() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function impl$factory_5() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_2(receiver);
    }, null);
  }
  function httpClient$factory_12() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function impl$factory_6() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_2(receiver);
    }, null);
  }
  function SystemPermissionConstants() {
    SystemPermissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().dno_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1024, 0));
    var tmp_2 = strings_getInstance().eno_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().fno_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(32768, 0));
    var tmp_6 = strings_getInstance().kno_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(131072, 0));
    var tmp_8 = strings_getInstance().jno_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(4096, 0));
    var tmp_10 = strings_getInstance().ino_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(512, 0));
    var tmp_12 = strings_getInstance().wnn_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(1, 0));
    var tmp_14 = strings_getInstance().xnn_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(2, 0));
    var tmp_16 = strings_getInstance().ynn_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(4, 0));
    var tmp_18 = strings_getInstance().tnn_1;
    PermissionFlags_getInstance();
    var tmp_19 = to(tmp_18, new Long(2048, 0));
    var tmp_20 = strings_getInstance().znn_1;
    PermissionFlags_getInstance();
    var tmp_21 = to(tmp_20, new Long(8, 0));
    var tmp_22 = strings_getInstance().ano_1;
    PermissionFlags_getInstance();
    var tmp_23 = to(tmp_22, new Long(16, 0));
    var tmp_24 = strings_getInstance().bno_1;
    PermissionFlags_getInstance();
    var tmp_25 = to(tmp_24, new Long(32, 0));
    var tmp_26 = strings_getInstance().cno_1;
    PermissionFlags_getInstance();
    var tmp_27 = to(tmp_26, new Long(64, 0));
    var tmp_28 = strings_getInstance().gno_1;
    PermissionFlags_getInstance();
    var tmp_29 = to(tmp_28, new Long(128, 0));
    var tmp_30 = strings_getInstance().hno_1;
    PermissionFlags_getInstance();
    tmp.r112_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, tmp_25, tmp_27, tmp_29, to(tmp_30, new Long(256, 0))]);
  }
  var SystemPermissionConstants_instance;
  function SystemPermissionConstants_getInstance() {
    if (SystemPermissionConstants_instance == null)
      new SystemPermissionConstants();
    return SystemPermissionConstants_instance;
  }
  function personHasSystemPermissionAsFlowForUser(_this__u8e3s4, accountPersonUid, personUid) {
    var tmp;
    if (!accountPersonUid.equals(new Long(0, 0)) ? accountPersonUid.equals(personUid) : false) {
      tmp = flowOf(true);
    } else {
      PermissionFlags_getInstance();
      tmp = _this__u8e3s4.ui0(accountPersonUid, new Long(-1, 2147483647));
    }
    return tmp;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).c113 = function (entity, hasViewPermission, $completion) {
    var tmp = this.d113(entity, hasViewPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof SystemPermission) ? p1 : THROW_CCE();
    return this.c113(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.a113_1;
          var tmp_0;
          if (this.b113_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).d113 = function (entity, hasViewPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.a113_1 = entity;
    i.b113_1 = hasViewPermission;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, hasViewPermission, $completion) {
      return i.c113(entity, hasViewPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.m113_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).o113 = function (it, $completion) {
    var tmp = this.p113(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.o113((p1 == null ? true : p1 instanceof SystemPermission) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            l$ret$1: do {
              var this_0 = this.m113_1.n114_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.n113_1 == null)) {
                  tmp_0 = SystemPermissionConstants_getInstance().r112_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.r114(this.n113_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            if (!(this.n113_1 == null)) {
              this.hd_1 = 1;
              suspendResult = this.m113_1.wqn().n7d().rg4(this.m113_1.m114_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.m113_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).p113 = function (it, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.m113_1, completion);
    i.n113_1 = it;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.o113(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.a115_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).lqf = function (hasEditPermission, $completion) {
    var tmp = this.mqf(hasEditPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.lqf((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.a115_1.eqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mq6(prevValue.xq5_1.sq6(this.b115_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).mqf = function (hasEditPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this.a115_1, completion);
    i.b115_1 = hasEditPermission;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (hasEditPermission, $completion) {
      return i.lqf(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    this.k115_1 = $entityFlow;
    this.l115_1 = $viewPermissionFlow;
    this.m115_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.k115_1, this.l115_1, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            suspendResult = collectLatest(tmp_0, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.m115_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda(this.k115_1, this.l115_1, this.m115_1, completion);
    i.n115_1 = $this$launch;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_0($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_1($editPermissionFlow, this$0, resultContinuation) {
    this.w115_1 = $editPermissionFlow;
    this.x115_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_4(this.x115_1, null);
            suspendResult = this.w115_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_41(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda_1(this.w115_1, this.x115_1, completion);
    i.y115_1 = $this$launch;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_2($editPermissionFlow, this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda_1($editPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation) {
    this.h116_1 = $this_launch;
    this.i116_1 = $entityFlow;
    this.j116_1 = $viewPermissionFlow;
    this.k116_1 = this$0;
    this.l116_1 = $editPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.h116_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_0(this.i116_1, this.j116_1, this.k116_1, null));
          launch(this.h116_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_2(this.l116_1, this.k116_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).l78 = function (completion) {
    return new SystemPermissionDetailViewModel$slambda$slambda(this.h116_1, this.i116_1, this.j116_1, this.k116_1, this.l116_1, completion);
  };
  function SystemPermissionDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function onClickEdit_1($this) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.onClickEdit.<anonymous>' call
    Companion_getInstance_125();
    $this.nqo(this_0, 'personUid');
    var tmp$ret$2 = this_0.f3();
    $this.cqn_1.rp6('SystemPermissionEdit', tmp$ret$2);
  }
  function Companion_202() {
    this.m116_1 = 'SystemPermission';
  }
  var Companion_instance_251;
  function Companion_getInstance_219() {
    return Companion_instance_251;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_41(function_0) {
    this.n116_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_41).t1d = function (value, $completion) {
    return this.n116_1(value, $completion);
  };
  function SystemPermissionDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit_1($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function SystemPermissionDetailViewModel$slambda(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation) {
    this.w116_1 = this$0;
    this.x116_1 = $entityFlow;
    this.y116_1 = $viewPermissionFlow;
    this.z116_1 = $editPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.w116_1.n114_1, SystemPermissionDetailViewModel$slambda$slambda_0(this.a117_1, this.x116_1, this.y116_1, this.w116_1, this.z116_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda(this.w116_1, this.x116_1, this.y116_1, this.z116_1, completion);
    i.a117_1 = $this$launch;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda_0(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'SystemPermission');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.m114_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.n114_1 = MutableStateFlow(new SystemPermissionDetailUiState());
    this.o114_1 = asStateFlow(this.n114_1);
    var entityFlow = this.wqn().p7f().ri0(this.m114_1);
    var viewPermissionFlow = personHasSystemPermissionAsFlowForUser(this.wqn().p7f(), this.sqn(), this.m114_1);
    var tmp_0 = this.wqn().p7f();
    var tmp_1 = this.sqn();
    PermissionFlags_getInstance();
    var editPermissionFlow = tmp_0.ui0(tmp_1, new Long(4096, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.<anonymous>' call
        var tmp0_text = this.aqo().moj(strings_getInstance().qmv_1);
        var tmp1_onClick = SystemPermissionDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.mq6(new FabUiState(VOID, tmp0_text, tmp2_icon, tmp1_onClick));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, SystemPermissionDetailViewModel$slambda_0(this, entityFlow, viewPermissionFlow, editPermissionFlow, null));
  }
  function SystemPermissionDetailUiState(systemPermission, permissionLabels) {
    systemPermission = systemPermission === VOID ? null : systemPermission;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.p114_1 = systemPermission;
    this.q114_1 = permissionLabels;
  }
  protoOf(SystemPermissionDetailUiState).r114 = function (systemPermission, permissionLabels) {
    return new SystemPermissionDetailUiState(systemPermission, permissionLabels);
  };
  protoOf(SystemPermissionDetailUiState).toString = function () {
    return 'SystemPermissionDetailUiState(systemPermission=' + this.p114_1 + ', permissionLabels=' + this.q114_1 + ')';
  };
  protoOf(SystemPermissionDetailUiState).hashCode = function () {
    var result = this.p114_1 == null ? 0 : this.p114_1.hashCode();
    result = imul(result, 31) + hashCode(this.q114_1) | 0;
    return result;
  };
  protoOf(SystemPermissionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemPermissionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SystemPermissionDetailUiState ? other : THROW_CCE();
    if (!equals(this.p114_1, tmp0_other_with_cast.p114_1))
      return false;
    if (!equals(this.q114_1, tmp0_other_with_cast.q114_1))
      return false;
    return true;
  };
  function SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.j117_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda).l117 = function (db, $completion) {
    var tmp = this.yny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.l117(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.k117_1.p7f().si0(this.j117_1.l118_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).yny = function (db, completion) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this.j117_1, completion);
    i.k117_1 = db;
    return i;
  };
  function SystemPermissionEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.l117(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).ei4 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.ei4($completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).l78 = function (completion) {
    return new SystemPermissionEditViewModel$slambda$slambda_1(completion);
  };
  function SystemPermissionEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.ei4($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.j118_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp;
          if (!(it == null)) {
            tmp = SystemPermissionConstants_getInstance().r112_1;
          } else {
            tmp = emptyList();
          }
          var nextValue = prevValue.x118(it, VOID, tmp);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.asa();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.g119_1 = this$0;
    this.h119_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.g119_1.wqn().p7f().yi0(this.h119_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).yny = function (it, completion) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this.g119_1, this.h119_1, completion);
    i.i119_1 = it;
    return i;
  };
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_203() {
    this.j119_1 = 'SystemPermissionEdit';
  }
  var Companion_instance_252;
  function Companion_getInstance_220() {
    return Companion_instance_252;
  }
  function SystemPermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.s119_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda).msc = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.msc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.s119_1.wqn().p7f();
            var tmp_1 = this.s119_1.sqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ti0(tmp_1, new Long(4096, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda).yny = function (it, completion) {
    var i = new SystemPermissionEditViewModel$slambda(this.s119_1, completion);
    i.t119_1 = it;
    return i;
  };
  function SystemPermissionEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.msc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.j118_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.x118(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation) {
    this.c11a_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_getInstance_7().n4r();
            var tmp_1 = SystemPermissionEditViewModel$slambda$slambda_0(this.c11a_1, null);
            var tmp_2 = SystemPermissionEditViewModel$slambda$slambda_2(null);
            suspendResult = this.c11a_1.kqo(tmp_0, VOID, VOID, tmp_1, tmp_2, SystemPermissionEditViewModel$slambda$lambda(this.c11a_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.c11a_1.eqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.c11a_1.aqo().moj(strings_getInstance().en3_1);
                var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, SystemPermissionEditViewModel$onClickSave$ref(this.c11a_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.c11a_1.wqn().n7d().rg4(this.c11a_1.l118_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.c11a_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new SystemPermissionEditViewModel$slambda_1(this.c11a_1, completion);
    i.d11a_1 = $this$launchIfHasPermission;
    return i;
  };
  function SystemPermissionEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.j118_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.x118(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.m11a_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.m11a_1.j118_1.t2().u118_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.n11a_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = this.m11a_1.wqn();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this.m11a_1, this.n11a_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_116();
            this.m11a_1.cqn_1.mq9('', true);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).l78 = function (completion) {
    return new SystemPermissionEditViewModel$onClickSave$slambda(this.m11a_1, completion);
  };
  function SystemPermissionEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SystemPermissionEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SystemPermissionEdit');
    this.j118_1 = MutableStateFlow(new SystemPermissionEditUiState());
    this.k118_1 = asStateFlow(this.j118_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.l118_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = SystemPermissionEditViewModel$slambda_0(this, null);
    var tmp_1 = SystemPermissionEditViewModel$lambda(this);
    this.mqo(tmp_0, VOID, tmp_1, SystemPermissionEditViewModel$slambda_2(this, null));
  }
  protoOf(SystemPermissionEditViewModel).at7 = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.j118_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onTogglePermission.<anonymous>' call
        var tmp0_safe_receiver = prevValue.u118_1;
        var nextValue = prevValue.x118(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bky(VOID, VOID, VOID, toggleFlag(prevValue.u118_1.qi1_1, flag)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SystemPermissionEditViewModel).asa = function () {
    var tmp = SystemPermissionEditViewModel$onClickSave$lambda(this);
    this.nqu(tmp, SystemPermissionEditViewModel$onClickSave$slambda_0(this, null));
  };
  function SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels) {
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.u118_1 = entity;
    this.v118_1 = fieldsEnabled;
    this.w118_1 = permissionLabels;
  }
  protoOf(SystemPermissionEditUiState).o11a = function (entity, fieldsEnabled, permissionLabels) {
    return new SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).x118 = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.u118_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.v118_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.w118_1 : permissionLabels;
    return $super === VOID ? this.o11a(entity, fieldsEnabled, permissionLabels) : $super.o11a.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).toString = function () {
    return 'SystemPermissionEditUiState(entity=' + this.u118_1 + ', fieldsEnabled=' + this.v118_1 + ', permissionLabels=' + this.w118_1 + ')';
  };
  protoOf(SystemPermissionEditUiState).hashCode = function () {
    var result = this.u118_1 == null ? 0 : this.u118_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.v118_1) | 0;
    result = imul(result, 31) + hashCode(this.w118_1) | 0;
    return result;
  };
  protoOf(SystemPermissionEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemPermissionEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SystemPermissionEditUiState ? other : THROW_CCE();
    if (!equals(this.u118_1, tmp0_other_with_cast.u118_1))
      return false;
    if (!(this.v118_1 === tmp0_other_with_cast.v118_1))
      return false;
    if (!equals(this.w118_1, tmp0_other_with_cast.w118_1))
      return false;
    return true;
  };
  function TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.x11a_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda$slambda).z11a = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.z11a((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return _get_allTimeZones__4t4mtu(this.x11a_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new TimeZoneListViewModel$slambda$slambda(this.x11a_1, completion);
    i.y11a_1 = $this$withContext;
    return i;
  };
  function TimeZoneListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.z11a($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation) {
    this.i11b_1 = $searchText;
    this.j11b_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).z11a = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).he = function (p1, $completion) {
    return this.z11a((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.i11b_1;
          var searchWords = Regex_init_$Create$('\\s+').y9(this_0, 0);
          var this_1 = _get_allTimeZones__4t4mtu(this.j11b_1);
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            var tmp$ret$0;
            l$ret$1: do {
              var tmp_0;
              if (isInterface(searchWords, Collection)) {
                tmp_0 = searchWords.c1();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = true;
                break l$ret$1;
              }
              var tmp0_iterator_0 = searchWords.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                if (!contains(element.ymg(), element_0, true)) {
                  tmp$ret$0 = false;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = true;
            }
             while (false);
            if (tmp$ret$0) {
              destination.i1(element);
            }
          }
          return destination;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda(this.i11b_1, this.j11b_1, completion);
    i.k11b_1 = $this$withContext;
    return i;
  };
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda_0($searchText, this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.z11a($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_allTimeZones__4t4mtu($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.l11c_1;
    allTimeZones$factory();
    return this_0.t2();
  }
  function Companion_204() {
    this.n11c_1 = 'TimeZoneList';
  }
  var Companion_instance_253;
  function Companion_getInstance_221() {
    return Companion_instance_253;
  }
  function sam$kotlin_Comparator$0_3(function_0) {
    this.o11c_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_3).pa = function (a, b) {
    return this.o11c_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_3).compare = function (a, b) {
    return this.pa(a, b);
  };
  function TimeZoneListViewModel$allTimeZones$delegate$lambda() {
    var now = System_instance.ymd();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = Companion_getInstance_9().ymh();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$0 = Companion_getInstance_9().vmg(item);
      destination.i1(tmp$ret$0);
    }
    var this_1 = toList(destination);
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp = TimeZoneListViewModel$allTimeZones$delegate$lambda$lambda(now);
    var tmp$ret$3 = new sam$kotlin_Comparator$0_3(tmp);
    return sortedWith(this_1, tmp$ret$3);
  }
  function TimeZoneListViewModel$allTimeZones$delegate$lambda$lambda($now) {
    return function (a, b) {
      // Inline function 'kotlin.comparisons.compareValuesBy' call
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp = offsetAt(a, $now).cmi();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$1 = offsetAt(b, $now).cmi();
      return compareValues(tmp, tmp$ret$1);
    };
  }
  function TimeZoneListViewModel$slambda(this$0, resultContinuation) {
    this.x11c_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, TimeZoneListViewModel$slambda$slambda_0(this.x11c_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var allTimeZonesVal = suspendResult;
            l$ret$1: do {
              var this_0 = this.x11c_1.vqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.a11d(allTimeZonesVal);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new TimeZoneListViewModel$slambda(this.x11c_1, completion);
    i.y11c_1 = $this$launch;
    return i;
  };
  function TimeZoneListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda(this$0, $searchText, resultContinuation) {
    this.j11d_1 = this$0;
    this.k11d_1 = $searchText;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda_0(this.k11d_1, this.j11d_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var filteredList = suspendResult;
            l$ret$1: do {
              var this_0 = this.j11d_1.vqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.a11d(filteredList);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).v1m = function ($this$launch, completion) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda(this.j11d_1, this.k11d_1, completion);
    i.l11d_1 = $this$launch;
    return i;
  };
  function TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this$0, $searchText, resultContinuation) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda(this$0, $searchText, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new TimezoneListUiState(), 'TimeZoneList');
    var tmp = this;
    tmp.l11c_1 = lazy_0(TimeZoneListViewModel$allTimeZones$delegate$lambda);
    this.m11c_1 = null;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, this.aqo().moj(strings_getInstance().in3_1), VOID, VOID, VOID, VOID, this.eqx());
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.rqn();
    launch(tmp_0, VOID, VOID, TimeZoneListViewModel$slambda_0(this, null));
  }
  protoOf(TimeZoneListViewModel).pqw = function (searchText) {
    var tmp0_safe_receiver = this.m11c_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.rqn();
    tmp.m11c_1 = launch(tmp_0, VOID, VOID, TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this, searchText, null));
  };
  protoOf(TimeZoneListViewModel).m11d = function (entry) {
    this.lqt(entry.ymg());
  };
  protoOf(TimeZoneListViewModel).qqw = function () {
  };
  function TimezoneListUiState(timeZoneList) {
    timeZoneList = timeZoneList === VOID ? emptyList() : timeZoneList;
    this.z11c_1 = timeZoneList;
  }
  protoOf(TimezoneListUiState).a11d = function (timeZoneList) {
    return new TimezoneListUiState(timeZoneList);
  };
  protoOf(TimezoneListUiState).toString = function () {
    return 'TimezoneListUiState(timeZoneList=' + this.z11c_1 + ')';
  };
  protoOf(TimezoneListUiState).hashCode = function () {
    return hashCode(this.z11c_1);
  };
  protoOf(TimezoneListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TimezoneListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof TimezoneListUiState ? other : THROW_CCE();
    if (!equals(this.z11c_1, tmp0_other_with_cast.z11c_1))
      return false;
    return true;
  };
  function allTimeZones$factory() {
    return getPropertyCallableRef('allTimeZones', 1, KProperty1, function (receiver) {
      return _get_allTimeZones__4t4mtu(receiver);
    }, null);
  }
  function VideoContentViewModel$slambda$slambda(this$0, $contentEntryVersion, resultContinuation) {
    this.v11d_1 = this$0;
    this.w11d_1 = $contentEntryVersion;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(VideoContentViewModel$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(VideoContentViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(VideoContentViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.y11d_1 = this.v11d_1.m4r();
            var tmp_1 = this;
            tmp_1.z11d_1 = _get_httpClient__2ty1zc_6(this.v11d_1);
            var tmp_2 = this;
            tmp_2.a11e_1 = ensureNotNull(this.w11d_1.pax_1);
            var tmp_3 = this;
            tmp_3.b11e_1 = this.z11d_1;
            var tmp_4 = this;
            tmp_4.c11e_1 = this.b11e_1;
            var tmp_5 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.a11e_1);
            tmp_5.d11e_1 = this_0;
            this.d11e_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_6 = this;
            tmp_6.e11e_1 = this.c11e_1;
            var tmp_7 = this;
            tmp_7.f11e_1 = this.d11e_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.f11e_1, this.e11e_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.g11e_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.g11e_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.h11e_1 = suspendResult;
            var tmp_8 = this;
            var this_1 = this.y11d_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_8.i11e_1 = this.y11d_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.h11e_1);
            this.j11e_1 = requireBodyUrlForUri(this.i11e_1, ensureNotNull(this.w11d_1.nax_1));
            var tmp_9 = this;
            tmp_9.k11e_1 = this.v11d_1.m4r();
            var tmp_10 = this;
            tmp_10.l11e_1 = _get_httpClient__2ty1zc_6(this.v11d_1);
            var tmp_11 = this;
            tmp_11.m11e_1 = this.j11e_1;
            var tmp_12 = this;
            tmp_12.n11e_1 = this.l11e_1;
            var tmp_13 = this;
            tmp_13.o11e_1 = this.n11e_1;
            var tmp_14 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.m11e_1);
            tmp_14.p11e_1 = this_3;
            this.p11e_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_15 = this;
            tmp_15.q11e_1 = this.o11e_1;
            var tmp_16 = this;
            tmp_16.r11e_1 = this.p11e_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.r11e_1, this.q11e_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.s11e_1 = suspendResult;
            this.hd_1 = 4;
            suspendResult = bodyAsDecodedText(this.s11e_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var string = suspendResult;
            var this_4 = this.k11e_1.t45();
            var this_5 = serializer(this_4, createKType(getKClass(MediaContentInfo), arrayOf([]), false));
            var mediaInfo = this.k11e_1.s45(isInterface(this_5, KSerializer) ? this_5 : THROW_CCE(), string);
            l$ret$1: do {
              var this_6 = this.v11d_1.u11f_1;
              while (true) {
                var prevValue = this_6.t2();
                var tmp0_contentEntryVersionUid = this.v11d_1.t11f_1;
                var tmp1_learningSpace = this.v11d_1.qqn().loa();
                var tmp2_manifestUrl = ensureNotNull(this.w11d_1.pax_1);
                var tmp3_contentManifestMap = new ContentManifestMap(this.i11e_1);
                var nextValue = prevValue.f11g(mediaInfo, tmp0_contentEntryVersionUid, tmp1_learningSpace, VOID, tmp2_manifestUrl, tmp3_contentManifestMap);
                if (this_6.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(VideoContentViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new VideoContentViewModel$slambda$slambda(this.v11d_1, this.w11d_1, completion);
    i.x11d_1 = $this$launch;
    return i;
  };
  function VideoContentViewModel$slambda$slambda_0(this$0, $contentEntryVersion, resultContinuation) {
    var i = new VideoContentViewModel$slambda$slambda(this$0, $contentEntryVersion, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function VideoContentViewModel$slambda$slambda_1(this$0, $contentEntryVersion, resultContinuation) {
    this.o11g_1 = this$0;
    this.p11g_1 = $contentEntryVersion;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(VideoContentViewModel$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(VideoContentViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(VideoContentViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.o11g_1.wqn().v7d().rau(this.p11g_1.max_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var contentEntry = suspendResult;
            l$ret$1: do {
              var this_0 = this.o11g_1.u11f_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.f11g(VOID, VOID, VOID, VOID, VOID, VOID, contentEntry);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.o11g_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = contentEntry == null ? null : contentEntry.oav_1;
                var nextValue_0 = prevValue_0.mq6(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(VideoContentViewModel$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new VideoContentViewModel$slambda$slambda_1(this.o11g_1, this.p11g_1, completion);
    i.q11g_1 = $this$launch;
    return i;
  };
  function VideoContentViewModel$slambda$slambda_2(this$0, $contentEntryVersion, resultContinuation) {
    var i = new VideoContentViewModel$slambda$slambda_1(this$0, $contentEntryVersion, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MediaPlayState(timestamp, timeInMillis, totalDuration, resumed) {
    timestamp = timestamp === VOID ? systemTimeInMillis() : timestamp;
    timeInMillis = timeInMillis === VOID ? new Long(0, 0) : timeInMillis;
    totalDuration = totalDuration === VOID ? new Long(0, 0) : totalDuration;
    resumed = resumed === VOID ? false : resumed;
    this.r11g_1 = timestamp;
    this.s11g_1 = timeInMillis;
    this.t11g_1 = totalDuration;
    this.u11g_1 = resumed;
  }
  protoOf(MediaPlayState).v11g = function () {
    var tmp;
    if (this.t11g_1.c7(new Long(0, 0)) > 0) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.s11g_1.cb(toLong(100)).bb(this.t11g_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(MediaPlayState).toString = function () {
    return 'MediaPlayState(timestamp=' + this.r11g_1.toString() + ', timeInMillis=' + this.s11g_1.toString() + ', totalDuration=' + this.t11g_1.toString() + ', resumed=' + this.u11g_1 + ')';
  };
  protoOf(MediaPlayState).hashCode = function () {
    var result = this.r11g_1.hashCode();
    result = imul(result, 31) + this.s11g_1.hashCode() | 0;
    result = imul(result, 31) + this.t11g_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.u11g_1) | 0;
    return result;
  };
  protoOf(MediaPlayState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MediaPlayState))
      return false;
    var tmp0_other_with_cast = other instanceof MediaPlayState ? other : THROW_CCE();
    if (!this.r11g_1.equals(tmp0_other_with_cast.r11g_1))
      return false;
    if (!this.s11g_1.equals(tmp0_other_with_cast.s11g_1))
      return false;
    if (!this.t11g_1.equals(tmp0_other_with_cast.t11g_1))
      return false;
    if (!(this.u11g_1 === tmp0_other_with_cast.u11g_1))
      return false;
    return true;
  };
  function _get_httpClient__2ty1zc_6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.w11f_1;
    httpClient$factory_14();
    return this_0.t2();
  }
  function Companion_205() {
    this.w11g_1 = 'Video';
  }
  var Companion_instance_254;
  function Companion_getInstance_222() {
    return Companion_instance_254;
  }
  function VideoContentViewModel$slambda(this$0, resultContinuation) {
    this.f11h_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(VideoContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(VideoContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(VideoContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.f11h_1.wqn().i7f().fbq(this.f11h_1.t11f_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_elvis_lhs = suspendResult;
            var tmp_0;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_0 = tmp0_elvis_lhs;
            }

            var contentEntryVersion = tmp_0;
            launch(this.g11h_1, VOID, VOID, VideoContentViewModel$slambda$slambda_0(this.f11h_1, contentEntryVersion, null));
            launch(this.g11h_1, VOID, VOID, VideoContentViewModel$slambda$slambda_2(this.f11h_1, contentEntryVersion, null));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(VideoContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new VideoContentViewModel$slambda(this.f11h_1, completion);
    i.g11h_1 = $this$launch;
    return i;
  };
  function VideoContentViewModel$slambda_0(this$0, resultContinuation) {
    var i = new VideoContentViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function VideoContentViewModel(di, savedStateHandle) {
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'Video');
    this.s11f_1 = MutableStateFlow(new MediaPlayState());
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.t11f_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.u11f_1 = MutableStateFlow(new VideoContentUiState());
    this.v11f_1 = asStateFlow(this.u11f_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.w11f_1 = Instance(this, tmp$ret$0, null).a5d(this, httpClient$factory_13());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.<anonymous>' call
        var nextValue = prevValue.mq6(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, VideoContentViewModel$slambda_0(this, null));
  }
  protoOf(VideoContentViewModel).uyc = function () {
    var tmp0_safe_receiver = this.u11f_1.t2().d11g_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oav_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.<get-titleAndLangCode>.<anonymous>' call
      tmp = new TitleAndLangCode(tmp1_safe_receiver, 'en');
    }
    return tmp;
  };
  protoOf(VideoContentViewModel).h11h = function (playState) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.s11f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.onPlayStateChanged.<anonymous>' call
        var nextValue = playState;
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = prevValue;
          break $l$block;
        }
      }
    }
    var prevState = tmp$ret$1;
    if (!(prevState.u11g_1 === playState.u11g_1)) {
      this.sq2(playState.u11g_1);
    }
    this.fq3(playState.v11g());
  };
  function VideoContentUiState(mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen) {
    mediaContentInfo = mediaContentInfo === VOID ? null : mediaContentInfo;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    learningSpace = learningSpace === VOID ? null : learningSpace;
    mediaSrc = mediaSrc === VOID ? null : mediaSrc;
    manifestUrl = manifestUrl === VOID ? null : manifestUrl;
    contentManifestMap = contentManifestMap === VOID ? null : contentManifestMap;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    isFullScreen = isFullScreen === VOID ? false : isFullScreen;
    this.x11f_1 = mediaContentInfo;
    this.y11f_1 = contentEntryVersionUid;
    this.z11f_1 = learningSpace;
    this.a11g_1 = mediaSrc;
    this.b11g_1 = manifestUrl;
    this.c11g_1 = contentManifestMap;
    this.d11g_1 = contentEntry;
    this.e11g_1 = isFullScreen;
  }
  protoOf(VideoContentUiState).i11h = function (mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen) {
    return new VideoContentUiState(mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).f11g = function (mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen, $super) {
    mediaContentInfo = mediaContentInfo === VOID ? this.x11f_1 : mediaContentInfo;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.y11f_1 : contentEntryVersionUid;
    learningSpace = learningSpace === VOID ? this.z11f_1 : learningSpace;
    mediaSrc = mediaSrc === VOID ? this.a11g_1 : mediaSrc;
    manifestUrl = manifestUrl === VOID ? this.b11g_1 : manifestUrl;
    contentManifestMap = contentManifestMap === VOID ? this.c11g_1 : contentManifestMap;
    contentEntry = contentEntry === VOID ? this.d11g_1 : contentEntry;
    isFullScreen = isFullScreen === VOID ? this.e11g_1 : isFullScreen;
    return $super === VOID ? this.i11h(mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen) : $super.i11h.call(this, mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).toString = function () {
    return 'VideoContentUiState(mediaContentInfo=' + this.x11f_1 + ', contentEntryVersionUid=' + this.y11f_1.toString() + ', learningSpace=' + this.z11f_1 + ', mediaSrc=' + this.a11g_1 + ', manifestUrl=' + this.b11g_1 + ', contentManifestMap=' + this.c11g_1 + ', contentEntry=' + this.d11g_1 + ', isFullScreen=' + this.e11g_1 + ')';
  };
  protoOf(VideoContentUiState).hashCode = function () {
    var result = this.x11f_1 == null ? 0 : hashCode(this.x11f_1);
    result = imul(result, 31) + this.y11f_1.hashCode() | 0;
    result = imul(result, 31) + (this.z11f_1 == null ? 0 : this.z11f_1.hashCode()) | 0;
    result = imul(result, 31) + (this.a11g_1 == null ? 0 : getStringHashCode(this.a11g_1)) | 0;
    result = imul(result, 31) + (this.b11g_1 == null ? 0 : getStringHashCode(this.b11g_1)) | 0;
    result = imul(result, 31) + (this.c11g_1 == null ? 0 : this.c11g_1.hashCode()) | 0;
    result = imul(result, 31) + (this.d11g_1 == null ? 0 : this.d11g_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.e11g_1) | 0;
    return result;
  };
  protoOf(VideoContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VideoContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof VideoContentUiState ? other : THROW_CCE();
    if (!equals(this.x11f_1, tmp0_other_with_cast.x11f_1))
      return false;
    if (!this.y11f_1.equals(tmp0_other_with_cast.y11f_1))
      return false;
    if (!equals(this.z11f_1, tmp0_other_with_cast.z11f_1))
      return false;
    if (!(this.a11g_1 == tmp0_other_with_cast.a11g_1))
      return false;
    if (!(this.b11g_1 == tmp0_other_with_cast.b11g_1))
      return false;
    if (!equals(this.c11g_1, tmp0_other_with_cast.c11g_1))
      return false;
    if (!equals(this.d11g_1, tmp0_other_with_cast.d11g_1))
      return false;
    if (!(this.e11g_1 === tmp0_other_with_cast.e11g_1))
      return false;
    return true;
  };
  function httpClient$factory_13() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function httpClient$factory_14() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function _get_resolveXapiLaunchHrefUseCase__8u4pj4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.e11i_1;
    resolveXapiLaunchHrefUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_206() {
    this.i11i_1 = 'XapiContent';
  }
  var Companion_instance_255;
  function Companion_getInstance_223() {
    return Companion_instance_255;
  }
  function XapiContentViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.r11i_1 = this$0;
    this.s11i_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(XapiContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(XapiContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(XapiContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_resolveXapiLaunchHrefUseCase__8u4pj4(this.r11i_1);
            Companion_getInstance_125();
            var tmp0_safe_receiver = this.s11i_1.ba('clazzUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            Companion_getInstance_125();
            var tmp2_safe_receiver = this.s11i_1.ba('courseBlockUid');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            suspendResult = tmp_0.bpa(this.r11i_1.f11i_1, tmp_1, tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var launchHrefResult = suspendResult;
            l$ret$1: do {
              var this_0 = this.r11i_1.g11i_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.w11i(launchHrefResult.up6_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.r11i_1.eqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mq6(VOID, VOID, launchHrefResult.wp6_1.pp9_1, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().q5e('Exception opening xapi content', e);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(XapiContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new XapiContentViewModel$slambda(this.r11i_1, this.s11i_1, completion);
    i.t11i_1 = $this$launch;
    return i;
  };
  function XapiContentViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new XapiContentViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function XapiContentViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'XapiContent');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.e11i_1 = Instance(this_0, tmp$ret$0, null).a5d(this, resolveXapiLaunchHrefUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_1.f11i_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.g11i_1 = MutableStateFlow(new XapiContentUiState(VOID, this.f11i_1));
    this.h11i_1 = asStateFlow(this.g11i_1);
    var tmp_2 = this.rqn();
    launch(tmp_2, VOID, VOID, XapiContentViewModel$slambda_0(this, savedStateHandle, null));
  }
  function XapiContentUiState(url, contentEntryVersionUid) {
    url = url === VOID ? null : url;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    this.u11i_1 = url;
    this.v11i_1 = contentEntryVersionUid;
  }
  protoOf(XapiContentUiState).x11i = function (url, contentEntryVersionUid) {
    return new XapiContentUiState(url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).w11i = function (url, contentEntryVersionUid, $super) {
    url = url === VOID ? this.u11i_1 : url;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.v11i_1 : contentEntryVersionUid;
    return $super === VOID ? this.x11i(url, contentEntryVersionUid) : $super.x11i.call(this, url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).toString = function () {
    return 'XapiContentUiState(url=' + this.u11i_1 + ', contentEntryVersionUid=' + this.v11i_1.toString() + ')';
  };
  protoOf(XapiContentUiState).hashCode = function () {
    var result = this.u11i_1 == null ? 0 : getStringHashCode(this.u11i_1);
    result = imul(result, 31) + this.v11i_1.hashCode() | 0;
    return result;
  };
  protoOf(XapiContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContentUiState ? other : THROW_CCE();
    if (!(this.u11i_1 == tmp0_other_with_cast.u11i_1))
      return false;
    if (!this.v11i_1.equals(tmp0_other_with_cast.v11i_1))
      return false;
    return true;
  };
  function resolveXapiLaunchHrefUseCase$factory() {
    return getPropertyCallableRef('resolveXapiLaunchHrefUseCase', 1, KProperty1, function (receiver) {
      return _get_resolveXapiLaunchHrefUseCase__8u4pj4(receiver);
    }, null);
  }
  function resolveXapiLaunchHrefUseCase$factory_0() {
    return getPropertyCallableRef('resolveXapiLaunchHrefUseCase', 1, KProperty1, function (receiver) {
      return _get_resolveXapiLaunchHrefUseCase__8u4pj4(receiver);
    }, null);
  }
  function encryptPbkdf2(_this__u8e3s4, password, $completion) {
    var tmp = new $encryptPbkdf2COROUTINE$80(_this__u8e3s4, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function doublePbkdf2HashAsBase64(_this__u8e3s4, password, $completion) {
    var tmp = new $doublePbkdf2HashAsBase64COROUTINE$82(_this__u8e3s4, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $encryptPbkdf2COROUTINE$80(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.g11j_1 = _this__u8e3s4;
    this.h11j_1 = password;
  }
  protoOf($encryptPbkdf2COROUTINE$80).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = get_direct(this.g11j_1.fnt_1).f58();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.i11j_1 = tmp_1.d58(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.j11j_1 = this.i11j_1;
            var tmp_4 = this;
            tmp_4.k11j_1 = this.g11j_1.ent_1.wnt_1 + 'api/pbkdf2/encryptPbkdf2';
            var tmp_5 = this;
            tmp_5.l11j_1 = this.j11j_1;
            var tmp_6 = this;
            tmp_6.m11j_1 = this.l11j_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.k11j_1);
            parameter(this_0, 'secret', this.h11j_1);
            tmp_7.n11j_1 = this_0;
            this.n11j_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.o11j_1 = this.m11j_1;
            var tmp_9 = this;
            tmp_9.p11j_1 = this.n11j_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.p11j_1, this.o11j_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.q11j_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.q11j_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            return decodeBase64Bytes(ARGUMENT);
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $doublePbkdf2HashAsBase64COROUTINE$82(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.z11j_1 = _this__u8e3s4;
    this.a11k_1 = password;
  }
  protoOf($doublePbkdf2HashAsBase64COROUTINE$82).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = get_direct(this.z11j_1.fnt_1).f58();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.b11k_1 = tmp_1.d58(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.c11k_1 = this.b11k_1;
            var tmp_4 = this;
            tmp_4.d11k_1 = this.z11j_1.ent_1.wnt_1 + 'api/pbkdf2/doubleEncryptPbkdf2';
            var tmp_5 = this;
            tmp_5.e11k_1 = this.c11k_1;
            var tmp_6 = this;
            tmp_6.f11k_1 = this.e11k_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.d11k_1);
            parameter(this_0, 'secret', this.a11k_1);
            tmp_7.g11k_1 = this_0;
            this.g11k_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.h11k_1 = this.f11k_1;
            var tmp_9 = this;
            tmp_9.i11k_1 = this.g11k_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.i11k_1, this.h11k_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.j11k_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.j11k_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function get_DIContext() {
    _init_properties_DiModule_kt__i4hbld();
    return DIContext;
  }
  var DIContext;
  function get_DIModule() {
    _init_properties_DiModule_kt__i4hbld();
    return DIModule;
  }
  var DIModule;
  function DIModule$lambda($this$FC, props) {
    _init_properties_DiModule_kt__i4hbld();
    // Inline function 'react.ChildrenBuilder.invoke' call
    var this_0 = get_DIContext();
    var value = props.di;
    var block = DIModule$lambda$lambda(props);
    addChild($this$FC, this_0, value, block);
    return Unit_instance;
  }
  function DIModule$lambda$lambda($props) {
    return function ($this$invoke) {
      var this_0 = $props.children;
      addChildNode($this$invoke, this_0);
      return Unit_instance;
    };
  }
  var properties_initialized_DiModule_kt_wik303;
  function _init_properties_DiModule_kt__i4hbld() {
    if (!properties_initialized_DiModule_kt_wik303) {
      properties_initialized_DiModule_kt_wik303 = true;
      DIContext = createContext();
      DIModule = FC(DIModule$lambda);
    }
  }
  function get_NavHostContext() {
    _init_properties_NavHost_kt__jjqoc9();
    return NavHostContext;
  }
  var NavHostContext;
  function get_NavHost() {
    _init_properties_NavHost_kt__jjqoc9();
    return NavHost;
  }
  var NavHost;
  function invoke$effectivePopUpTo(_this__u8e3s4, this$0) {
    var tmp;
    Companion_getInstance_116();
    if (_this__u8e3s4 === '') {
      tmp = get_ustadViewName(this$0.l11k_1);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function NavHostFunction(navigateFn, location, onHideChildren) {
    this.k11k_1 = navigateFn;
    this.l11k_1 = location;
    this.m11k_1 = onHideChildren;
  }
  protoOf(NavHostFunction).n11k = function (cmd) {
    if (cmd instanceof NavigateNavCommand) {
      var tmp1_safe_receiver = cmd.rq9_1.dq4_1;
      var popUpToView = tmp1_safe_receiver == null ? null : invoke$effectivePopUpTo(tmp1_safe_receiver, this);
      if ((popUpToView == null ? true : popUpToView === get_ustadViewName(this.l11k_1)) ? !cmd.rq9_1.fq4_1 ? true : this.l11k_1.key === get_firstLocationKey() : false) {
        Napier_getInstance().i5e('NavHostFunction: go to /' + cmd.pq9_1 + '?' + toUrlQueryString(cmd.qq9_1));
        var replaceNav = (popUpToView === get_ustadViewName(this.l11k_1) ? cmd.rq9_1.eq4_1 : false) ? true : cmd.rq9_1.fq4_1;
        var tmp = '/' + cmd.pq9_1 + '?' + toUrlQueryString(cmd.qq9_1);
        // Inline function 'js.objects.jso' call
        // Inline function 'kotlin.apply' call
        // Inline function 'js.objects.jso' call
        var this_0 = {};
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.components.NavHostFunction.invoke.<anonymous>' call
        this_0.replace = replaceNav;
        setIsNewFirstLocation(this_0, this.l11k_1);
        this.k11k_1(tmp, this_0);
      } else {
        Napier_getInstance().i5e('NavHostFunction: pop, then go /' + cmd.pq9_1 + '?' + toUrlQueryString(cmd.qq9_1));
        clearNavHostCommands(sessionStorage);
        sessionStorage.removeItem('navControllerStackCleared');
        sessionStorage.removeItem('navHostHitPopupto');
        if (!(popUpToView == null)) {
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = popUpToView;
        }
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerClearStack'] = cmd.rq9_1.fq4_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerPopUpToInc'] = cmd.rq9_1.eq4_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerGoToAfterPop'] = '/' + cmd.pq9_1 + '?' + toUrlQueryString(cmd.qq9_1);
        this.m11k_1();
        this.k11k_1(-1);
      }
    } else {
      if (cmd instanceof PopNavCommand) {
        var popUpTo = invoke$effectivePopUpTo(cmd.tq9_1, this);
        if (popUpTo === get_ustadViewName(this.l11k_1) ? cmd.uq9_1 : false) {
          Napier_getInstance().i5e('NavHostFunction: pop to current viewname ' + popUpTo + ' (inclusive) ' + 'e.g. go back one');
          this.k11k_1(-1);
        } else if (!(popUpTo === get_ustadViewName(this.l11k_1))) {
          Napier_getInstance().i5e('NavHostFunction: pop to ' + popUpTo + ' inclusive = ' + cmd.uq9_1);
          sessionStorage.removeItem('navHostHitPopupto');
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = cmd.tq9_1;
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpToInc'] = cmd.uq9_1.toString();
          this.m11k_1();
          this.k11k_1(-1);
        } else {
          Napier_getInstance().i5e('NavHostFunction: pop up to current viewname, inclusive = false?? Nothing to do.');
        }
      } else {
        Napier_getInstance().i5e('NavHostFunction: command ignored: ' + cmd);
      }
    }
  };
  function get_NAVHOST_CLEARSTACK_VIEWNAME() {
    return NAVHOST_CLEARSTACK_VIEWNAME;
  }
  var NAVHOST_CLEARSTACK_VIEWNAME;
  function set_firstLocationKey(value) {
    _init_properties_NavHost_kt__jjqoc9();
    sessionStorage.setItem('firstLocationKey', value);
  }
  function get_firstLocationKey() {
    _init_properties_NavHost_kt__jjqoc9();
    var tmp0_elvis_lhs = sessionStorage.getItem('firstLocationKey');
    return tmp0_elvis_lhs == null ? 'default' : tmp0_elvis_lhs;
  }
  function clearNavHostCommands(_this__u8e3s4) {
    _init_properties_NavHost_kt__jjqoc9();
    _this__u8e3s4.removeItem('navControllerPopUpTo');
    _this__u8e3s4.removeItem('navControllerPopUpToInc');
    _this__u8e3s4.removeItem('navControllerClearStack');
    _this__u8e3s4.removeItem('navControllerGoToAfterPop');
    _this__u8e3s4.removeItem('navHostRoot');
  }
  function setIsNewFirstLocation(_this__u8e3s4, fromLocation) {
    _init_properties_NavHost_kt__jjqoc9();
    if (_this__u8e3s4.replace === true ? fromLocation.key === get_firstLocationKey() : false) {
      _this__u8e3s4.state = json([to('isNewFirstLocation', true)]);
    }
  }
  function NavHost$lambda($this$FC, props) {
    _init_properties_NavHost_kt__jjqoc9();
    var tmp;
    // Inline function 'org.w3c.dom.get' call
    // Inline function 'kotlin.js.asDynamic' call
    if (sessionStorage['navControllerPopUpTo'] == null) {
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = !(sessionStorage['navControllerClearStack'] === 'false');
    } else {
      tmp = false;
    }
    var showChildren$delegate = useState(tmp);
    var navigateFn = useNavigate();
    var location = useLocation();
    // Inline function 'react.useMemo' call
    var dependencies = [navigateFn, location];
    var callback = NavHost$lambda$lambda(navigateFn, location, showChildren$delegate);
    var navHostFunction = useMemo(callback, dependencies);
    // Inline function 'react.ChildrenBuilder.invoke' call
    var this_0 = get_NavHostContext();
    var block = NavHost$lambda$lambda_0(location, props, navigateFn, showChildren$delegate);
    addChild($this$FC, this_0, navHostFunction, block);
    return Unit_instance;
  }
  function invoke$lambda($showChildren$delegate) {
    _init_properties_NavHost_kt__jjqoc9();
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('showChildren', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $showChildren$delegate[0];
  }
  function invoke$lambda_0($showChildren$delegate, value) {
    _init_properties_NavHost_kt__jjqoc9();
    getLocalDelegateReference('showChildren', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $showChildren$delegate[1](value);
    return Unit_instance;
  }
  function NavHost$lambda$lambda$lambda($showChildren$delegate) {
    return function () {
      invoke$lambda_0($showChildren$delegate, false);
      return Unit_instance;
    };
  }
  function NavHost$lambda$lambda($navigateFn, $location, $showChildren$delegate) {
    return function () {
      return new NavHostFunction($navigateFn, $location, NavHost$lambda$lambda$lambda($showChildren$delegate));
    };
  }
  function invoke$launchClearStackTimeout(_this__u8e3s4, navigateFn) {
    return launch(_this__u8e3s4, VOID, VOID, NavHost$lambda$lambda$launchClearStackTimeout$slambda_0(navigateFn, null));
  }
  function invoke$lambda_1($navTimeoutJob$delegate) {
    _init_properties_NavHost_kt__jjqoc9();
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('navTimeoutJob', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $navTimeoutJob$delegate[0];
  }
  function invoke$lambda_2($navTimeoutJob$delegate, value) {
    _init_properties_NavHost_kt__jjqoc9();
    getLocalDelegateReference('navTimeoutJob', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $navTimeoutJob$delegate[1](value);
    return Unit_instance;
  }
  function NavHost$lambda$lambda$lambda_0() {
    _init_properties_NavHost_kt__jjqoc9();
    return CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
  }
  function NavHost$lambda$lambda$lambda_1() {
    _init_properties_NavHost_kt__jjqoc9();
    return null;
  }
  function NavHost$lambda$lambda$lambda_2($location, $navigateFn, $coroutineScope, $navTimeoutJob$delegate, $showChildren$delegate) {
    return function ($this$useEffect) {
      console.log('NavHost: key = ' + $location.key);
      var tmp0_safe_receiver = $location.state;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.js.unsafeCast' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = tmp0_safe_receiver;
      }
      var tmp1_safe_receiver = tmp;
      var isNewFirstLocation = equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver['isNewFirstLocation'], true);
      var tmp_0;
      if (isNewFirstLocation) {
        console.log('NavHost: New first location key = ' + $location.key);
        set_firstLocationKey($location.key);
        tmp_0 = Unit_instance;
      }
      var tmp2_safe_receiver = invoke$lambda_1($navTimeoutJob$delegate);
      if (tmp2_safe_receiver == null)
        null;
      else {
        tmp2_safe_receiver.mr();
      }
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var popupToTarget = sessionStorage['navControllerPopUpTo'];
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var navToAfterPop = sessionStorage['navControllerGoToAfterPop'];
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp3_safe_receiver = sessionStorage['navControllerPopUpToInc'];
      var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : toBoolean(tmp3_safe_receiver);
      var popUpToInclusive = tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp5_safe_receiver = sessionStorage['navControllerClearStack'];
      var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : toBoolean(tmp5_safe_receiver);
      var clearStack = tmp6_elvis_lhs == null ? false : tmp6_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp7_safe_receiver = sessionStorage['navControllerStackCleared'];
      var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : toBoolean(tmp7_safe_receiver);
      var clearStackHitPlaceholder = tmp8_elvis_lhs == null ? false : tmp8_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp9_safe_receiver = sessionStorage['navHostHitPopupto'];
      var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : toBoolean(tmp9_safe_receiver);
      var popUpToHitDestination = tmp10_elvis_lhs == null ? false : tmp10_elvis_lhs;
      Napier_getInstance().c5e('NavHost: useEffect check: key = ' + $location.key + ' ' + ('current viewname = ' + get_ustadViewName($location) + ' ') + ('popUpToTarget = ' + popupToTarget + ' ') + ('navtoAfterPop = ' + navToAfterPop + ' ') + ('popUpToInclusive = ' + popUpToInclusive + ' ') + ('clearStack = ' + clearStack + ' ') + ('clearStackHitPlaceholder = ' + clearStackHitPlaceholder + ' ') + ('popUpToHitDestination = ' + popUpToHitDestination));
      var tmp_1;
      if ((popupToTarget == null ? !clearStack : false) ? !($location.pathname === '/ClearStack') : false) {
        Napier_getInstance().c5e('NavHost: action: no pop or other operation pending, show children');
        invoke$lambda_0($showChildren$delegate, true);
        tmp_1 = Unit_instance;
      } else if (popupToTarget === get_ustadViewName($location) ? popUpToInclusive : false) {
        Napier_getInstance().c5e('NavHost: action: reached popUpTo destination, popUpToInclusive is set, pop once more');
        invoke$lambda_0($showChildren$delegate, false);
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navHostHitPopupto'] = 'true';
        $navigateFn(-1);
        var tmp_2;
        if (!(navToAfterPop == null)) {
          invoke$lambda_2($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
          tmp_2 = Unit_instance;
        }
        tmp_1 = tmp_2;
      } else if (popupToTarget === get_ustadViewName($location) ? true : popUpToHitDestination) {
        Napier_getInstance().c5e('NavHost: action: reached popupToDestination with inclusive = false, or inclusive was true and destination was hit');
        clearNavHostCommands(sessionStorage);
        var tmp_3;
        if (!(navToAfterPop == null)) {
          $navigateFn(navToAfterPop);
          tmp_3 = Unit_instance;
        } else {
          invoke$lambda_0($showChildren$delegate, true);
          tmp_3 = Unit_instance;
        }
        tmp_1 = tmp_3;
      } else if ((clearStack ? $location.key === get_firstLocationKey() : false) ? !clearStackHitPlaceholder : false) {
        Napier_getInstance().c5e('NavHost: action: clearstack was set, reached first entry in history, but did not yet navigate to dummy placeholder. Going to /ClearStack');
        $navigateFn('/ClearStack');
        tmp_1 = Unit_instance;
      } else if ($location.pathname === '/ClearStack') {
        Napier_getInstance().c5e('NavHost: action: reached stack clear dummy placeholder. Going back');
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerStackCleared'] = 'true';
        $navigateFn(-1);
        tmp_1 = Unit_instance;
      } else if (clearStack ? clearStackHitPlaceholder : false) {
        Napier_getInstance().c5e('NavHost: action: clearStack was set and dummy placeholder was hit');
        clearNavHostCommands(sessionStorage);
        var tmp_4;
        if (!(navToAfterPop == null)) {
          // Inline function 'js.objects.jso' call
          // Inline function 'kotlin.apply' call
          // Inline function 'js.objects.jso' call
          var this_0 = {};
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.components.NavHost.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          this_0.replace = true;
          setIsNewFirstLocation(this_0, $location);
          $navigateFn(navToAfterPop, this_0);
          tmp_4 = Unit_instance;
        }
        tmp_1 = tmp_4;
      } else {
        Napier_getInstance().c5e('NavHost: action: need to continue history popping');
        invoke$lambda_0($showChildren$delegate, false);
        // Inline function 'kotlin.takeIf' call
        var this_1 = $navigateFn;
        // Inline function 'kotlin.contracts.contract' call
        var tmp_5;
        // Inline function 'com.ustadmobile.core.components.NavHost.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
        if (!($location.key === get_firstLocationKey())) {
          tmp_5 = this_1;
        } else {
          tmp_5 = null;
        }
        var tmp11_safe_receiver = tmp_5;
        if (tmp11_safe_receiver == null)
          null;
        else {
          tmp11_safe_receiver(-1);
        }
        invoke$lambda_2($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
        tmp_1 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function NavHost$lambda$lambda$launchClearStackTimeout$slambda($navigateFn, resultContinuation) {
    this.w11k_1 = $navigateFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = delay(new Long(250, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Napier_getInstance().c5e('NavHost: action: clearStackTimeout: apparently at the end of history. go to clearstack');
            sessionStorage['navControllerClearStack'] = 'true';
            this.w11k_1('/ClearStack');
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).v1m = function ($this$launch, completion) {
    var i = new NavHost$lambda$lambda$launchClearStackTimeout$slambda(this.w11k_1, completion);
    i.x11k_1 = $this$launch;
    return i;
  };
  function NavHost$lambda$lambda$launchClearStackTimeout$slambda_0($navigateFn, resultContinuation) {
    var i = new NavHost$lambda$lambda$launchClearStackTimeout$slambda($navigateFn, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function NavHost$lambda$lambda_0($location, $props, $navigateFn, $showChildren$delegate) {
    return function ($this$invoke) {
      // Inline function 'react.useMemo' call
      // Inline function 'kotlin.emptyArray' call
      var dependencies = [].slice();
      var callback = NavHost$lambda$lambda$lambda_0;
      var coroutineScope = useMemo(callback, dependencies);
      var navTimeoutJob$delegate = useState_0(NavHost$lambda$lambda$lambda_1);
      // Inline function 'kotlin.arrayOf' call
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp = [$location.key].slice();
      useEffect(tmp, NavHost$lambda$lambda$lambda_2($location, $navigateFn, coroutineScope, navTimeoutJob$delegate, $showChildren$delegate));
      var tmp_0;
      if (invoke$lambda($showChildren$delegate)) {
        var this_0 = $props.children;
        addChildNode($this$invoke, this_0);
        tmp_0 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  var properties_initialized_NavHost_kt_vv2ix1;
  function _init_properties_NavHost_kt__jjqoc9() {
    if (!properties_initialized_NavHost_kt_vv2ix1) {
      properties_initialized_NavHost_kt_vv2ix1 = true;
      NavHostContext = createContext();
      NavHost = FC(NavHost$lambda);
    }
  }
  function get_NavHostClearStackPlaceholder() {
    _init_properties_NavHostClearStackPlaceholder_kt__f93zv7();
    return NavHostClearStackPlaceholder;
  }
  var NavHostClearStackPlaceholder;
  function NavHostClearStackPlaceholder$lambda($this$FC, props) {
    _init_properties_NavHostClearStackPlaceholder_kt__f93zv7();
    return Unit_instance;
  }
  var properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf;
  function _init_properties_NavHostClearStackPlaceholder_kt__f93zv7() {
    if (!properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf) {
      properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf = true;
      NavHostClearStackPlaceholder = FC(NavHostClearStackPlaceholder$lambda);
    }
  }
  function SetPasswordUseCaseJs$invoke$lambda() {
    return 'Exception setting password';
  }
  function $invokeCOROUTINE$83(_this__u8e3s4, activeUserPersonUid, personUid, username, newPassword, currentPassword, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.g11l_1 = _this__u8e3s4;
    this.h11l_1 = activeUserPersonUid;
    this.i11l_1 = personUid;
    this.j11l_1 = username;
    this.k11l_1 = newPassword;
    this.l11l_1 = currentPassword;
  }
  protoOf($invokeCOROUTINE$83).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = this.g11l_1.v11l_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.m11l_1 = tmp_2;
            this.id_1 = 2;
            var tmp_3 = this;
            tmp_3.n11l_1 = this.g11l_1.w11l_1;
            var tmp_4 = this;
            tmp_4.o11l_1 = this.g11l_1.u11l_1.wnt_1 + 'api/account/setpassword';
            var tmp_5 = this;
            tmp_5.p11l_1 = this.n11l_1;
            var tmp_6 = this;
            tmp_6.q11l_1 = this.p11l_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.o11l_1);
            doorNodeIdHeader(this_0, this.m11l_1);
            parameter(this_0, 'nodeActiveUserUid', this.h11l_1);
            parameter(this_0, 'personUid', this.i11l_1.toString());
            parameter(this_0, 'username', this.j11l_1);
            parameter(this_0, 'newPassword', this.k11l_1);
            var tmp0_safe_receiver = this.l11l_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              parameter(this_0, 'currentPassword', tmp0_safe_receiver);
            }

            set_expectSuccess(this_0, false);
            tmp_7.r11l_1 = this_0;
            this.r11l_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_8 = this;
            tmp_8.s11l_1 = this.q11l_1;
            var tmp_9 = this;
            tmp_9.t11l_1 = this.r11l_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.t11l_1, this.s11l_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            if (result.j3b().equals(Companion_getInstance_0().x2y_1)) {
              throw new UnauthorizedException();
            } else if (!isSuccess(result.j3b())) {
              throw IllegalStateException_init_$Create$('Bad response to set password request: ' + result.j3b());
            }

            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_10 = this.kd_1;
            if (tmp_10 instanceof Error) {
              var e = this.kd_1;
              var tmp_11 = Napier_getInstance();
              tmp_11.s5e(e, VOID, SetPasswordUseCaseJs$invoke$lambda);
              throw e;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function SetPasswordUseCaseJs(learningSpace, repo, httpClient) {
    this.u11l_1 = learningSpace;
    this.v11l_1 = repo;
    this.w11l_1 = httpClient;
  }
  protoOf(SetPasswordUseCaseJs).loi = function (activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion) {
    var tmp = new $invokeCOROUTINE$83(this, activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OpenBlobUseCaseJs() {
  }
  protoOf(OpenBlobUseCaseJs).rop = function (item, onProgress, intent, $completion) {
    var element = document.createElement('a');
    element.setAttribute('href', item.zoo_1);
    element.setAttribute('download', item.bop_1);
    element.style.display = 'none';
    document.body.appendChild(element);
    element.click();
    document.body.removeChild(element);
    return Unit_instance;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda($transferJobItemStatusUpdater, this$0, $uriToSaveQueueItems, resultContinuation) {
    this.f11m_1 = $transferJobItemStatusUpdater;
    this.g11m_1 = this$0;
    this.h11m_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).xny = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.xny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.f11m_1.xow(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.g11m_1.m11m_1.k7f();
            var tmp0_safe_receiver = firstOrNull(this.h11m_1);
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p11m_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zcb_1;
            suspendResult = tmp_0.yie(tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs, TransferJobItemStatus_FAILED_getInstance().qkb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).yny = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda(this.f11m_1, this.g11m_1, this.h11m_1, completion);
    i.i11m_1 = it;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda_0($transferJobItemStatusUpdater, this$0, $uriToSaveQueueItems, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda($transferJobItemStatusUpdater, this$0, $uriToSaveQueueItems, resultContinuation);
    var l = function (it, $completion) {
      return i.xny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda($transferJobItemStatusUpdater, $uploadItem) {
    return function (it) {
      $transferJobItemStatusUpdater.uow(new BlobTransferProgressUpdate($uploadItem, it.kpn_1));
      return Unit_instance;
    };
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation) {
    this.y11m_1 = this$0;
    this.z11m_1 = $transferJobItemStatusUpdater;
    this.a11n_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).u1m = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.y11m_1.m11m_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda_0(this.z11m_1, this.y11m_1, this.a11n_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this.y11m_1, this.z11m_1, this.a11n_1, completion);
    i.b11n_1 = $this$withContext;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda_0(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.u1m($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UriToSaveQueueItem(uriToSaveItem, transferJobItem) {
    this.o11m_1 = uriToSaveItem;
    this.p11m_1 = transferJobItem;
  }
  protoOf(UriToSaveQueueItem).toString = function () {
    return 'UriToSaveQueueItem(uriToSaveItem=' + this.o11m_1 + ', transferJobItem=' + this.p11m_1 + ')';
  };
  protoOf(UriToSaveQueueItem).hashCode = function () {
    var result = this.o11m_1.hashCode();
    result = imul(result, 31) + this.p11m_1.hashCode() | 0;
    return result;
  };
  protoOf(UriToSaveQueueItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UriToSaveQueueItem))
      return false;
    var tmp0_other_with_cast = other instanceof UriToSaveQueueItem ? other : THROW_CCE();
    if (!this.o11m_1.equals(tmp0_other_with_cast.o11m_1))
      return false;
    if (!this.p11m_1.equals(tmp0_other_with_cast.p11m_1))
      return false;
    return true;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation) {
    this.k11n_1 = this$0;
    this.l11n_1 = $localUrisToSave;
    this.m11n_1 = $onTransferJobItemCreated;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).f11o = function (it, $completion) {
    var tmp = this.yny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.f11o(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.hd_1 = 1;
            suspendResult = this.k11n_1.m11m_1.j7f().kic(new TransferJob(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.o11n_1 = suspendResult;
            this.p11n_1 = this.o11n_1.mb();
            var tmp_0 = this;
            tmp_0.q11n_1 = this.l11n_1;
            var tmp_1 = this;
            tmp_1.r11n_1 = this.q11n_1;
            var tmp_2 = this;
            tmp_2.s11n_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.q11n_1, 10));
            this.t11n_1 = this.r11n_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.t11n_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.u11n_1 = this.t11n_1.e();
            var tmp_3 = this;
            tmp_3.v11n_1 = this.u11n_1;
            var tmp_4 = this;
            tmp_4.w11n_1 = fetch(this.v11n_1.ror_1);
            this.hd_1 = 3;
            var this_0 = this.w11n_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.x11n_1 = suspendResult;
            this.y11n_1 = this.x11n_1.blob();
            this.hd_1 = 4;
            var this_1 = this.y11n_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.z11n_1 = suspendResult;
            this.a11o_1 = this.z11n_1.size;
            this.b11o_1 = numberToLong(this.a11o_1);
            var tmp_5 = this;
            var tmp0_tjiSrc = this.v11n_1.ror_1;
            var tmp1_tjiTableId = this.v11n_1.tor_1;
            var tmp2_tjiEntityUid = this.v11n_1.sor_1;
            tmp_5.c11o_1 = new TransferJobItem(VOID, this.p11n_1, this.b11o_1, VOID, VOID, tmp0_tjiSrc, VOID, VOID, VOID, tmp1_tjiTableId, tmp2_tjiEntityUid);
            this.hd_1 = 5;
            suspendResult = this.k11n_1.m11m_1.k7f().uie(this.c11o_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.d11o_1 = suspendResult;
            this.e11o_1 = this.d11o_1.mb();
            this.m11n_1(this.v11n_1, this.c11o_1.oky(this.e11o_1));
            this.hd_1 = 6;
            suspendResult = this.k11n_1.n11m_1.mox(this.k11n_1.m11m_1, this.v11n_1.tor_1, this.v11n_1.sor_1, this.e11o_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var ARGUMENT = new UriToSaveQueueItem(this.v11n_1, this.c11o_1.oky(this.e11o_1));
            this.s11n_1.i1(ARGUMENT);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            return this.s11n_1;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).yny = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this.k11n_1, this.l11n_1, this.m11n_1, completion);
    i.n11n_1 = it;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_0(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation);
    var l = function (it, $completion) {
      return i.f11o(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this$0, $uriToSaveQueueItems, resultContinuation) {
    this.o11o_1 = this$0;
    this.p11o_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).l11p = function ($this$coroutineScope, $completion) {
    var tmp = this.v1m($this$coroutineScope, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).he = function (p1, $completion) {
    return this.l11p((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.r11o_1 = new TransferJobItemStatusUpdater(this.o11o_1.m11m_1, null, this.q11o_1);
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.t11o_1 = this.p11o_1;
            var tmp_1 = this;
            tmp_1.u11o_1 = this.t11o_1;
            var tmp_2 = this;
            tmp_2.v11o_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.t11o_1, 10));
            this.w11o_1 = this.u11o_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.w11o_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.x11o_1 = this.w11o_1.e();
            var tmp_3 = this;
            tmp_3.y11o_1 = this.x11o_1;
            this.z11o_1 = new BlobTransferJobItem('', this.y11o_1.p11m_1.ycb_1);
            this.r11o_1.vow(new BlobTransferStatusUpdate(this.z11o_1, TransferJobItemStatus_IN_PROGRESS_getInstance().qkb_1));
            this.a11p_1 = this.o11o_1.j11m_1;
            this.b11p_1 = randomUuidAsString();
            this.c11p_1 = Companion_getInstance_3().o2r(this.y11o_1.o11m_1.ror_1);
            this.d11p_1 = this.o11o_1.k11m_1.wnt_1 + 'api/blob/upload-item';
            var tmp_4 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            var tmp0_safe_receiver = this.y11o_1.o11m_1.uor_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              this_0.s('X-Blob-Response-' + 'Content-Type', listOf_0(tmp0_safe_receiver));
            }

            tmp_4.e11p_1 = asIStringValues(this_0.f3());
            this.hd_1 = 2;
            suspendResult = this.a11p_1.qpn(this.b11p_1, this.c11p_1, this.d11p_1, VOID, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda(this.r11o_1, this.z11o_1), VOID, this.e11p_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.f11p_1 = suspendResult;
            var tmp_5 = this;
            var tmp5_elvis_lhs = this.f11p_1.mpn_1;
            var tmp_6;
            if (tmp5_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('SaveLocalUrisAsBlobUseCaseJs: no response body!');
            } else {
              tmp_6 = tmp5_elvis_lhs;
            }

            tmp_5.g11p_1 = tmp_6;
            this.r11o_1.vow(new BlobTransferStatusUpdate(this.z11o_1, TransferJobItemStatus_COMPLETE_getInstance().qkb_1));
            this.h11p_1 = this.o11o_1.l11m_1.s45(Companion_instance_82.n4r(), this.g11p_1);
            Napier_getInstance().i5e('SaveLocalUrisAsBlobUseCaseJs: upload complete: ' + (this.y11o_1.o11m_1.ror_1 + ' stored as ' + this.h11p_1.roq_1));
            this.i11p_1 = this.h11p_1.zor(this.y11o_1.o11m_1.sor_1, this.y11o_1.o11m_1.tor_1, this.y11o_1.o11m_1.ror_1);
            this.v11o_1.i1(this.i11p_1);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.j11p_1 = this.v11o_1;
            this.hd_1 = 4;
            suspendResult = this.r11o_1.xow(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.s11o_1 = this.j11p_1;
            this.id_1 = 8;
            this.hd_1 = 7;
            continue $sm;
          case 5:
            this.id_1 = 8;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Error) {
              this.k11p_1 = this.kd_1;
              Napier_getInstance().q5e('SaveLocalUriAsBlobUseCaseJs: exception uploading', this.k11p_1);
              this.hd_1 = 6;
              var tmp_8 = NonCancellable_getInstance();
              suspendResult = withContext(tmp_8, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda_0(this.o11o_1, this.r11o_1, this.p11o_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            var tmp_9 = this;
            throw this.k11p_1;
          case 7:
            this.id_1 = 8;
            return this.s11o_1;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).v1m = function ($this$coroutineScope, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this.o11o_1, this.p11o_1, completion);
    i.q11o_1 = $this$coroutineScope;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_2(this$0, $uriToSaveQueueItems, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this$0, $uriToSaveQueueItems, resultContinuation);
    var l = function ($this$coroutineScope, $completion) {
      return i.l11p($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$84(_this__u8e3s4, localUrisToSave, onTransferJobItemCreated, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.u11p_1 = _this__u8e3s4;
    this.v11p_1 = localUrisToSave;
    this.w11p_1 = onTransferJobItemCreated;
  }
  protoOf($invokeCOROUTINE$84).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.u11p_1.m11m_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_0(this.u11p_1, this.v11p_1, this.w11p_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.x11p_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = coroutineScope(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_2(this.u11p_1, this.x11p_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SaveLocalUrisAsBlobUseCaseJs(chunkedUploadClientLocalUriUseCase, learningSpace, json, db, updateTransferJobItemEtagUseCase) {
    updateTransferJobItemEtagUseCase = updateTransferJobItemEtagUseCase === VOID ? new UpdateTransferJobItemEtagUseCase() : updateTransferJobItemEtagUseCase;
    this.j11m_1 = chunkedUploadClientLocalUriUseCase;
    this.k11m_1 = learningSpace;
    this.l11m_1 = json;
    this.m11m_1 = db;
    this.n11m_1 = updateTransferJobItemEtagUseCase;
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs).aos = function (localUrisToSave, onTransferJobItemCreated, $completion) {
    var tmp = new $invokeCOROUTINE$84(this, localUrisToSave, onTransferJobItemCreated, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnqueueSavePictureUseCaseJs$invoke$slambda(this$0, $entityUid, $tableId, $pictureUri, resultContinuation) {
    this.g11q_1 = this$0;
    this.h11q_1 = $entityUid;
    this.i11q_1 = $tableId;
    this.j11q_1 = $pictureUri;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.g11q_1.l11q_1.bos(this.h11q_1, this.i11q_1, this.j11q_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).v1m = function ($this$launch, completion) {
    var i = new EnqueueSavePictureUseCaseJs$invoke$slambda(this.g11q_1, this.h11q_1, this.i11q_1, this.j11q_1, completion);
    i.k11q_1 = $this$launch;
    return i;
  };
  function EnqueueSavePictureUseCaseJs$invoke$slambda_0(this$0, $entityUid, $tableId, $pictureUri, resultContinuation) {
    var i = new EnqueueSavePictureUseCaseJs$invoke$slambda(this$0, $entityUid, $tableId, $pictureUri, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EnqueueSavePictureUseCaseJs(savePictureUseCase) {
    this.l11q_1 = savePictureUseCase;
    this.m11q_1 = CoroutineScope_0(Dispatchers_getInstance().p12_1.lj(Job()));
  }
  protoOf(EnqueueSavePictureUseCaseJs).bos = function (entityUid, tableId, pictureUri, $completion) {
    launch(this.m11q_1, VOID, VOID, EnqueueSavePictureUseCaseJs$invoke$slambda_0(this, entityUid, tableId, pictureUri, null));
    return Unit_instance;
  };
  function SetClipboardStringUseCaseJs() {
  }
  protoOf(SetClipboardStringUseCaseJs).wp1 = function (content) {
    try {
      navigator.clipboard.writeText(content);
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
      } else {
        throw $p;
      }
    }
  };
  function CompressImageUseCaseJs$invoke$lambda($fromUri, $completeable) {
    return function (it) {
      Napier_getInstance().i5e('CompressImageUseCaseJs: compressing ' + $fromUri + ' : success');
      $completeable.gy(it);
      return Unit_instance;
    };
  }
  function CompressImageUseCaseJs$invoke$lambda_0($fromUri, $completeable) {
    return function (it) {
      Napier_getInstance().q5e('CompressImageUseCaseJs: compressing ' + $fromUri + ' : error', it);
      $completeable.iy(it);
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$85(_this__u8e3s4, fromUri, toUri, params, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.v11q_1 = _this__u8e3s4;
    this.w11q_1 = fromUri;
    this.x11q_1 = toUri;
    this.y11q_1 = params;
    this.z11q_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$85).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.a11r_1 = CompletableDeferred();
            Napier_getInstance().i5e('CompressImageUseCaseJs: compressing ' + this.w11q_1);
            this.id_1 = 4;
            var tmp_0 = this;
            tmp_0.b11r_1 = fetch(this.w11q_1);
            this.hd_1 = 1;
            var this_0 = this.b11r_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.c11r_1 = suspendResult;
            this.d11r_1 = this.c11r_1.blob();
            this.hd_1 = 2;
            var this_1 = this.d11r_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.e11r_1 = suspendResult;
            var this_2 = {};
            this_2.maxWidth = this.y11q_1.zp1_1;
            this_2.maxHeight = this.y11q_1.ap2_1;
            this_2.convertSize = 50000;
            this_2.convertTypes = ['image/png'];
            this_2.success = CompressImageUseCaseJs$invoke$lambda(this.w11q_1, this.a11r_1);
            this_2.error = CompressImageUseCaseJs$invoke$lambda_0(this.w11q_1, this.a11r_1);
            new com_ustadmobile_core_wrappers_compressorjs_default_j4zdfk(this.e11r_1, this_2);
            this.hd_1 = 3;
            suspendResult = this.a11r_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var compressedBlob = suspendResult;
            var resultUri = URL.createObjectURL(compressedBlob);
            return new CompressResult(resultUri, compressedBlob.type, numberToLong(this.e11r_1.size), numberToLong(compressedBlob.size));
          case 4:
            this.id_1 = 6;
            var tmp_1 = this.kd_1;
            if (tmp_1 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().q5e('CompressImageUseCase: Exception caught: ', e);
              throw e;
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 6;
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function CompressImageUseCaseJs() {
  }
  protoOf(CompressImageUseCaseJs).f11r = function (fromUri, toUri, params, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$85(this, fromUri, toUri, params, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CompressImageUseCaseJs).cp2 = function (fromUri, toUri, params, onProgress, $completion) {
    return this.f11r(fromUri, toUri, params, onProgress, $completion);
  };
  function Companion_207() {
    this.g11r_1 = 3;
  }
  var Companion_instance_256;
  function Companion_getInstance_224() {
    return Companion_instance_256;
  }
  function ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda($onProgress) {
    return function (it) {
      $onProgress(new ContentEntryGetMetadataStatus(false, VOID, it.kpn_1, it.lpn_1));
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$86(_this__u8e3s4, contentUri, fileName, learningSpace, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.p11r_1 = _this__u8e3s4;
    this.q11r_1 = contentUri;
    this.r11r_1 = fileName;
    this.s11r_1 = learningSpace;
    this.t11r_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$86).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.u11r_1 = randomUuid().toString();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 8;
            this.w11r_1 = until(0, 3).w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.w11r_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.x11r_1 = this.w11r_1.e();
            this.y11r_1 = this.p11r_1.c11s_1;
            this.z11r_1 = this.s11r_1.wnt_1 + 'api/contentupload/upload';
            var tmp_0 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            if (!(this.r11r_1 == null)) {
              this_0.s('upload-original-filename', listOf_0(encodeURIComponent(this.r11r_1)));
            }

            tmp_0.a11s_1 = asIStringValues(this_0.f3());
            this.hd_1 = 4;
            var tmp_1 = new Long(0, 0);
            suspendResult = this.y11r_1.qpn(this.u11r_1, this.q11r_1, this.z11r_1, tmp_1, VOID, ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda(this.t11r_1), VOID, this.a11s_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var finalResponse = suspendResult;
            var tmp4_subject = finalResponse.npn_1;
            if (tmp4_subject === 400) {
              var tmp5_elvis_lhs = finalResponse.mpn_1;
              throw new InvalidContentException(tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs);
            } else if (tmp4_subject === 406) {
              var tmp6_elvis_lhs = finalResponse.mpn_1;
              throw new UnsupportedContentException(tmp6_elvis_lhs == null ? '' : tmp6_elvis_lhs);
            }

            var tmp_2 = this;
            var tmp7_safe_receiver = finalResponse.mpn_1;
            var tmp_3;
            if (tmp7_safe_receiver == null) {
              tmp_3 = null;
            } else {
              tmp_3 = this.p11r_1.b11s_1.s45(Companion_instance_81.n4r(), tmp7_safe_receiver);
            }

            var tmp8_elvis_lhs = tmp_3;
            var tmp_4;
            if (tmp8_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Final response had no body');
            } else {
              tmp_4 = tmp8_elvis_lhs;
            }

            tmp_2.v11r_1 = tmp_4;
            this.id_1 = 9;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            var tmp_5 = this.v11r_1;
            this.id_1 = 9;
            URL.revokeObjectURL(this.q11r_1.toString());
            return tmp_5;
          case 6:
            var tmp_6 = this;
            throw IllegalStateException_init_$Create$('Retried upload 3 times... failed.');
          case 7:
            this.id_1 = 9;
            URL.revokeObjectURL(this.q11r_1.toString());
            return Unit_instance;
          case 8:
            this.id_1 = 9;
            var t = this.kd_1;
            URL.revokeObjectURL(this.q11r_1.toString());
            throw t;
          case 9:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 9) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ContentEntryGetMetaDataFromUriUseCaseJs(json, chunkedUploadClientLocalUriUseCase) {
    this.b11s_1 = json;
    this.c11s_1 = chunkedUploadClientLocalUriUseCase;
  }
  protoOf(ContentEntryGetMetaDataFromUriUseCaseJs).lp3 = function (contentUri, fileName, learningSpace, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$86(this, contentUri, fileName, learningSpace, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function $invokeCOROUTINE$87(_this__u8e3s4, subtitleTrackUri, filename, locale, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.l11s_1 = _this__u8e3s4;
    this.m11s_1 = subtitleTrackUri;
    this.n11s_1 = filename;
    this.o11s_1 = locale;
  }
  protoOf($invokeCOROUTINE$87).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = fetch_0(toString(this.m11s_1.q72_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.q11s_1 = suspendResult;
            this.r11s_1 = this.q11s_1.blob();
            this.hd_1 = 2;
            var this_0 = this.r11s_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.s11s_1 = suspendResult;
            this.t11s_1 = this.s11s_1.text();
            this.hd_1 = 3;
            var this_1 = this.t11s_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.p11s_1 = suspendResult;
            this.id_1 = 8;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.id_1 = 8;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              this.u11s_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().q5e('GetSubtitleTrackFromUriUseCaseJs: exception fetching local uri ' + this.m11s_1, this.u11s_1);
              throw IllegalStateException_init_$Create$_1('Failed to fetch blob for local uri ' + this.m11s_1, this.u11s_1);
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 8;
            this.v11s_1 = this.p11s_1;
            var tmp_2 = this;
            tmp_2.w11s_1 = this.l11s_1.f11t_1;
            var tmp_3 = this;
            tmp_3.x11s_1 = this.l11s_1.e11t_1.wnt_1 + 'api/contentupload/getsubtitletrack';
            var tmp_4 = this;
            tmp_4.y11s_1 = this.w11s_1;
            var tmp_5 = this;
            tmp_5.z11s_1 = this.y11s_1;
            var tmp_6 = this;
            var this_2 = new HttpRequestBuilder();
            url(this_2, this.x11s_1);
            parameter(this_2, 'filename', this.n11s_1);
            var tmp0_elvis_lhs = this.o11s_1;
            parameter(this_2, 'locale', tmp0_elvis_lhs == null ? this.l11s_1.h11t_1.qpm_1 : tmp0_elvis_lhs);
            var body = new TextContent(this.v11s_1, Companion_getInstance_15().o2r('text/vtt; charset=utf-8'));
            if (body == null) {
              this_2.y38_1 = NullBody_instance;
              var tmp_7 = JsType_instance;
              var tmp_8 = getKClass(TextContent);
              var tmp_9;
              try {
                tmp_9 = createKType(getKClass(TextContent), arrayOf([]), false);
              } catch ($p) {
                var tmp_10;
                if ($p instanceof Error) {
                  var cause = $p;
                  tmp_10 = null;
                } else {
                  throw $p;
                }
                tmp_9 = tmp_10;
              }
              this_2.v3e(typeInfoImpl(tmp_7, tmp_8, tmp_9));
            } else {
              if (body instanceof OutgoingContent) {
                this_2.y38_1 = body;
                this_2.v3e(null);
              } else {
                this_2.y38_1 = body;
                var tmp_11 = JsType_instance;
                var tmp_12 = getKClass(TextContent);
                var tmp_13;
                try {
                  tmp_13 = createKType(getKClass(TextContent), arrayOf([]), false);
                } catch ($p) {
                  var tmp_14;
                  if ($p instanceof Error) {
                    var cause_0 = $p;
                    tmp_14 = null;
                  } else {
                    throw $p;
                  }
                  tmp_13 = tmp_14;
                }
                this_2.v3e(typeInfoImpl(tmp_11, tmp_12, tmp_13));
              }
            }

            tmp_6.a11t_1 = this_2;
            this.a11t_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_15 = this;
            tmp_15.b11t_1 = this.z11s_1;
            var tmp_16 = this;
            tmp_16.c11t_1 = this.a11t_1;
            this.hd_1 = 6;
            suspendResult = (new HttpStatement(this.c11t_1, this.b11t_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.d11t_1 = suspendResult;
            this.hd_1 = 7;
            suspendResult = bodyAsText(this.d11t_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            var subtitleJsonStr = suspendResult;
            return this.l11s_1.g11t_1.s45(Companion_instance_80.n4r(), subtitleJsonStr);
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetSubtitleTrackFromUriUseCaseJs(endpoint, httpClient, json, supportedLanguagesConfig) {
    this.e11t_1 = endpoint;
    this.f11t_1 = httpClient;
    this.g11t_1 = json;
    this.h11t_1 = supportedLanguagesConfig;
  }
  protoOf(GetSubtitleTrackFromUriUseCaseJs).xp3 = function (subtitleTrackUri, filename, locale, $completion) {
    var tmp = new $invokeCOROUTINE$87(this, subtitleTrackUri, filename, locale, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function LaunchXapiUseCaseJs$invoke$lambda($resolveResult) {
    return function () {
      return 'LaunchXapiUseCaseJs: launching xapi in new windows: ' + $resolveResult.up6_1;
    };
  }
  function LaunchXapiUseCaseJs$invoke$lambda_0($resolveResult) {
    return function () {
      return 'LaunchXapiUseCaseJs: navigating to: ' + $resolveResult.up6_1;
    };
  }
  function $invokeCOROUTINE$88(_this__u8e3s4, contentEntryVersion, navController, clazzUid, cbUid, target, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.q11t_1 = _this__u8e3s4;
    this.r11t_1 = contentEntryVersion;
    this.s11t_1 = navController;
    this.t11t_1 = clazzUid;
    this.u11t_1 = cbUid;
    this.v11t_1 = target;
  }
  protoOf($invokeCOROUTINE$88).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.q11t_1.w11t_1.bpa(this.r11t_1.lax_1, this.t11t_1, this.u11t_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var resolveResult = suspendResult;
            if (!this.v11t_1.equals(LinkTarget_TOP_getInstance())) {
              var tmp_0 = Napier_getInstance();
              tmp_0.k5e(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda(resolveResult));
              window.open(resolveResult.up6_1, asWindowTarget(this.v11t_1), 'popup=true,noopener,noreferrer');
            } else {
              var tmp_1 = Napier_getInstance();
              tmp_1.k5e(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda_0(resolveResult));
              location.href = resolveResult.up6_1;
            }

            return new LaunchResult();
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function LaunchXapiUseCaseJs(resolveXapiLaunchHrefUseCase) {
    this.w11t_1 = resolveXapiLaunchHrefUseCase;
  }
  protoOf(LaunchXapiUseCaseJs).qp6 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    var tmp = new $invokeCOROUTINE$88(this, contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LaunchXapiUseCaseJs).sp6 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.qp6(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function SetLanguageUseCaseJs(languagesConfig) {
    this.x11t_1 = languagesConfig;
  }
  protoOf(SetLanguageUseCaseJs).mpi = function (uiLang, currentDestination, navController, navArgs) {
    var currentDisplayLang = this.x11t_1.qpm_1;
    this.x11t_1.rq7(uiLang.hq4_1);
    var newDisplayLang = this.x11t_1.qpm_1;
    if (!(currentDisplayLang === newDisplayLang)) {
      location.reload();
    }
    return new SetLangResult(false);
  };
  function invoke$lambda_3($makeLinkUseCase$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('makeLinkUseCase', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $makeLinkUseCase$delegate.t2();
  }
  function GoToLearningSpaceUseCaseJs(di) {
    this.y11t_1 = di;
  }
  protoOf(GoToLearningSpaceUseCaseJs).opi = function (url, navController, args, viewName) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_0 = this.y11t_1;
    var context = new LearningSpace(url);
    var trigger = this_0.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.h57(tmp$ret$0, context);
    var this_1 = On(this_0, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var makeLinkUseCase$delegate = Instance(this_1, tmp$ret$3, null).a5d(null, getLocalDelegateReference('makeLinkUseCase', KProperty0, false, function () {
      return THROW_ISE();
    }));
    var finalUrl = invoke$lambda_3(makeLinkUseCase$delegate).upi(viewName, args);
    location.href = finalUrl;
  };
  function OpenExternalLinkUseCaseJs() {
  }
  protoOf(OpenExternalLinkUseCaseJs).cpj = function (url, target) {
    window.open(url, asWindowTarget(target));
  };
  function BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this$0, $text, $accountPersonUid, $onProgress, resultContinuation) {
    this.h11u_1 = this$0;
    this.i11u_1 = $text;
    this.j11u_1 = $accountPersonUid;
    this.k11u_1 = $onProgress;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).i11v = function ($this$coroutineScope, $completion) {
    var tmp = this.v1m($this$coroutineScope, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.i11v((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            tmp_0.m11u_1 = this.h11u_1.j11v_1;
            var tmp_1 = this;
            tmp_1.n11u_1 = this.h11u_1.k11v_1.wnt_1 + 'api/person/bulkadd/enqueue';
            var tmp_2 = this;
            tmp_2.o11u_1 = this.m11u_1;
            var tmp_3 = this;
            tmp_3.p11u_1 = this.o11u_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.n11u_1);
            var body = new TextContent(this.i11u_1, Text_getInstance().q2s_1);
            if (body == null) {
              this_0.y38_1 = NullBody_instance;
              var tmp_5 = JsType_instance;
              var tmp_6 = getKClass(TextContent);
              var tmp_7;
              try {
                tmp_7 = createKType(getKClass(TextContent), arrayOf([]), false);
              } catch ($p) {
                var tmp_8;
                if ($p instanceof Error) {
                  var cause = $p;
                  tmp_8 = null;
                } else {
                  throw $p;
                }
                tmp_7 = tmp_8;
              }
              this_0.v3e(typeInfoImpl(tmp_5, tmp_6, tmp_7));
            } else {
              if (body instanceof OutgoingContent) {
                this_0.y38_1 = body;
                this_0.v3e(null);
              } else {
                this_0.y38_1 = body;
                var tmp_9 = JsType_instance;
                var tmp_10 = getKClass(TextContent);
                var tmp_11;
                try {
                  tmp_11 = createKType(getKClass(TextContent), arrayOf([]), false);
                } catch ($p) {
                  var tmp_12;
                  if ($p instanceof Error) {
                    var cause_0 = $p;
                    tmp_12 = null;
                  } else {
                    throw $p;
                  }
                  tmp_11 = tmp_12;
                }
                this_0.v3e(typeInfoImpl(tmp_9, tmp_10, tmp_11));
              }
            }

            parameter(this_0, 'accountPersonUid', this.j11u_1.toString());
            var tmp_13 = this.h11u_1.m11v_1;
            doorNodeAndVersionHeaders(this_0, isInterface(tmp_13, DoorDatabaseRepository) ? tmp_13 : THROW_CCE());
            tmp_4.q11u_1 = this_0;
            this.q11u_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_14 = this;
            tmp_14.r11u_1 = this.p11u_1;
            var tmp_15 = this;
            tmp_15.s11u_1 = this.q11u_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.s11u_1, this.r11u_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.t11u_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.t11u_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.u11u_1 = suspendResult;
            this.v11u_1 = toLong_0(this.u11u_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!get_isActive(this.l11u_1)) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.id_1 = 7;
            var tmp_16 = this;
            tmp_16.w11u_1 = this.h11u_1.j11v_1;
            var tmp_17 = this;
            tmp_17.x11u_1 = this.h11u_1.k11v_1.wnt_1 + 'api/person/bulkadd/status';
            var tmp_18 = this;
            tmp_18.y11u_1 = this.w11u_1;
            var tmp_19 = this;
            tmp_19.z11u_1 = this.y11u_1;
            var tmp_20 = this;
            var this_1 = new HttpRequestBuilder();
            url(this_1, this.x11u_1);
            parameter(this_1, 'timestamp', this.v11u_1.toString());
            tmp_20.a11v_1 = this_1;
            this.a11v_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_21 = this;
            tmp_21.b11v_1 = this.z11u_1;
            var tmp_22 = this;
            tmp_22.c11v_1 = this.a11v_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.c11v_1, this.b11v_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.d11v_1 = suspendResult;
            if (this.d11v_1.j3b().f30_1 === 200) {
              var tmp_23 = this;
              tmp_23.e11v_1 = this.h11u_1.l11v_1;
              this.hd_1 = 5;
              suspendResult = bodyAsText(this.d11v_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 6;
              continue $sm;
            }

          case 5:
            this.f11v_1 = suspendResult;
            var tmp_24 = this;
            var this_2 = this.e11v_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(BulkAddPersonRunImportUiState), arrayOf([]), false));
            tmp_24.g11v_1 = this.e11v_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), this.f11v_1);
            if (this.g11v_1.cz0_1) {
              this.k11u_1.lz0(this.g11v_1.ez0_1, this.g11v_1.dz0_1);
            } else {
              if (this.g11v_1.ru4()) {
                throw new BulkAddPersonException(this.g11v_1.gz0_1, this.g11v_1.fz0_1);
              }
              return new BulkAddUsersResult(this.g11v_1.ez0_1);
            }

            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.id_1 = 11;
            this.hd_1 = 8;
            continue $sm;
          case 7:
            this.id_1 = 11;
            var tmp_25 = this.kd_1;
            if (tmp_25 instanceof Error) {
              this.h11v_1 = this.kd_1;
              Napier_getInstance().m5e('BulkAddPersonFromLocalUriUseCaseJs exception', this.h11v_1);
              var tmp_26 = this.h11v_1;
              if (tmp_26 instanceof BulkAddPersonException)
                throw this.h11v_1;
              this.hd_1 = 8;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 11;
            this.hd_1 = 9;
            suspendResult = delay(new Long(1000, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            this.hd_1 = 3;
            continue $sm;
          case 10:
            throw IllegalStateException_init_$Create$('Should not get here');
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).v1m = function ($this$coroutineScope, completion) {
    var i = new BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this.h11u_1, this.i11u_1, this.j11u_1, this.k11u_1, completion);
    i.l11u_1 = $this$coroutineScope;
    return i;
  };
  function BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda_0(this$0, $text, $accountPersonUid, $onProgress, resultContinuation) {
    var i = new BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this$0, $text, $accountPersonUid, $onProgress, resultContinuation);
    var l = function ($this$coroutineScope, $completion) {
      return i.i11v($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$89(_this__u8e3s4, uri, accountPersonUid, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.v11v_1 = _this__u8e3s4;
    this.w11v_1 = uri;
    this.x11v_1 = accountPersonUid;
    this.y11v_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$89).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            console.log('Getting csv text');
            this.hd_1 = 1;
            suspendResult = fetch_0(this.w11v_1.toString(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.z11v_1 = suspendResult;
            this.a11w_1 = this.z11v_1.text();
            this.hd_1 = 2;
            var this_0 = this.a11w_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.b11w_1 = suspendResult;
            console.log('csv text = ' + this.b11w_1);
            this.hd_1 = 3;
            suspendResult = coroutineScope(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda_0(this.v11v_1, this.b11w_1, this.x11v_1, this.y11v_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function BulkAddPersonsFromLocalUriUseCaseJs(httpClient, learningSpace, json, repo) {
    this.j11v_1 = httpClient;
    this.k11v_1 = learningSpace;
    this.l11v_1 = json;
    this.m11v_1 = repo;
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs).spl = function (uri, accountPersonUid, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$89(this, uri, accountPersonUid, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OnClickPhoneNumUseCaseJs() {
  }
  protoOf(OnClickPhoneNumUseCaseJs).wp1 = function (number) {
    var tmp = window;
    var tmp_0 = 'tel:' + number;
    // Inline function 'web.window.WindowTarget.Companion._blank' call
    0;
    tmp.open(tmp_0, '_blank');
  };
  function PhoneNumValidatorUseCaseJs() {
  }
  protoOf(PhoneNumValidatorUseCaseJs).iph = function (phoneNumber) {
    var tmp;
    try {
      tmp = parsePhoneNumber(phoneNumber, null, null).isValid();
    } catch ($p) {
      var tmp_0;
      if ($p instanceof Error) {
        var e = $p;
        tmp_0 = false;
      } else {
        throw $p;
      }
      tmp = tmp_0;
    }
    return tmp;
  };
  function PhoneNumberJs(phoneNumber) {
    this.c11w_1 = phoneNumber;
  }
  function PhoneNumberUtilJs() {
  }
  protoOf(PhoneNumberUtilJs).wpl = function (numberToParse, defaultRegion) {
    return new PhoneNumberJs(parsePhoneNumber(numberToParse, defaultRegion, null));
  };
  protoOf(PhoneNumberUtilJs).xpl = function (number) {
    return (number instanceof PhoneNumberJs ? number : THROW_CCE()).c11w_1.formatInternational();
  };
  function OnClickSendEmailUseCaseJs() {
  }
  protoOf(OnClickSendEmailUseCaseJs).wp1 = function (emailAddr) {
    var tmp = window;
    var tmp_0 = 'mailto:' + emailAddr;
    // Inline function 'web.window.WindowTarget.Companion._blank' call
    0;
    tmp.open(tmp_0, '_blank');
  };
  function DeleteUrisUseCaseJs$invoke$lambda($uri) {
    return function () {
      return 'DeleteUrisUseCase: deleting (revoking) ' + $uri;
    };
  }
  function DeleteUrisUseCaseJs(isTempFileCheckerUseCase) {
    this.d11w_1 = isTempFileCheckerUseCase;
  }
  protoOf(DeleteUrisUseCaseJs).dou = function (uris, onlyIfTemp, $completion) {
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = uris.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.tmpfiles.DeleteUrisUseCaseJs.invoke.<anonymous>' call
      if (!onlyIfTemp ? true : this.d11w_1.up9(element)) {
        var tmp = Napier_getInstance();
        tmp.k5e(VOID, VOID, DeleteUrisUseCaseJs$invoke$lambda(element));
        URL.revokeObjectURL(element);
      }
    }
    return Unit_instance;
  };
  function IsTempFileCheckerUseCaseJs() {
  }
  protoOf(IsTempFileCheckerUseCaseJs).up9 = function (uri) {
    return startsWith(uri, 'blob:');
  };
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.fpn_1;
    };
  }
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.fpn_1 + ' complete ';
    };
  }
  function $invokeCOROUTINE$90(_this__u8e3s4, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.m11w_1 = _this__u8e3s4;
    this.n11w_1 = uploadUuid;
    this.o11w_1 = localUri;
    this.p11w_1 = remoteUrl;
    this.q11w_1 = fromByte;
    this.r11w_1 = chunkSize;
    this.s11w_1 = onProgress;
    this.t11w_1 = onStatusChange;
    this.u11w_1 = lastChunkHeaders;
  }
  protoOf($invokeCOROUTINE$90).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            this.v11w_1 = 'ChunkedUploadClientLocalUriUseCaseJs (' + this.n11w_1 + ') : ' + this.o11w_1 + ' -> ' + this.p11w_1 + ':';
            this.id_1 = 13;
            Napier_getInstance().i5e(this.v11w_1 + ' : starting');
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = fetch_0(toString(this.o11w_1.q72_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.x11w_1 = suspendResult;
            this.y11w_1 = this.x11w_1.blob();
            this.hd_1 = 2;
            var this_0 = this.y11w_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.w11w_1 = suspendResult;
            this.id_1 = 13;
            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.id_1 = 13;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              this.z11w_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().q5e(this.v11w_1 + ' exception fetching local uri ' + this.o11w_1, this.z11w_1);
              throw IllegalStateException_init_$Create$_1(this.v11w_1 + ': failed to fetch blob for local uri ' + this.o11w_1.q72_1, this.z11w_1);
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 13;
            this.a11x_1 = this.w11w_1;
            this.b11x_1 = this.a11x_1.size;
            if (this.b11x_1 <= 0.0)
              throw IllegalArgumentException_init_$Create$('Upload size <= 0');
            this.c11x_1 = new ChunkInfo(numberToLong(this.b11x_1), this.r11w_1, this.q11w_1);
            if (this.b11x_1 >= IntCompanionObject_instance.MAX_VALUE)
              throw IllegalArgumentException_init_$Create$('JS: upload size(' + numberToLong(this.b11x_1).toString() + ') > ' + IntCompanionObject_instance.MAX_VALUE + ' not supported');
            this.t11w_1(TransferJobItemStatus_IN_PROGRESS_getInstance());
            var tmp_2 = this;
            tmp_2.d11x_1 = this.c11x_1;
            this.e11x_1 = 0;
            this.f11x_1 = this.d11x_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.f11x_1.f()) {
              this.hd_1 = 12;
              continue $sm;
            }

            this.g11x_1 = this.f11x_1.e();
            var tmp_3 = this;
            var tmp1 = this.e11x_1;
            this.e11x_1 = tmp1 + 1 | 0;
            tmp_3.h11x_1 = checkIndexOverflow(tmp1);
            var tmp_4 = this;
            tmp_4.i11x_1 = this.g11x_1;
            var tmp_5 = Napier_getInstance();
            tmp_5.e5e(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda(this.v11w_1, this.h11x_1, this.c11x_1));
            this.j11x_1 = this.a11x_1.slice(this.i11x_1.gpn_1.a7(), this.i11x_1.hpn_1.a7());
            this.id_1 = 7;
            var tmp_6 = this;
            var this_1 = {};
            this_1.body = this.j11x_1;
            this_1.method = 'POST';
            var this_2 = new Headers();
            this_2.set(get_HEADER_UPLOAD_UUID(), this.n11w_1);
            this_2.set(get_HEADER_IS_FINAL_CHUNK(), this.i11x_1.ipn_1.toString());
            this_2.set(get_HEADER_UPLOAD_START_BYTE(), this.i11x_1.gpn_1.toString());
            if (this.i11x_1.ipn_1 ? !(this.u11w_1 == null) : false) {
              var tmp0_iterator = this.u11w_1.o2n().w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_iterator_0 = this.u11w_1.n2n(element).w();
                while (tmp0_iterator_0.f()) {
                  var element_0 = tmp0_iterator_0.e();
                  this_2.append(element, element_0);
                }
              }
            }

            this_1.headers = this_2;
            tmp_6.l11x_1 = fetch(this.p11w_1, this_1);
            this.hd_1 = 6;
            var this_3 = this.l11x_1;
            suspendResult = await_0(this_3, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.k11x_1 = suspendResult;
            this.id_1 = 13;
            this.hd_1 = 8;
            continue $sm;
          case 7:
            this.id_1 = 13;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Error) {
              this.m11x_1 = this.kd_1;
              var tmp_8 = this;
              Napier_getInstance().q5e(this.v11w_1 + ' exception fetching response for blob upload ' + ('fromByte=' + this.c11x_1.dpn_1.toString()), this.m11x_1);
              throw IllegalStateException_init_$Create$_1(this.v11w_1 + ' exception fetching response for blob upload ', this.m11x_1);
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 13;
            this.n11x_1 = this.k11x_1;
            var tmp_9 = Napier_getInstance();
            tmp_9.e5e(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0(this.v11w_1, this.h11x_1, this.c11x_1));
            this.s11w_1(new UploadProgress(this.i11x_1.hpn_1, numberToLong(this.b11x_1)));
            if (this.i11x_1.ipn_1) {
              this.t11w_1(TransferJobItemStatus_COMPLETE_getInstance());
              Napier_getInstance().i5e(this.v11w_1 + ': Complete!');
              if (!(this.n11x_1.status === 204)) {
                var tmp_10 = this;
                tmp_10.p11x_1 = this.n11x_1.text();
                this.hd_1 = 10;
                var this_4 = this.p11x_1;
                suspendResult = await_0(this_4, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_11 = this;
                tmp_11.o11x_1 = null;
                this.hd_1 = 11;
                continue $sm;
              }
            } else {
              this.hd_1 = 9;
              continue $sm;
            }

          case 9:
            this.hd_1 = 5;
            continue $sm;
          case 10:
            this.o11x_1 = suspendResult;
            this.hd_1 = 11;
            continue $sm;
          case 11:
            var ARGUMENT = this.o11x_1;
            return new LastChunkResponse(ARGUMENT, this.n11x_1.status, asIStringValues_0(this.n11x_1.headers));
          case 12:
            throw IllegalStateException_init_$Create$(this.v11w_1 + ' should have returned with last chunk');
          case 13:
            this.id_1 = 14;
            var tmp_12 = this.kd_1;
            if (tmp_12 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().q5e(this.v11w_1 + ', ChunkedUploadClientLocalUriUseCaseJs: Exception', e);
              this.t11w_1(TransferJobItemStatus_FAILED_getInstance());
              throw e;
            } else {
              throw this.kd_1;
            }

          case 14:
            throw this.kd_1;
          case 15:
            this.id_1 = 14;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function ChunkedUploadClientLocalUriUseCaseJs() {
  }
  protoOf(ChunkedUploadClientLocalUriUseCaseJs).ppn = function (uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) {
    var tmp = new $invokeCOROUTINE$90(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SaveStatementOnClearUseCaseJs$invoke$slambda(this$0, $statements, $xapiSession, resultContinuation) {
    this.y11x_1 = this$0;
    this.z11x_1 = $statements;
    this.a11y_1 = $xapiSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.y11x_1.c11y_1.wok(this.z11x_1, this.a11y_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).v1m = function ($this$launch, completion) {
    var i = new SaveStatementOnClearUseCaseJs$invoke$slambda(this.y11x_1, this.z11x_1, this.a11y_1, completion);
    i.b11y_1 = $this$launch;
    return i;
  };
  function SaveStatementOnClearUseCaseJs$invoke$slambda_0(this$0, $statements, $xapiSession, resultContinuation) {
    var i = new SaveStatementOnClearUseCaseJs$invoke$slambda(this$0, $statements, $xapiSession, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveStatementOnClearUseCaseJs(xapiStatementResource) {
    this.c11y_1 = xapiStatementResource;
  }
  protoOf(SaveStatementOnClearUseCaseJs).hq3 = function (statements, xapiSession) {
    var tmp = GlobalScope_instance;
    launch(tmp, VOID, VOID, SaveStatementOnClearUseCaseJs$invoke$slambda_0(this, statements, xapiSession, null));
  };
  function SaveStatementOnUnloadUseCaseJs(learningSpace, json) {
    this.d11y_1 = learningSpace;
    this.e11y_1 = json;
  }
  protoOf(SaveStatementOnUnloadUseCaseJs).hq3 = function (statements, xapiSession) {
    var tmp = navigator;
    var tmp_0 = this.d11y_1.wnt_1 + 'api/xapi-ext/statementOnUnload';
    // Inline function 'web.http.BodyInit' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$2 = this.e11y_1.r45(Companion_getInstance_94().n4r(), new XapiStatementsAndSession(statements, xapiSession));
    tmp.sendBeacon(tmp_0, tmp$ret$2);
  };
  function $invokeCOROUTINE$91(_this__u8e3s4, accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.n11y_1 = _this__u8e3s4;
    this.o11y_1 = accountPersonUid;
    this.p11y_1 = actor;
    this.q11y_1 = activityId;
    this.r11y_1 = clazzUid;
    this.s11y_1 = cbUid;
    this.t11y_1 = contentEntryUid;
    this.u11y_1 = contentEntryVersionUid;
  }
  protoOf($invokeCOROUTINE$91).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.v11y_1 = this.n11y_1.e11z_1;
            var tmp_1 = this;
            tmp_1.w11y_1 = this.n11y_1.d11z_1.wnt_1 + 'api/xapi-ext/resumeOrStartSession';
            var tmp_2 = this;
            tmp_2.x11y_1 = this.v11y_1;
            var tmp_3 = this;
            tmp_3.y11y_1 = this.x11y_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.w11y_1);
            var tmp_5 = this.n11y_1.f11z_1;
            doorNodeIdHeader(this_0, isInterface(tmp_5, DoorDatabaseRepository) ? tmp_5 : THROW_CCE());
            parameter(this_0, 'accountPersonUid', this.o11y_1.toString());
            parameter(this_0, 'actor', this.n11y_1.g11z_1.r45(Companion_instance_112.n4r(), this.p11y_1));
            parameter(this_0, 'activityId', this.q11y_1);
            parameter(this_0, 'clazzUid', this.r11y_1.toString());
            parameter(this_0, 'cbUid', this.s11y_1.toString());
            parameter(this_0, 'contentEntryUid', this.t11y_1.toString());
            parameter(this_0, 'contentEntryVersionUid', this.u11y_1.toString());
            tmp_4.z11y_1 = this_0;
            this.z11y_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_6 = this;
            tmp_6.a11z_1 = this.y11y_1;
            var tmp_7 = this;
            tmp_7.b11z_1 = this.z11y_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.b11z_1, this.a11z_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.c11z_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_8 = this.c11z_1.e3c();
            var tmp_9 = JsType_instance;
            var tmp_10 = getKClass(XapiSessionEntity);
            var tmp_11;
            try {
              tmp_11 = createKType(getKClass(XapiSessionEntity), arrayOf([]), false);
            } catch ($p) {
              var tmp_12;
              if ($p instanceof Error) {
                var cause = $p;
                tmp_12 = null;
              } else {
                throw $p;
              }
              tmp_11 = tmp_12;
            }

            suspendResult = tmp_8.h3b(typeInfoImpl(tmp_9, tmp_10, tmp_11), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var result = suspendResult instanceof XapiSessionEntity ? suspendResult : THROW_CCE();
            return result;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ResumeOrStartXapiSessionUseCaseJs(learningSpace, httpClient, repo, xapiJson) {
    this.d11z_1 = learningSpace;
    this.e11z_1 = httpClient;
    this.f11z_1 = repo;
    this.g11z_1 = xapiJson.hpr_1;
  }
  protoOf(ResumeOrStartXapiSessionUseCaseJs).tp9 = function (accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, $completion) {
    var tmp = new $invokeCOROUTINE$91(this, accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function collectAsState(_this__u8e3s4, initialState, dispatcher) {
    dispatcher = dispatcher === VOID ? Dispatchers_getInstance().t12() : dispatcher;
    var state = useState_0(collectAsState$lambda(initialState));
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp = [_this__u8e3s4, dispatcher].slice();
    useEffect(tmp, collectAsState$lambda_0(dispatcher, _this__u8e3s4, state));
    return state;
  }
  function collectAsState$lambda($initialState) {
    return function () {
      return $initialState;
    };
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_42(function_0) {
    this.h11z_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_42).t1d = function (value, $completion) {
    return this.h11z_1(value, $completion);
  };
  function collectAsState$lambda$slambda$slambda($state, resultContinuation) {
    this.q11z_1 = $state;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectAsState$lambda$slambda$slambda).e1o = function (it, $completion) {
    var tmp = this.f1o(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectAsState$lambda$slambda$slambda).he = function (p1, $completion) {
    return this.e1o((p1 == null ? true : !(p1 == null)) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectAsState$lambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          this.q11z_1[1](this.r11z_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(collectAsState$lambda$slambda$slambda).f1o = function (it, completion) {
    var i = new collectAsState$lambda$slambda$slambda(this.q11z_1, completion);
    i.r11z_1 = it;
    return i;
  };
  function collectAsState$lambda$slambda$slambda_0($state, resultContinuation) {
    var i = new collectAsState$lambda$slambda$slambda($state, resultContinuation);
    var l = function (it, $completion) {
      return i.e1o(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function collectAsState$lambda$slambda($this_collectAsState, $state, resultContinuation) {
    this.a120_1 = $this_collectAsState;
    this.b120_1 = $state;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectAsState$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectAsState$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectAsState$lambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = collectAsState$lambda$slambda$slambda_0(this.b120_1, null);
            suspendResult = this.a120_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_42(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(collectAsState$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new collectAsState$lambda$slambda(this.a120_1, this.b120_1, completion);
    i.c120_1 = $this$launch;
    return i;
  };
  function collectAsState$lambda$slambda_0($this_collectAsState, $state, resultContinuation) {
    var i = new collectAsState$lambda$slambda($this_collectAsState, $state, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function collectAsState$lambda$lambda($coroutineScope) {
    return function () {
      cancel($coroutineScope);
      return Unit_instance;
    };
  }
  function collectAsState$lambda_0($dispatcher, $this_collectAsState, $state) {
    return function ($this$useEffect) {
      var coroutineScope = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
      launch(coroutineScope, $dispatcher, VOID, collectAsState$lambda$slambda_0($this_collectAsState, $state, null));
      $this$useEffect.push(collectAsState$lambda$lambda(coroutineScope));
      return Unit_instance;
    };
  }
  function useOnUnloadEffect(block) {
    // Inline function 'kotlin.emptyArray' call
    var tmp = [].slice();
    useEffect(tmp, useOnUnloadEffect$lambda(block));
  }
  function useOnUnloadEffect$lambda$lambda($block) {
    return function (it) {
      $block();
      return Unit_instance;
    };
  }
  function useOnUnloadEffect$lambda$lambda_0($evtListener) {
    return function () {
      window.removeEventListener('beforeunload', $evtListener);
      return Unit_instance;
    };
  }
  function useOnUnloadEffect$lambda($block) {
    return function ($this$useEffect) {
      var evtListener = useOnUnloadEffect$lambda$lambda($block);
      window.addEventListener('beforeunload', evtListener);
      $this$useEffect.push(useOnUnloadEffect$lambda$lambda_0(evtListener));
      return Unit_instance;
    };
  }
  function useLaunchedEffect(dependencies, block) {
    var tmp = dependencies.slice();
    useEffect(tmp, useLaunchedEffect$lambda(block));
  }
  function useCoroutineScope(dependencies) {
    // Inline function 'react.useMemo' call
    var dependencies_0 = dependencies.slice();
    var callback = useCoroutineScope$lambda;
    var coroutineScope = useMemo(callback, dependencies_0);
    var tmp = dependencies.slice();
    useEffect(tmp, useCoroutineScope$lambda_0(coroutineScope));
    return coroutineScope;
  }
  function useLaunchedEffect$lambda$slambda($block, resultContinuation) {
    this.l120_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useLaunchedEffect$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useLaunchedEffect$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(useLaunchedEffect$lambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.l120_1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(useLaunchedEffect$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new useLaunchedEffect$lambda$slambda(this.l120_1, completion);
    i.m120_1 = $this$launch;
    return i;
  };
  function useLaunchedEffect$lambda$slambda_0($block, resultContinuation) {
    var i = new useLaunchedEffect$lambda$slambda($block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function useLaunchedEffect$lambda$lambda($coroutineScope) {
    return function () {
      cancel($coroutineScope);
      return Unit_instance;
    };
  }
  function useLaunchedEffect$lambda($block) {
    return function ($this$useEffect) {
      var coroutineScope = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
      launch(coroutineScope, VOID, VOID, useLaunchedEffect$lambda$slambda_0($block, null));
      $this$useEffect.push(useLaunchedEffect$lambda$lambda(coroutineScope));
      return Unit_instance;
    };
  }
  function useCoroutineScope$lambda() {
    return CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
  }
  function useCoroutineScope$lambda$lambda($coroutineScope) {
    return function () {
      cancel($coroutineScope);
      return Unit_instance;
    };
  }
  function useCoroutineScope$lambda_0($coroutineScope) {
    return function ($this$useEffect) {
      $this$useEffect.push(useCoroutineScope$lambda$lambda($coroutineScope));
      return Unit_instance;
    };
  }
  function get_ustadViewName(_this__u8e3s4) {
    // Inline function 'kotlin.text.trim' call
    var this_0 = removePrefix(_this__u8e3s4.pathname, '/');
    return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
  }
  function useNavControllerEffect(commandFlow) {
    var navHostFn = useRequiredContext(get_NavHostContext());
    useLaunchedEffect([commandFlow], useNavControllerEffect$slambda_0(commandFlow, navHostFn, null));
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_43(function_0) {
    this.n120_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_43).t1d = function (value, $completion) {
    return this.n120_1(value, $completion);
  };
  function useNavControllerEffect$slambda$slambda($navHostFn, resultContinuation) {
    this.w120_1 = $navHostFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useNavControllerEffect$slambda$slambda).y120 = function (it, $completion) {
    var tmp = this.z120(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useNavControllerEffect$slambda$slambda).he = function (p1, $completion) {
    return this.y120(p1 instanceof NavCommand ? p1 : THROW_CCE(), $completion);
  };
  protoOf(useNavControllerEffect$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          Napier_getInstance().i5e('useNavControllerEffect: collect command: ' + this.x120_1);
          this.w120_1.n11k(this.x120_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(useNavControllerEffect$slambda$slambda).z120 = function (it, completion) {
    var i = new useNavControllerEffect$slambda$slambda(this.w120_1, completion);
    i.x120_1 = it;
    return i;
  };
  function useNavControllerEffect$slambda$slambda_0($navHostFn, resultContinuation) {
    var i = new useNavControllerEffect$slambda$slambda($navHostFn, resultContinuation);
    var l = function (it, $completion) {
      return i.y120(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function useNavControllerEffect$slambda($commandFlow, $navHostFn, resultContinuation) {
    this.i121_1 = $commandFlow;
    this.j121_1 = $navHostFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useNavControllerEffect$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useNavControllerEffect$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(useNavControllerEffect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.k121_1 = this.i121_1;
            if (this.k121_1 == null) {
              this.l121_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = useNavControllerEffect$slambda$slambda_0(this.j121_1, null);
              suspendResult = this.k121_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_43(tmp_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.l121_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(useNavControllerEffect$slambda).l78 = function (completion) {
    return new useNavControllerEffect$slambda(this.i121_1, this.j121_1, completion);
  };
  function useNavControllerEffect$slambda_0($commandFlow, $navHostFn, resultContinuation) {
    var i = new useNavControllerEffect$slambda($commandFlow, $navHostFn, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function useStringProvider() {
    var di = useRequiredContext(get_DIContext());
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(di).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(StringProviderJs), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var stringProvider = tmp.d58(tmp$ret$0, null);
    // Inline function 'react.useMemo' call
    // Inline function 'kotlin.emptyArray' call
    var dependencies = [].slice();
    var callback = useStringProvider$lambda(stringProvider);
    return useMemo(callback, dependencies);
  }
  function useStringProvider$lambda($stringProvider) {
    return function () {
      return $stringProvider;
    };
  }
  function useViewModel(overrideSearchParams, viewModelFactory) {
    overrideSearchParams = overrideSearchParams === VOID ? null : overrideSearchParams;
    // Inline function 'js.array.JsTuple1.component1' call
    // Inline function 'kotlin.js.asDynamic' call
    var searchParams = useSearchParams()[0];
    var locationKey = useLocation().key;
    var viewModelAndKey$delegate = useState_0(useViewModel$lambda_1(overrideSearchParams, searchParams, viewModelFactory, locationKey));
    useEffect([locationKey], useViewModel$lambda_2(locationKey, viewModelFactory, searchParams, viewModelAndKey$delegate));
    return useViewModel$lambda(viewModelAndKey$delegate).m121_1;
  }
  function ViewModelAndKey(viewModel, locationKey) {
    this.m121_1 = viewModel;
    this.n121_1 = locationKey;
  }
  protoOf(ViewModelAndKey).toString = function () {
    return 'ViewModelAndKey(viewModel=' + this.m121_1 + ', locationKey=' + this.n121_1 + ')';
  };
  protoOf(ViewModelAndKey).hashCode = function () {
    var result = hashCode(this.m121_1);
    result = imul(result, 31) + getStringHashCode(this.n121_1) | 0;
    return result;
  };
  protoOf(ViewModelAndKey).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ViewModelAndKey))
      return false;
    var tmp0_other_with_cast = other instanceof ViewModelAndKey ? other : THROW_CCE();
    if (!equals(this.m121_1, tmp0_other_with_cast.m121_1))
      return false;
    if (!(this.n121_1 === tmp0_other_with_cast.n121_1))
      return false;
    return true;
  };
  function useViewModel$lambda($viewModelAndKey$delegate) {
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('viewModelAndKey', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $viewModelAndKey$delegate[0];
  }
  function useViewModel$lambda_0($viewModelAndKey$delegate, value) {
    getLocalDelegateReference('viewModelAndKey', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $viewModelAndKey$delegate[1](value);
    return Unit_instance;
  }
  function useViewModel$lambda_1($overrideSearchParams, $searchParams, $viewModelFactory, $locationKey) {
    return function () {
      var tmp = window.history;
      var tmp0_elvis_lhs = $overrideSearchParams;
      var savedStateHandle = new SavedStateHandle2(tmp, tmp0_elvis_lhs == null ? $searchParams : tmp0_elvis_lhs);
      // Inline function 'kotlin.also' call
      var this_0 = new ViewModelAndKey($viewModelFactory(savedStateHandle), $locationKey);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.hooks.useViewModel.<anonymous>.<anonymous>' call
      Napier_getInstance().i5e('Creating ViewModel: ' + getKClassFromExpression(this_0.m121_1).f7());
      return this_0;
    };
  }
  function useViewModel$lambda$lambda($viewModelAndKey$delegate) {
    return function () {
      Napier_getInstance().i5e('Close ViewModel: ' + getKClassFromExpression(useViewModel$lambda($viewModelAndKey$delegate).m121_1).f7());
      useViewModel$lambda($viewModelAndKey$delegate).m121_1.n();
      return Unit_instance;
    };
  }
  function useViewModel$lambda_2($locationKey, $viewModelFactory, $searchParams, $viewModelAndKey$delegate) {
    return function ($this$useEffect) {
      var tmp;
      if (!(useViewModel$lambda($viewModelAndKey$delegate).n121_1 === $locationKey)) {
        useViewModel$lambda_0($viewModelAndKey$delegate, new ViewModelAndKey($viewModelFactory(new SavedStateHandle2(window.history, $searchParams)), $locationKey));
        Napier_getInstance().i5e('Recreating ViewModel ' + getKClassFromExpression(useViewModel$lambda($viewModelAndKey$delegate).m121_1).f7());
        tmp = Unit_instance;
      }
      $this$useEffect.push(useViewModel$lambda$lambda($viewModelAndKey$delegate));
      return Unit_instance;
    };
  }
  function Companion_208() {
  }
  var Companion_instance_257;
  function Companion_getInstance_225() {
    return Companion_instance_257;
  }
  function UstadMobileSystemImpl(settings, langConfig, jsStringProvider) {
    UstadMobileSystemCommon.call(this, settings, langConfig);
    this.loj_1 = jsStringProvider;
  }
  protoOf(UstadMobileSystemImpl).moj = function (stringResource) {
    return stringResource.hm8(this.loj_1, this.eq5_1.qpm_1);
  };
  protoOf(UstadMobileSystemImpl).noj = function (stringResource, args) {
    return stringResource.im8(this.loj_1, this.eq5_1.qpm_1, args.slice());
  };
  protoOf(UstadMobileSystemImpl).jwq = function (pluralsResource, number) {
    return format(pluralsResource, number, [number]).mm8(this.loj_1);
  };
  protoOf(UstadMobileSystemImpl).o121 = function (context, zip, $completion) {
    // Inline function 'kotlin.TODO' call
    var reason = 'not implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(UstadMobileSystemImpl).getAppSetupFile = function (context, zip, $completion) {
    return this.o121(context, zip, $completion);
  };
  protoOf(UstadMobileSystemImpl).p121 = function (viewName, args, context, flags, ustadGoOptions) {
    throw IllegalStateException_init_$Create$('Not supported on JS anymore!');
  };
  protoOf(UstadMobileSystemImpl).go = function (viewName, args, context, flags, ustadGoOptions) {
    return this.p121(viewName, args, context, flags, ustadGoOptions);
  };
  function DomainDiModuleJs(endpointScope) {
    return Module_init_$Create$('DomainDiModuleJs', VOID, VOID, DomainDiModuleJs$lambda(endpointScope));
  }
  function DomainDiModuleJs$lambda$lambda($this$provider) {
    var tmp = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.d58(tmp$ret$2, null);
    return new EnqueueImportContentEntryUseCaseRemote(tmp, tmp_2, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_0($this$provider) {
    return new OpenExternalLinkUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_1($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadNavController), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.d58(tmp$ret$4, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_8 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var tmp$ret$7 = tmp_8.d58(tmp$ret$6, null);
    return OnClickLinkUseCase_init_$Create$(tmp_1, tmp_4, tmp_7, tmp$ret$7);
  }
  function DomainDiModuleJs$lambda$lambda_2($this$singleton) {
    return new PhoneNumberUtilJs();
  }
  function DomainDiModuleJs$lambda$lambda_3($this$provider) {
    return new PhoneNumValidatorUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_4($this$provider) {
    return new ValidateEmailUseCase();
  }
  function DomainDiModuleJs$lambda$lambda_5($this$provider) {
    return new OnClickPhoneNumUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_6($this$provider) {
    return new OnClickSendEmailUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_7($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new SetLanguageUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_8($this$singleton) {
    return new ChunkedUploadClientLocalUriUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_9($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new EnqueueSavePictureUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_10($this$singleton) {
    return new IsTempFileCheckerUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_11($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(IsTempFileCheckerUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new DeleteUrisUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_12($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.d58(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.d58(tmp$ret$4, null).tk2_1;
    var tmp_8 = new CompressImageUseCaseJs();
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(DeleteUrisUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp$ret$7 = tmp_9.d58(tmp$ret$6, null);
    return new SavePictureUseCase(tmp_1, null, tmp_4, tmp_7, tmp_8, tmp$ret$7);
  }
  function DomainDiModuleJs$lambda$lambda_13($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    var tmp_2 = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.d58(tmp$ret$4, 1);
    return new SaveLocalUrisAsBlobUseCaseJs(tmp_1, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_14($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new ContentEntryGetMetaDataFromUriUseCaseJs(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_15($this$provider) {
    var tmp = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.d58(tmp$ret$0, null).vk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.d58(tmp$ret$2, null);
    return new SetPasswordUseCaseJs(tmp, tmp_2, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_16($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp0_activeRepoOrDb = tmp.d58(tmp$ret$0, null).wk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp1_httpClient = tmp_1.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp2_json = tmp_3.d58(tmp$ret$4, null).hpr_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XmlPullParserFactory), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp3_xppFactory = tmp_5.d58(tmp$ret$6, 1);
    var tmp4_learningSpace = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_7 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp5_resumeOrStartXapiSessionUseCase = tmp_7.d58(tmp$ret$8, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp6_accountManager = tmp_9.d58(tmp$ret$10, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_11 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(GetApiUrlUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    var tmp7_getApiUrlUseCase = tmp_11.d58(tmp$ret$12, null);
    return new ResolveXapiLaunchHrefUseCase(tmp0_activeRepoOrDb, tmp1_httpClient, tmp2_json, tmp3_xppFactory, tmp5_resumeOrStartXapiSessionUseCase, tmp7_getApiUrlUseCase, tmp6_accountManager, tmp4_learningSpace);
  }
  function DomainDiModuleJs$lambda$lambda_17($this$singleton) {
    return new XapiJson();
  }
  function DomainDiModuleJs$lambda$lambda_18($this$singleton) {
    return new GetApiUrlUseCaseDirect($this$singleton.od());
  }
  function DomainDiModuleJs$lambda$lambda_19($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.d58(tmp$ret$2, null).vk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.d58(tmp$ret$4, null);
    return new ResumeOrStartXapiSessionUseCaseJs(tmp, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_20($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new LaunchXapiUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_21($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new MoveContentEntriesUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_22($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new DeleteContentEntryParentChildJoinUseCase(tmp$ret$1.wk2());
  }
  function DomainDiModuleJs$lambda$lambda_23($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new RestoreDeletedItemUseCase(tmp$ret$1.wk2());
  }
  function DomainDiModuleJs$lambda$lambda_24($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new DeletePermanentlyUseCase(tmp$ret$1.wk2());
  }
  function DomainDiModuleJs$lambda$lambda_25($this$singleton) {
    return new SetClipboardStringUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_26($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.d58(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.d58(tmp$ret$4, null);
    return new SaveAndUploadLocalUrisUseCase(tmp_1, null, tmp_4, tmp$ret$5.tk2_1);
  }
  function DomainDiModuleJs$lambda$lambda_27($this$provider) {
    return new OpenBlobUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_28($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(OpenBlobUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new OpenBlobUiUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_29($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.d58(tmp$ret$2, null);
    return new CancelRemoteContentEntryImportUseCase(tmp, tmp_2, tmp$ret$3.vk2());
  }
  function DomainDiModuleJs$lambda$lambda_30($this$singleton) {
    var tmp0_learningSpace = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp1_httpClient = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp2_repo = tmp_1.d58(tmp$ret$2, null).vk2();
    return new DismissRemoteContentEntryImportErrorUseCase(tmp1_httpClient, tmp0_learningSpace, tmp2_repo);
  }
  function DomainDiModuleJs$lambda$lambda_31($this$singleton) {
    return new XXStringHasherJs();
  }
  function DomainDiModuleJs$lambda$lambda_32($this$singleton) {
    return new XXHasher64FactoryJs();
  }
  function DomainDiModuleJs$lambda$lambda_33($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new StoreActivitiesUseCase(tmp_1, tmp$ret$3.tk2_1);
  }
  function DomainDiModuleJs$lambda$lambda_34($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.d58(tmp$ret$2, null).tk2_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.d58(tmp$ret$4, null);
    var tmp_8 = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp_11 = tmp_9.d58(tmp$ret$6, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_12 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(XXHasher64Factory), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    var tmp_14 = tmp_12.d58(tmp$ret$8, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_15 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    var tmp$ret$11 = tmp_15.d58(tmp$ret$10, null);
    return new XapiStatementResource(tmp_1, tmp_4, tmp_7, tmp_8, tmp_11, tmp_14, tmp$ret$11);
  }
  function DomainDiModuleJs$lambda$lambda_35($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new SaveStatementOnClearUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_36($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.d58(tmp$ret$0, null);
    return new SaveStatementOnUnloadUseCaseJs(tmp, tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_37($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SaveStatementOnClearUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.d58(tmp$ret$4, null);
    return new NonInteractiveContentXapiStatementRecorderFactory(tmp_1, tmp_4, tmp$ret$5, $this$singleton.od());
  }
  function DomainDiModuleJs$lambda$lambda_38($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new AddNewPersonUseCase(tmp_1, tmp$ret$3.tk2_1);
  }
  function DomainDiModuleJs$lambda$lambda_39($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.d58(tmp$ret$4, null);
    return new GetSubtitleTrackFromUriUseCaseJs(tmp, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda($endpointScope) {
    return function ($this$$receiver) {
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
      var tmp_0 = $this$$receiver.o56(tmp$ret$0, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var this_0 = new ImplWithScope(tmp$ret$2, scope);
      var creator = DomainDiModuleJs$lambda$lambda;
      var tmp_2 = this_0.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_3 = typeToken(createKType(getKClass(EnqueueImportContentEntryUseCaseRemote), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
      var tmp$ret$5 = new Provider(tmp_2, tmp$ret$4, creator);
      tmp_0.c5b(tmp$ret$5);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
      var tmp$ret$6 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = $this$$receiver.o56(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_0 = DomainDiModuleJs$lambda$lambda_0;
      var tmp_6 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(OpenExternalLinkUseCaseJs), arrayOf([]), false));
      var tmp$ret$8 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var tmp$ret$9 = new Provider(tmp_6, tmp$ret$8, creator_0);
      tmp_5.c5b(tmp$ret$9);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_8 = typeToken(createKType(getKClass(OnClickLinkUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
      var tmp_9 = $this$$receiver.o56(tmp$ret$10, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_1 = DomainDiModuleJs$lambda$lambda_1;
      var tmp_10 = $this$$receiver.c56();
      var tmp_11 = $this$$receiver.b56();
      var tmp_12 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(OnClickLinkUseCase), arrayOf([]), false));
      var tmp$ret$12 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      var tmp$ret$13 = new Singleton(tmp_10, tmp_11, tmp_12, tmp$ret$12, null, true, creator_1);
      tmp_9.c5b(tmp$ret$13);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_14 = typeToken(createKType(getKClass(IPhoneNumberUtil), arrayOf([]), false));
      var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
      var tmp_15 = $this$$receiver.o56(tmp$ret$14, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_2 = DomainDiModuleJs$lambda$lambda_2;
      var tmp_16 = $this$$receiver.c56();
      var tmp_17 = $this$$receiver.b56();
      var tmp_18 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_19 = typeToken(createKType(getKClass(PhoneNumberUtilJs), arrayOf([]), false));
      var tmp$ret$16 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
      var tmp$ret$17 = new Singleton(tmp_16, tmp_17, tmp_18, tmp$ret$16, null, true, creator_2);
      tmp_15.c5b(tmp$ret$17);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_20 = typeToken(createKType(getKClass(PhoneNumValidatorUseCase), arrayOf([]), false));
      var tmp$ret$18 = isInterface(tmp_20, TypeToken) ? tmp_20 : THROW_CCE();
      var tmp_21 = $this$$receiver.o56(tmp$ret$18, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_3 = DomainDiModuleJs$lambda$lambda_3;
      var tmp_22 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_23 = typeToken(createKType(getKClass(PhoneNumValidatorUseCaseJs), arrayOf([]), false));
      var tmp$ret$20 = isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE();
      var tmp$ret$21 = new Provider(tmp_22, tmp$ret$20, creator_3);
      tmp_21.c5b(tmp$ret$21);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_24 = typeToken(createKType(getKClass(ValidateEmailUseCase), arrayOf([]), false));
      var tmp$ret$22 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
      var tmp_25 = $this$$receiver.o56(tmp$ret$22, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_4 = DomainDiModuleJs$lambda$lambda_4;
      var tmp_26 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_27 = typeToken(createKType(getKClass(ValidateEmailUseCase), arrayOf([]), false));
      var tmp$ret$24 = isInterface(tmp_27, TypeToken) ? tmp_27 : THROW_CCE();
      var tmp$ret$25 = new Provider(tmp_26, tmp$ret$24, creator_4);
      tmp_25.c5b(tmp$ret$25);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_28 = typeToken(createKType(getKClass(OnClickPhoneNumUseCase), arrayOf([]), false));
      var tmp$ret$26 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
      var tmp_29 = $this$$receiver.o56(tmp$ret$26, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_5 = DomainDiModuleJs$lambda$lambda_5;
      var tmp_30 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_31 = typeToken(createKType(getKClass(OnClickPhoneNumUseCaseJs), arrayOf([]), false));
      var tmp$ret$28 = isInterface(tmp_31, TypeToken) ? tmp_31 : THROW_CCE();
      var tmp$ret$29 = new Provider(tmp_30, tmp$ret$28, creator_5);
      tmp_29.c5b(tmp$ret$29);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_32 = typeToken(createKType(getKClass(OnClickEmailUseCase), arrayOf([]), false));
      var tmp$ret$30 = isInterface(tmp_32, TypeToken) ? tmp_32 : THROW_CCE();
      var tmp_33 = $this$$receiver.o56(tmp$ret$30, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_6 = DomainDiModuleJs$lambda$lambda_6;
      var tmp_34 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_35 = typeToken(createKType(getKClass(OnClickSendEmailUseCaseJs), arrayOf([]), false));
      var tmp$ret$32 = isInterface(tmp_35, TypeToken) ? tmp_35 : THROW_CCE();
      var tmp$ret$33 = new Provider(tmp_34, tmp$ret$32, creator_6);
      tmp_33.c5b(tmp$ret$33);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_36 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
      var tmp$ret$34 = isInterface(tmp_36, TypeToken) ? tmp_36 : THROW_CCE();
      var tmp_37 = $this$$receiver.o56(tmp$ret$34, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_7 = DomainDiModuleJs$lambda$lambda_7;
      var tmp_38 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_39 = typeToken(createKType(getKClass(SetLanguageUseCaseJs), arrayOf([]), false));
      var tmp$ret$36 = isInterface(tmp_39, TypeToken) ? tmp_39 : THROW_CCE();
      var tmp$ret$37 = new Provider(tmp_38, tmp$ret$36, creator_7);
      tmp_37.c5b(tmp$ret$37);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_40 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
      var tmp$ret$38 = isInterface(tmp_40, TypeToken) ? tmp_40 : THROW_CCE();
      var tmp_41 = $this$$receiver.o56(tmp$ret$38, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_8 = DomainDiModuleJs$lambda$lambda_8;
      var tmp_42 = $this$$receiver.c56();
      var tmp_43 = $this$$receiver.b56();
      var tmp_44 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_45 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$40 = isInterface(tmp_45, TypeToken) ? tmp_45 : THROW_CCE();
      var tmp$ret$41 = new Singleton(tmp_42, tmp_43, tmp_44, tmp$ret$40, null, true, creator_8);
      tmp_41.c5b(tmp$ret$41);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_46 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$42 = isInterface(tmp_46, TypeToken) ? tmp_46 : THROW_CCE();
      var tmp_47 = $this$$receiver.o56(tmp$ret$42, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_0 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_48 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$44 = isInterface(tmp_48, TypeToken) ? tmp_48 : THROW_CCE();
      var this_1 = new ImplWithScope(tmp$ret$44, scope_0);
      var creator_9 = DomainDiModuleJs$lambda$lambda_9;
      var tmp_49 = this_1.c56();
      var tmp_50 = this_1.b56();
      var tmp_51 = this_1.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_52 = typeToken(createKType(getKClass(EnqueueSavePictureUseCaseJs), arrayOf([]), false));
      var tmp$ret$46 = isInterface(tmp_52, TypeToken) ? tmp_52 : THROW_CCE();
      var tmp$ret$47 = new Singleton(tmp_49, tmp_50, tmp_51, tmp$ret$46, null, true, creator_9);
      tmp_47.c5b(tmp$ret$47);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_53 = typeToken(createKType(getKClass(IsTempFileCheckerUseCase), arrayOf([]), false));
      var tmp$ret$48 = isInterface(tmp_53, TypeToken) ? tmp_53 : THROW_CCE();
      var tmp_54 = $this$$receiver.o56(tmp$ret$48, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_10 = DomainDiModuleJs$lambda$lambda_10;
      var tmp_55 = $this$$receiver.c56();
      var tmp_56 = $this$$receiver.b56();
      var tmp_57 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_58 = typeToken(createKType(getKClass(IsTempFileCheckerUseCaseJs), arrayOf([]), false));
      var tmp$ret$50 = isInterface(tmp_58, TypeToken) ? tmp_58 : THROW_CCE();
      var tmp$ret$51 = new Singleton(tmp_55, tmp_56, tmp_57, tmp$ret$50, null, true, creator_10);
      tmp_54.c5b(tmp$ret$51);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_59 = typeToken(createKType(getKClass(DeleteUrisUseCase), arrayOf([]), false));
      var tmp$ret$52 = isInterface(tmp_59, TypeToken) ? tmp_59 : THROW_CCE();
      var tmp_60 = $this$$receiver.o56(tmp$ret$52, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_11 = DomainDiModuleJs$lambda$lambda_11;
      var tmp_61 = $this$$receiver.c56();
      var tmp_62 = $this$$receiver.b56();
      var tmp_63 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_64 = typeToken(createKType(getKClass(DeleteUrisUseCaseJs), arrayOf([]), false));
      var tmp$ret$54 = isInterface(tmp_64, TypeToken) ? tmp_64 : THROW_CCE();
      var tmp$ret$55 = new Singleton(tmp_61, tmp_62, tmp_63, tmp$ret$54, null, true, creator_11);
      tmp_60.c5b(tmp$ret$55);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_65 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
      var tmp$ret$56 = isInterface(tmp_65, TypeToken) ? tmp_65 : THROW_CCE();
      var tmp_66 = $this$$receiver.o56(tmp$ret$56, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_1 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_67 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$58 = isInterface(tmp_67, TypeToken) ? tmp_67 : THROW_CCE();
      var this_2 = new ImplWithScope(tmp$ret$58, scope_1);
      var creator_12 = DomainDiModuleJs$lambda$lambda_12;
      var tmp_68 = this_2.c56();
      var tmp_69 = this_2.b56();
      var tmp_70 = this_2.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_71 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
      var tmp$ret$60 = isInterface(tmp_71, TypeToken) ? tmp_71 : THROW_CCE();
      var tmp$ret$61 = new Singleton(tmp_68, tmp_69, tmp_70, tmp$ret$60, null, true, creator_12);
      tmp_66.c5b(tmp$ret$61);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_72 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
      var tmp$ret$62 = isInterface(tmp_72, TypeToken) ? tmp_72 : THROW_CCE();
      var tmp_73 = $this$$receiver.o56(tmp$ret$62, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_2 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_74 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$64 = isInterface(tmp_74, TypeToken) ? tmp_74 : THROW_CCE();
      var this_3 = new ImplWithScope(tmp$ret$64, scope_2);
      var creator_13 = DomainDiModuleJs$lambda$lambda_13;
      var tmp_75 = this_3.c56();
      var tmp_76 = this_3.b56();
      var tmp_77 = this_3.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_78 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobUseCaseJs), arrayOf([]), false));
      var tmp$ret$66 = isInterface(tmp_78, TypeToken) ? tmp_78 : THROW_CCE();
      var tmp$ret$67 = new Singleton(tmp_75, tmp_76, tmp_77, tmp$ret$66, null, true, creator_13);
      tmp_73.c5b(tmp$ret$67);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_79 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCase), arrayOf([]), false));
      var tmp$ret$68 = isInterface(tmp_79, TypeToken) ? tmp_79 : THROW_CCE();
      var tmp_80 = $this$$receiver.o56(tmp$ret$68, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_14 = DomainDiModuleJs$lambda$lambda_14;
      var tmp_81 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_82 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$70 = isInterface(tmp_82, TypeToken) ? tmp_82 : THROW_CCE();
      var tmp$ret$71 = new Provider(tmp_81, tmp$ret$70, creator_14);
      tmp_80.c5b(tmp$ret$71);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_83 = typeToken(createKType(getKClass(SetPasswordUseCase), arrayOf([]), false));
      var tmp$ret$72 = isInterface(tmp_83, TypeToken) ? tmp_83 : THROW_CCE();
      var tmp_84 = $this$$receiver.o56(tmp$ret$72, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_3 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_85 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$74 = isInterface(tmp_85, TypeToken) ? tmp_85 : THROW_CCE();
      var this_4 = new ImplWithScope(tmp$ret$74, scope_3);
      var creator_15 = DomainDiModuleJs$lambda$lambda_15;
      var tmp_86 = this_4.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_87 = typeToken(createKType(getKClass(SetPasswordUseCaseJs), arrayOf([]), false));
      var tmp$ret$76 = isInterface(tmp_87, TypeToken) ? tmp_87 : THROW_CCE();
      var tmp$ret$77 = new Provider(tmp_86, tmp$ret$76, creator_15);
      tmp_84.c5b(tmp$ret$77);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_88 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
      var tmp$ret$78 = isInterface(tmp_88, TypeToken) ? tmp_88 : THROW_CCE();
      var tmp_89 = $this$$receiver.o56(tmp$ret$78, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_4 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_90 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$80 = isInterface(tmp_90, TypeToken) ? tmp_90 : THROW_CCE();
      var this_5 = new ImplWithScope(tmp$ret$80, scope_4);
      var creator_16 = DomainDiModuleJs$lambda$lambda_16;
      var tmp_91 = this_5.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_92 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
      var tmp$ret$82 = isInterface(tmp_92, TypeToken) ? tmp_92 : THROW_CCE();
      var tmp$ret$83 = new Provider(tmp_91, tmp$ret$82, creator_16);
      tmp_89.c5b(tmp$ret$83);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_93 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
      var tmp$ret$84 = isInterface(tmp_93, TypeToken) ? tmp_93 : THROW_CCE();
      var tmp_94 = $this$$receiver.o56(tmp$ret$84, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_17 = DomainDiModuleJs$lambda$lambda_17;
      var tmp_95 = $this$$receiver.c56();
      var tmp_96 = $this$$receiver.b56();
      var tmp_97 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_98 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
      var tmp$ret$86 = isInterface(tmp_98, TypeToken) ? tmp_98 : THROW_CCE();
      var tmp$ret$87 = new Singleton(tmp_95, tmp_96, tmp_97, tmp$ret$86, null, true, creator_17);
      tmp_94.c5b(tmp$ret$87);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_99 = typeToken(createKType(getKClass(GetApiUrlUseCase), arrayOf([]), false));
      var tmp$ret$88 = isInterface(tmp_99, TypeToken) ? tmp_99 : THROW_CCE();
      var tmp_100 = $this$$receiver.o56(tmp$ret$88, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_5 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_101 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$90 = isInterface(tmp_101, TypeToken) ? tmp_101 : THROW_CCE();
      var this_6 = new ImplWithScope(tmp$ret$90, scope_5);
      var creator_18 = DomainDiModuleJs$lambda$lambda_18;
      var tmp_102 = this_6.c56();
      var tmp_103 = this_6.b56();
      var tmp_104 = this_6.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_105 = typeToken(createKType(getKClass(GetApiUrlUseCaseDirect), arrayOf([]), false));
      var tmp$ret$92 = isInterface(tmp_105, TypeToken) ? tmp_105 : THROW_CCE();
      var tmp$ret$93 = new Singleton(tmp_102, tmp_103, tmp_104, tmp$ret$92, null, true, creator_18);
      tmp_100.c5b(tmp$ret$93);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_106 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCase), arrayOf([]), false));
      var tmp$ret$94 = isInterface(tmp_106, TypeToken) ? tmp_106 : THROW_CCE();
      var tmp_107 = $this$$receiver.o56(tmp$ret$94, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_6 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_108 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$96 = isInterface(tmp_108, TypeToken) ? tmp_108 : THROW_CCE();
      var this_7 = new ImplWithScope(tmp$ret$96, scope_6);
      var creator_19 = DomainDiModuleJs$lambda$lambda_19;
      var tmp_109 = this_7.c56();
      var tmp_110 = this_7.b56();
      var tmp_111 = this_7.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_112 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCaseJs), arrayOf([]), false));
      var tmp$ret$98 = isInterface(tmp_112, TypeToken) ? tmp_112 : THROW_CCE();
      var tmp$ret$99 = new Singleton(tmp_109, tmp_110, tmp_111, tmp$ret$98, null, true, creator_19);
      tmp_107.c5b(tmp$ret$99);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_113 = typeToken(createKType(getKClass(LaunchXapiUseCase), arrayOf([]), false));
      var tmp$ret$100 = isInterface(tmp_113, TypeToken) ? tmp_113 : THROW_CCE();
      var tmp_114 = $this$$receiver.o56(tmp$ret$100, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_7 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_115 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$102 = isInterface(tmp_115, TypeToken) ? tmp_115 : THROW_CCE();
      var this_8 = new ImplWithScope(tmp$ret$102, scope_7);
      var creator_20 = DomainDiModuleJs$lambda$lambda_20;
      var tmp_116 = this_8.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_117 = typeToken(createKType(getKClass(LaunchXapiUseCaseJs), arrayOf([]), false));
      var tmp$ret$104 = isInterface(tmp_117, TypeToken) ? tmp_117 : THROW_CCE();
      var tmp$ret$105 = new Provider(tmp_116, tmp$ret$104, creator_20);
      tmp_114.c5b(tmp$ret$105);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_118 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
      var tmp$ret$106 = isInterface(tmp_118, TypeToken) ? tmp_118 : THROW_CCE();
      var tmp_119 = $this$$receiver.o56(tmp$ret$106, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_8 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_120 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$108 = isInterface(tmp_120, TypeToken) ? tmp_120 : THROW_CCE();
      var this_9 = new ImplWithScope(tmp$ret$108, scope_8);
      var creator_21 = DomainDiModuleJs$lambda$lambda_21;
      var tmp_121 = this_9.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_122 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
      var tmp$ret$110 = isInterface(tmp_122, TypeToken) ? tmp_122 : THROW_CCE();
      var tmp$ret$111 = new Provider(tmp_121, tmp$ret$110, creator_21);
      tmp_119.c5b(tmp$ret$111);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_123 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
      var tmp$ret$112 = isInterface(tmp_123, TypeToken) ? tmp_123 : THROW_CCE();
      var tmp_124 = $this$$receiver.o56(tmp$ret$112, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_9 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_125 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$114 = isInterface(tmp_125, TypeToken) ? tmp_125 : THROW_CCE();
      var this_10 = new ImplWithScope(tmp$ret$114, scope_9);
      var creator_22 = DomainDiModuleJs$lambda$lambda_22;
      var tmp_126 = this_10.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_127 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
      var tmp$ret$116 = isInterface(tmp_127, TypeToken) ? tmp_127 : THROW_CCE();
      var tmp$ret$117 = new Provider(tmp_126, tmp$ret$116, creator_22);
      tmp_124.c5b(tmp$ret$117);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_128 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
      var tmp$ret$118 = isInterface(tmp_128, TypeToken) ? tmp_128 : THROW_CCE();
      var tmp_129 = $this$$receiver.o56(tmp$ret$118, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_10 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_130 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$120 = isInterface(tmp_130, TypeToken) ? tmp_130 : THROW_CCE();
      var this_11 = new ImplWithScope(tmp$ret$120, scope_10);
      var creator_23 = DomainDiModuleJs$lambda$lambda_23;
      var tmp_131 = this_11.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_132 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
      var tmp$ret$122 = isInterface(tmp_132, TypeToken) ? tmp_132 : THROW_CCE();
      var tmp$ret$123 = new Provider(tmp_131, tmp$ret$122, creator_23);
      tmp_129.c5b(tmp$ret$123);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_133 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
      var tmp$ret$124 = isInterface(tmp_133, TypeToken) ? tmp_133 : THROW_CCE();
      var tmp_134 = $this$$receiver.o56(tmp$ret$124, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_11 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_135 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$126 = isInterface(tmp_135, TypeToken) ? tmp_135 : THROW_CCE();
      var this_12 = new ImplWithScope(tmp$ret$126, scope_11);
      var creator_24 = DomainDiModuleJs$lambda$lambda_24;
      var tmp_136 = this_12.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_137 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
      var tmp$ret$128 = isInterface(tmp_137, TypeToken) ? tmp_137 : THROW_CCE();
      var tmp$ret$129 = new Provider(tmp_136, tmp$ret$128, creator_24);
      tmp_134.c5b(tmp$ret$129);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_138 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
      var tmp$ret$130 = isInterface(tmp_138, TypeToken) ? tmp_138 : THROW_CCE();
      var tmp_139 = $this$$receiver.o56(tmp$ret$130, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_25 = DomainDiModuleJs$lambda$lambda_25;
      var tmp_140 = $this$$receiver.c56();
      var tmp_141 = $this$$receiver.b56();
      var tmp_142 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_143 = typeToken(createKType(getKClass(SetClipboardStringUseCaseJs), arrayOf([]), false));
      var tmp$ret$132 = isInterface(tmp_143, TypeToken) ? tmp_143 : THROW_CCE();
      var tmp$ret$133 = new Singleton(tmp_140, tmp_141, tmp_142, tmp$ret$132, null, true, creator_25);
      tmp_139.c5b(tmp$ret$133);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_144 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
      var tmp$ret$134 = isInterface(tmp_144, TypeToken) ? tmp_144 : THROW_CCE();
      var tmp_145 = $this$$receiver.o56(tmp$ret$134, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_12 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_146 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$136 = isInterface(tmp_146, TypeToken) ? tmp_146 : THROW_CCE();
      var this_13 = new ImplWithScope(tmp$ret$136, scope_12);
      var creator_26 = DomainDiModuleJs$lambda$lambda_26;
      var tmp_147 = this_13.c56();
      var tmp_148 = this_13.b56();
      var tmp_149 = this_13.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_150 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
      var tmp$ret$138 = isInterface(tmp_150, TypeToken) ? tmp_150 : THROW_CCE();
      var tmp$ret$139 = new Singleton(tmp_147, tmp_148, tmp_149, tmp$ret$138, null, true, creator_26);
      tmp_145.c5b(tmp$ret$139);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_151 = typeToken(createKType(getKClass(OpenBlobUseCase), arrayOf([]), false));
      var tmp$ret$140 = isInterface(tmp_151, TypeToken) ? tmp_151 : THROW_CCE();
      var tmp_152 = $this$$receiver.o56(tmp$ret$140, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_13 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_153 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$142 = isInterface(tmp_153, TypeToken) ? tmp_153 : THROW_CCE();
      var this_14 = new ImplWithScope(tmp$ret$142, scope_13);
      var creator_27 = DomainDiModuleJs$lambda$lambda_27;
      var tmp_154 = this_14.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_155 = typeToken(createKType(getKClass(OpenBlobUseCaseJs), arrayOf([]), false));
      var tmp$ret$144 = isInterface(tmp_155, TypeToken) ? tmp_155 : THROW_CCE();
      var tmp$ret$145 = new Provider(tmp_154, tmp$ret$144, creator_27);
      tmp_152.c5b(tmp$ret$145);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_156 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
      var tmp$ret$146 = isInterface(tmp_156, TypeToken) ? tmp_156 : THROW_CCE();
      var tmp_157 = $this$$receiver.o56(tmp$ret$146, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_14 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_158 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$148 = isInterface(tmp_158, TypeToken) ? tmp_158 : THROW_CCE();
      var this_15 = new ImplWithScope(tmp$ret$148, scope_14);
      var creator_28 = DomainDiModuleJs$lambda$lambda_28;
      var tmp_159 = this_15.c56();
      var tmp_160 = this_15.b56();
      var tmp_161 = this_15.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_162 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
      var tmp$ret$150 = isInterface(tmp_162, TypeToken) ? tmp_162 : THROW_CCE();
      var tmp$ret$151 = new Singleton(tmp_159, tmp_160, tmp_161, tmp$ret$150, null, true, creator_28);
      tmp_157.c5b(tmp$ret$151);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_163 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$152 = isInterface(tmp_163, TypeToken) ? tmp_163 : THROW_CCE();
      var tmp_164 = $this$$receiver.o56(tmp$ret$152, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_15 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_165 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$154 = isInterface(tmp_165, TypeToken) ? tmp_165 : THROW_CCE();
      var this_16 = new ImplWithScope(tmp$ret$154, scope_15);
      var creator_29 = DomainDiModuleJs$lambda$lambda_29;
      var tmp_166 = this_16.c56();
      var tmp_167 = this_16.b56();
      var tmp_168 = this_16.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_169 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$156 = isInterface(tmp_169, TypeToken) ? tmp_169 : THROW_CCE();
      var tmp$ret$157 = new Singleton(tmp_166, tmp_167, tmp_168, tmp$ret$156, null, true, creator_29);
      tmp_164.c5b(tmp$ret$157);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_170 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
      var tmp$ret$158 = isInterface(tmp_170, TypeToken) ? tmp_170 : THROW_CCE();
      var tmp_171 = $this$$receiver.o56(tmp$ret$158, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_16 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_172 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$160 = isInterface(tmp_172, TypeToken) ? tmp_172 : THROW_CCE();
      var this_17 = new ImplWithScope(tmp$ret$160, scope_16);
      var creator_30 = DomainDiModuleJs$lambda$lambda_30;
      var tmp_173 = this_17.c56();
      var tmp_174 = this_17.b56();
      var tmp_175 = this_17.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_176 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
      var tmp$ret$162 = isInterface(tmp_176, TypeToken) ? tmp_176 : THROW_CCE();
      var tmp$ret$163 = new Singleton(tmp_173, tmp_174, tmp_175, tmp$ret$162, null, true, creator_30);
      tmp_171.c5b(tmp$ret$163);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_177 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
      var tmp$ret$164 = isInterface(tmp_177, TypeToken) ? tmp_177 : THROW_CCE();
      var tmp_178 = $this$$receiver.o56(tmp$ret$164, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_31 = DomainDiModuleJs$lambda$lambda_31;
      var tmp_179 = $this$$receiver.c56();
      var tmp_180 = $this$$receiver.b56();
      var tmp_181 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_182 = typeToken(createKType(getKClass(XXStringHasherJs), arrayOf([]), false));
      var tmp$ret$166 = isInterface(tmp_182, TypeToken) ? tmp_182 : THROW_CCE();
      var tmp$ret$167 = new Singleton(tmp_179, tmp_180, tmp_181, tmp$ret$166, null, true, creator_31);
      tmp_178.c5b(tmp$ret$167);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_183 = typeToken(createKType(getKClass(XXHasher64Factory), arrayOf([]), false));
      var tmp$ret$168 = isInterface(tmp_183, TypeToken) ? tmp_183 : THROW_CCE();
      var tmp_184 = $this$$receiver.o56(tmp$ret$168, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_32 = DomainDiModuleJs$lambda$lambda_32;
      var tmp_185 = $this$$receiver.c56();
      var tmp_186 = $this$$receiver.b56();
      var tmp_187 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_188 = typeToken(createKType(getKClass(XXHasher64FactoryJs), arrayOf([]), false));
      var tmp$ret$170 = isInterface(tmp_188, TypeToken) ? tmp_188 : THROW_CCE();
      var tmp$ret$171 = new Singleton(tmp_185, tmp_186, tmp_187, tmp$ret$170, null, true, creator_32);
      tmp_184.c5b(tmp$ret$171);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_189 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
      var tmp$ret$172 = isInterface(tmp_189, TypeToken) ? tmp_189 : THROW_CCE();
      var tmp_190 = $this$$receiver.o56(tmp$ret$172, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_17 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_191 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$174 = isInterface(tmp_191, TypeToken) ? tmp_191 : THROW_CCE();
      var this_18 = new ImplWithScope(tmp$ret$174, scope_17);
      var creator_33 = DomainDiModuleJs$lambda$lambda_33;
      var tmp_192 = this_18.c56();
      var tmp_193 = this_18.b56();
      var tmp_194 = this_18.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_195 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
      var tmp$ret$176 = isInterface(tmp_195, TypeToken) ? tmp_195 : THROW_CCE();
      var tmp$ret$177 = new Singleton(tmp_192, tmp_193, tmp_194, tmp$ret$176, null, true, creator_33);
      tmp_190.c5b(tmp$ret$177);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_196 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
      var tmp$ret$178 = isInterface(tmp_196, TypeToken) ? tmp_196 : THROW_CCE();
      var tmp_197 = $this$$receiver.o56(tmp$ret$178, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_18 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_198 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$180 = isInterface(tmp_198, TypeToken) ? tmp_198 : THROW_CCE();
      var this_19 = new ImplWithScope(tmp$ret$180, scope_18);
      var creator_34 = DomainDiModuleJs$lambda$lambda_34;
      var tmp_199 = this_19.c56();
      var tmp_200 = this_19.b56();
      var tmp_201 = this_19.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_202 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
      var tmp$ret$182 = isInterface(tmp_202, TypeToken) ? tmp_202 : THROW_CCE();
      var tmp$ret$183 = new Singleton(tmp_199, tmp_200, tmp_201, tmp$ret$182, null, true, creator_34);
      tmp_197.c5b(tmp$ret$183);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_203 = typeToken(createKType(getKClass(SaveStatementOnClearUseCase), arrayOf([]), false));
      var tmp$ret$184 = isInterface(tmp_203, TypeToken) ? tmp_203 : THROW_CCE();
      var tmp_204 = $this$$receiver.o56(tmp$ret$184, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_19 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_205 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$186 = isInterface(tmp_205, TypeToken) ? tmp_205 : THROW_CCE();
      var this_20 = new ImplWithScope(tmp$ret$186, scope_19);
      var creator_35 = DomainDiModuleJs$lambda$lambda_35;
      var tmp_206 = this_20.c56();
      var tmp_207 = this_20.b56();
      var tmp_208 = this_20.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_209 = typeToken(createKType(getKClass(SaveStatementOnClearUseCaseJs), arrayOf([]), false));
      var tmp$ret$188 = isInterface(tmp_209, TypeToken) ? tmp_209 : THROW_CCE();
      var tmp$ret$189 = new Singleton(tmp_206, tmp_207, tmp_208, tmp$ret$188, null, true, creator_35);
      tmp_204.c5b(tmp$ret$189);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_210 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCase), arrayOf([]), false));
      var tmp$ret$190 = isInterface(tmp_210, TypeToken) ? tmp_210 : THROW_CCE();
      var tmp_211 = $this$$receiver.o56(tmp$ret$190, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_20 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_212 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$192 = isInterface(tmp_212, TypeToken) ? tmp_212 : THROW_CCE();
      var this_21 = new ImplWithScope(tmp$ret$192, scope_20);
      var creator_36 = DomainDiModuleJs$lambda$lambda_36;
      var tmp_213 = this_21.c56();
      var tmp_214 = this_21.b56();
      var tmp_215 = this_21.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_216 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCaseJs), arrayOf([]), false));
      var tmp$ret$194 = isInterface(tmp_216, TypeToken) ? tmp_216 : THROW_CCE();
      var tmp$ret$195 = new Singleton(tmp_213, tmp_214, tmp_215, tmp$ret$194, null, true, creator_36);
      tmp_211.c5b(tmp$ret$195);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_217 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
      var tmp$ret$196 = isInterface(tmp_217, TypeToken) ? tmp_217 : THROW_CCE();
      var tmp_218 = $this$$receiver.o56(tmp$ret$196, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_21 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_219 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$198 = isInterface(tmp_219, TypeToken) ? tmp_219 : THROW_CCE();
      var this_22 = new ImplWithScope(tmp$ret$198, scope_21);
      var creator_37 = DomainDiModuleJs$lambda$lambda_37;
      var tmp_220 = this_22.c56();
      var tmp_221 = this_22.b56();
      var tmp_222 = this_22.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_223 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
      var tmp$ret$200 = isInterface(tmp_223, TypeToken) ? tmp_223 : THROW_CCE();
      var tmp$ret$201 = new Singleton(tmp_220, tmp_221, tmp_222, tmp$ret$200, null, true, creator_37);
      tmp_218.c5b(tmp$ret$201);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_224 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
      var tmp$ret$202 = isInterface(tmp_224, TypeToken) ? tmp_224 : THROW_CCE();
      var tmp_225 = $this$$receiver.o56(tmp$ret$202, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_22 = Companion_getInstance_17().znt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_226 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$204 = isInterface(tmp_226, TypeToken) ? tmp_226 : THROW_CCE();
      var this_23 = new ImplWithScope(tmp$ret$204, scope_22);
      var creator_38 = DomainDiModuleJs$lambda$lambda_38;
      var tmp_227 = this_23.c56();
      var tmp_228 = this_23.b56();
      var tmp_229 = this_23.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_230 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
      var tmp$ret$206 = isInterface(tmp_230, TypeToken) ? tmp_230 : THROW_CCE();
      var tmp$ret$207 = new Singleton(tmp_227, tmp_228, tmp_229, tmp$ret$206, null, true, creator_38);
      tmp_225.c5b(tmp$ret$207);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_231 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCase), arrayOf([]), false));
      var tmp$ret$208 = isInterface(tmp_231, TypeToken) ? tmp_231 : THROW_CCE();
      var tmp_232 = $this$$receiver.o56(tmp$ret$208, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_23 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_233 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$210 = isInterface(tmp_233, TypeToken) ? tmp_233 : THROW_CCE();
      var this_24 = new ImplWithScope(tmp$ret$210, scope_23);
      var creator_39 = DomainDiModuleJs$lambda$lambda_39;
      var tmp_234 = this_24.c56();
      var tmp_235 = this_24.b56();
      var tmp_236 = this_24.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_237 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$212 = isInterface(tmp_237, TypeToken) ? tmp_237 : THROW_CCE();
      var tmp$ret$213 = new Singleton(tmp_234, tmp_235, tmp_236, tmp$ret$212, null, true, creator_39);
      tmp_232.c5b(tmp$ret$213);
      return Unit_instance;
    };
  }
  function StringProviderJs(locale, jsStringProvider) {
    this.q121_1 = locale;
    this.r121_1 = jsStringProvider;
  }
  protoOf(StringProviderJs).oq8 = function (stringResource) {
    return stringResource.hm8(this.r121_1, this.q121_1);
  };
  protoOf(StringProviderJs).s121 = function (stringResource, args) {
    return stringResource.im8(this.r121_1, this.q121_1, args.slice());
  };
  function isRemote(_this__u8e3s4, $completion) {
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var prefix = substringBefore_0(toString(_this__u8e3s4.q72_1), '//').toLowerCase();
    return startsWith(prefix, 'http:') ? true : startsWith(prefix, 'https:');
  }
  function setStateKey(_this__u8e3s4, $this, key, value) {
    var tmp0_safe_receiver = _this__u8e3s4.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_elvis_lhs = tmp;
    var newState = tmp1_elvis_lhs == null ? json([]) : tmp1_elvis_lhs;
    newState[key] = value;
    _this__u8e3s4.replaceState(newState, '');
  }
  function Companion_209() {
    this.t121_1 = '_handleId';
  }
  var Companion_instance_258;
  function Companion_getInstance_226() {
    return Companion_instance_258;
  }
  function SavedStateHandle2(history, searchParams) {
    this.u121_1 = history;
    this.v121_1 = searchParams;
    var storedHandleId = this.ba('_handleId');
    if (storedHandleId == null) {
      this.w121_1 = Default_getInstance_0().fg().toString();
      setStateKey(this.u121_1, this, '_handleId', this.w121_1);
    } else {
      this.w121_1 = storedHandleId;
    }
  }
  protoOf(SavedStateHandle2).dqj = function (key, value) {
    var tmp0_safe_receiver = this.u121_1.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_safe_receiver = tmp;
    if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver._handleId) != this.w121_1) {
      throw IllegalStateException_init_$Create$('SavedState cannot save values after the user has changed page');
    }
    if (!(value == null)) {
      setStateKey(this.u121_1, this, key, value);
    }
  };
  protoOf(SavedStateHandle2).ba = function (key) {
    var tmp0_safe_receiver = this.u121_1.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_safe_receiver = tmp;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver[key];
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toString(tmp2_safe_receiver);
    return tmp3_elvis_lhs == null ? this.v121_1.get(key) : tmp3_elvis_lhs;
  };
  function UrlKmp(url) {
    return new UrlKmpJs(new URL(url));
  }
  function UrlKmpJs(url) {
    this.x121_1 = url;
  }
  protoOf(UrlKmpJs).toString = function () {
    return toString(this.x121_1);
  };
  protoOf(UrlKmpJs).np2 = function (path) {
    return new UrlKmpJs(new URL(path, toString(this.x121_1)));
  };
  function Companion_210() {
  }
  protoOf(Companion_210).xqc = function (text) {
    return encodeURIComponent(text);
  };
  protoOf(Companion_210).wqc = function (text) {
    return decodeURIComponent(text);
  };
  var Companion_instance_259;
  function Companion_getInstance_227() {
    return Companion_instance_259;
  }
  function UstadAntilog(defaultTag) {
    defaultTag = defaultTag === VOID ? 'NoTag' : defaultTag;
    Antilog.call(this);
    this.y121_1 = defaultTag;
  }
  protoOf(UstadAntilog).t5d = function (priority, tag) {
    var tmp;
    var tmp_0;
    if (tag === 'DoorLog') {
      tmp_0 = priority.equals(LogLevel_DEBUG_getInstance()) ? true : priority.equals(LogLevel_VERBOSE_getInstance());
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = false;
    } else {
      tmp = true;
    }
    return tmp;
  };
  protoOf(UstadAntilog).v5d = function (priority, tag, throwable, message) {
    var logTag = tag == null ? this.y121_1 : tag;
    var tmp;
    if (!(message == null)) {
      var tmp_0;
      if (!(throwable == null)) {
        tmp_0 = '' + message + '\n' + throwable.message;
      } else {
        tmp_0 = message;
      }
      tmp = tmp_0;
    } else {
      var tmp2_elvis_lhs = throwable == null ? null : throwable.message;
      var tmp_1;
      if (tmp2_elvis_lhs == null) {
        return Unit_instance;
      } else {
        tmp_1 = tmp2_elvis_lhs;
      }
      tmp = tmp_1;
    }
    var fullMessage = tmp;
    switch (priority.za_1) {
      case 0:
        console.log('VERBOSE ' + logTag + ' : ' + fullMessage);
        break;
      case 1:
        console.log('DEBUG ' + logTag + ' : ' + fullMessage);
        break;
      case 2:
        console.info('INFO ' + logTag + ' : ' + fullMessage);
        break;
      case 3:
        console.warn('WARNING ' + logTag + ' : ' + fullMessage);
        break;
      case 4:
        console.error('ERROR ' + logTag + ' : ' + fullMessage);
        break;
      case 5:
        console.error('ASSERT ' + logTag + ' : ' + fullMessage);
        break;
    }
  };
  function forEach(_this__u8e3s4, block) {
    var collection = _this__u8e3s4;
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        block(collection[i]);
      }
       while (inductionVariable < last);
  }
  function bodyAsDecodedText(_this__u8e3s4, $completion) {
    return bodyAsText(_this__u8e3s4, VOID, $completion);
  }
  function rgbColorProperty(_this__u8e3s4) {
    // Inline function 'web.cssom.rgb' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return 'rgb(' + (_this__u8e3s4 >> 24 & 255) + ' ' + (_this__u8e3s4 >> 16 & 255) + ' ' + (_this__u8e3s4 >> 8 & 255) + ')';
  }
  function asWindowTarget(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.za_1) {
      case 0:
        // Inline function 'web.window.WindowTarget.Companion._blank' call

        0;
        tmp = '_blank';
        break;
      case 1:
        // Inline function 'web.window.WindowTarget.Companion._top' call

        0;
        tmp = '_top';
        break;
      case 2:
        // Inline function 'web.window.WindowTarget.Companion._self' call

        0;
        tmp = '_self';
        break;
      case 3:
        // Inline function 'web.window.WindowTarget.Companion._blank' call

        0;
        tmp = '_blank';
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function getOrPut(_this__u8e3s4, key, block) {
    var tmp0_elvis_lhs = _this__u8e3s4.getItem(key);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      // Inline function 'kotlin.also' call
      var this_0 = block();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.getOrPut.<anonymous>' call
      _this__u8e3s4.setItem(key, this_0);
      tmp = this_0;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function htmlToPlainText(_this__u8e3s4) {
    var element = document.createElement('div');
    element.innerHTML = replace(replace(replace(_this__u8e3s4, '<br/>', ' '), '<br>', ' '), '<\/p><p>', ' ');
    return element.innerText;
  }
  function JsHeaderStringValuesAdapter(headers) {
    this.z121_1 = headers;
  }
  protoOf(JsHeaderStringValuesAdapter).n2n = function (key) {
    var tmp0_safe_receiver = this.z121_1.get(key);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : split(tmp0_safe_receiver, [',']);
    return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
  };
  protoOf(JsHeaderStringValuesAdapter).o2n = function () {
    return toSet_0(this.z121_1.keys());
  };
  function asIStringValues_0(_this__u8e3s4) {
    return new JsHeaderStringValuesAdapter(_this__u8e3s4);
  }
  function randomUuidAsString() {
    var tmp;
    // Inline function 'com.ustadmobile.core.wrappers.window.isSecureContext' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp_0 = window.isSecureContext;
    if ((!(tmp_0 == null) ? typeof tmp_0 === 'boolean' : false) ? tmp_0 : THROW_CCE()) {
      tmp = crypto.randomUUID();
    } else {
      tmp = v4();
    }
    return tmp;
  }
  //region block: post-declaration
  protoOf(AuthManager).c57 = get_diContext;
  protoOf(AuthManager).d57 = get_diTrigger;
  protoOf($serializer).l4g = typeParametersSerializers;
  protoOf($serializer_0).l4g = typeParametersSerializers;
  protoOf($serializer_1).l4g = typeParametersSerializers;
  protoOf($serializer_2).l4g = typeParametersSerializers;
  protoOf($serializer_3).l4g = typeParametersSerializers;
  protoOf($serializer_4).l4g = typeParametersSerializers;
  protoOf($serializer_5).l4g = typeParametersSerializers;
  protoOf($serializer_6).l4g = typeParametersSerializers;
  protoOf($serializer_7).l4g = typeParametersSerializers;
  protoOf($serializer_8).l4g = typeParametersSerializers;
  protoOf($serializer_9).l4g = typeParametersSerializers;
  protoOf($serializer_10).l4g = typeParametersSerializers;
  protoOf($serializer_11).l4g = typeParametersSerializers;
  protoOf($serializer_12).l4g = typeParametersSerializers;
  protoOf($serializer_13).l4g = typeParametersSerializers;
  protoOf($serializer_14).l4g = typeParametersSerializers;
  protoOf($serializer_15).l4g = typeParametersSerializers;
  protoOf($serializer_16).l4g = typeParametersSerializers;
  protoOf($serializer_17).l4g = typeParametersSerializers;
  protoOf($serializer_18).l4g = typeParametersSerializers;
  protoOf($serializer_19).l4g = typeParametersSerializers;
  protoOf($serializer_20).l4g = typeParametersSerializers;
  protoOf($serializer_21).l4g = typeParametersSerializers;
  protoOf($serializer_22).l4g = typeParametersSerializers;
  protoOf($serializer_23).l4g = typeParametersSerializers;
  protoOf($serializer_24).l4g = typeParametersSerializers;
  protoOf($serializer_25).l4g = typeParametersSerializers;
  protoOf($serializer_26).l4g = typeParametersSerializers;
  protoOf($serializer_27).l4g = typeParametersSerializers;
  protoOf($serializer_28).l4g = typeParametersSerializers;
  protoOf($serializer_29).l4g = typeParametersSerializers;
  protoOf($serializer_30).l4g = typeParametersSerializers;
  protoOf($serializer_31).l4g = typeParametersSerializers;
  protoOf($serializer_32).l4g = typeParametersSerializers;
  protoOf($serializer_33).l4g = typeParametersSerializers;
  protoOf($serializer_34).l4g = typeParametersSerializers;
  protoOf($serializer_35).l4g = typeParametersSerializers;
  protoOf($serializer_36).l4g = typeParametersSerializers;
  protoOf($serializer_37).l4g = typeParametersSerializers;
  protoOf($serializer_38).l4g = typeParametersSerializers;
  protoOf($serializer_39).l4g = typeParametersSerializers;
  protoOf($serializer_40).l4g = typeParametersSerializers;
  protoOf($serializer_41).l4g = typeParametersSerializers;
  protoOf($serializer_42).l4g = typeParametersSerializers;
  protoOf($serializer_43).l4g = typeParametersSerializers;
  protoOf($serializer_44).l4g = typeParametersSerializers;
  protoOf($serializer_45).l4g = typeParametersSerializers;
  protoOf($serializer_46).l4g = typeParametersSerializers;
  protoOf($serializer_47).l4g = typeParametersSerializers;
  protoOf($serializer_48).l4g = typeParametersSerializers;
  protoOf($serializer_49).l4g = typeParametersSerializers;
  protoOf($serializer_50).l4g = typeParametersSerializers;
  protoOf($serializer_51).l4g = typeParametersSerializers;
  protoOf($serializer_52).l4g = typeParametersSerializers;
  protoOf($serializer_53).l4g = typeParametersSerializers;
  protoOf($serializer_54).l4g = typeParametersSerializers;
  protoOf($serializer_55).l4g = typeParametersSerializers;
  protoOf($serializer_56).l4g = typeParametersSerializers;
  protoOf($serializer_57).l4g = typeParametersSerializers;
  protoOf($serializer_58).l4g = typeParametersSerializers;
  protoOf(CommandFlowUstadNavController).rp6 = navigate$default;
  protoOf(UstadViewModel).c57 = get_diContext;
  protoOf(UstadViewModel).d57 = get_diTrigger;
  protoOf($serializer_59).l4g = typeParametersSerializers;
  protoOf($serializer_60).l4g = typeParametersSerializers;
  protoOf($serializer_61).l4g = typeParametersSerializers;
  protoOf($serializer_62).l4g = typeParametersSerializers;
  protoOf($serializer_63).l4g = typeParametersSerializers;
  protoOf($serializer_64).l4g = typeParametersSerializers;
  protoOf($serializer_65).l4g = typeParametersSerializers;
  protoOf(SaveLocalUrisAsBlobUseCaseJs).mor = invoke$default;
  protoOf(CompressImageUseCaseJs).yot = invoke$default_2;
  protoOf(GetSubtitleTrackFromUriUseCaseJs).yp3 = invoke$default_3;
  protoOf(SetLanguageUseCaseJs).npi = invoke$default_4;
  protoOf(ChunkedUploadClientLocalUriUseCaseJs).qpn = invoke$default_5;
  //endregion
  //region block: init
  Companion_instance_48 = new Companion();
  Companion_instance_50 = new Companion_1();
  Companion_instance_51 = new Companion_2();
  Companion_instance_53 = new Companion_4();
  Companion_instance_54 = new Companion_5();
  Companion_instance_55 = new Companion_6();
  BodySerializer_instance = new BodySerializer();
  Companion_instance_56 = new Companion_7();
  Companion_instance_57 = new Companion_8();
  Companion_instance_58 = new Companion_9();
  Companion_instance_60 = new Companion_11();
  Companion_instance_65 = new Companion_16();
  Companion_instance_66 = new Companion_17();
  Companion_instance_67 = new Companion_18();
  Companion_instance_68 = new Companion_19();
  Companion_instance_69 = new Companion_20();
  Companion_instance_70 = new Companion_21();
  Companion_instance_71 = new Companion_22();
  Companion_instance_73 = new Companion_24();
  Companion_instance_75 = new Companion_26();
  Companion_instance_80 = new Companion_31();
  Companion_instance_81 = new Companion_32();
  Companion_instance_82 = new Companion_33();
  Companion_instance_83 = new Companion_34();
  Companion_instance_84 = new Companion_35();
  Companion_instance_85 = new Companion_36();
  Companion_instance_87 = new Companion_38();
  Companion_instance_88 = new Companion_39();
  Companion_instance_89 = new Companion_40();
  Companion_instance_90 = new Companion_41();
  Companion_instance_91 = new Companion_42();
  Companion_instance_92 = new Companion_43();
  Companion_instance_93 = new Companion_44();
  Companion_instance_94 = new Companion_45();
  Companion_instance_96 = new Companion_47();
  Companion_instance_98 = new Companion_49();
  Companion_instance_99 = new Companion_50();
  Companion_instance_100 = new Companion_51();
  Companion_instance_101 = new Companion_52();
  Companion_instance_102 = new Companion_53();
  Companion_instance_103 = new Companion_54();
  Companion_instance_104 = new Companion_55();
  HEADER_UPLOAD_UUID = 'upload-uuid';
  HEADER_IS_FINAL_CHUNK = 'upload-final-chunk';
  HEADER_UPLOAD_START_BYTE = 'upload-start-byte';
  DEFAULT_CHUNK_SIZE = 524288;
  Companion_instance_109 = new Companion_60();
  Companion_instance_112 = new Companion_63();
  Companion_instance_113 = new Companion_64();
  Companion_instance_115 = new Companion_66();
  XapiInteractionTypeSerializer_instance = new XapiInteractionTypeSerializer();
  XapiObjectTypeSerializer_instance = new XapiObjectTypeSerializer();
  Companion_instance_120 = new Companion_71();
  XAPI_RESULT_EXTENSION_PROGRESS = 'https://w3id.org/xapi/cmi5/result/extensions/progress';
  Companion_instance_123 = new Companion_74();
  Companion_instance_124 = new Companion_75();
  VERB_COMPLETED = 'http://adlnet.gov/expapi/verbs/completed';
  VERB_PROGRESSED = 'http://adlnet.gov/expapi/verbs/progressed';
  Companion_instance_130 = new Companion_81();
  Companion_instance_131 = new Companion_82();
  Companion_instance_132 = new Companion_83();
  Companion_instance_133 = new Companion_84();
  Companion_instance_135 = new Companion_86();
  Companion_instance_136 = new Companion_87();
  DiTag_instance = new DiTag();
  MS_PER_HOUR = 3600000;
  MS_PER_MIN = 60000;
  Companion_instance_138 = new Companion_89();
  UNSET_DISTANT_FUTURE = new Long(-289930240, 1689);
  Companion_instance_139 = new Companion_90();
  Companion_instance_140 = new Companion_91();
  Companion_instance_141 = new Companion_92();
  Companion_instance_142 = new Companion_93();
  Companion_instance_143 = new Companion_94();
  Companion_instance_144 = new Companion_95();
  Companion_instance_145 = new Companion_96();
  Companion_instance_146 = new Companion_97();
  Companion_instance_149 = new Companion_100();
  Companion_instance_150 = new Companion_101();
  Companion_instance_151 = new Companion_102();
  Companion_instance_152 = new Companion_103();
  Companion_instance_153 = new Companion_104();
  Companion_instance_154 = new Companion_105();
  Companion_instance_156 = new Companion_107();
  Companion_instance_158 = new Companion_109();
  Companion_instance_159 = new Companion_110();
  Companion_instance_160 = new Companion_111();
  Companion_instance_161 = new Companion_112();
  Companion_instance_162 = new Companion_113();
  Companion_instance_163 = new Companion_114();
  Companion_instance_165 = new Companion_116();
  Companion_instance_167 = new Companion_118();
  Companion_instance_168 = new Companion_119();
  Companion_instance_169 = new Companion_120();
  Companion_instance_170 = new Companion_121();
  Companion_instance_171 = new Companion_122();
  Companion_instance_174 = new Companion_125();
  Companion_instance_175 = new Companion_126();
  Companion_instance_176 = new Companion_127();
  Companion_instance_177 = new Companion_128();
  Companion_instance_178 = new Companion_129();
  Companion_instance_179 = new Companion_130();
  Companion_instance_181 = new Companion_132();
  Companion_instance_182 = new Companion_133();
  Companion_instance_184 = new Companion_135();
  Companion_instance_185 = new Companion_136();
  Companion_instance_186 = new Companion_137();
  Companion_instance_187 = new Companion_138();
  Companion_instance_188 = new Companion_139();
  Companion_instance_189 = new Companion_140();
  Companion_instance_190 = new Companion_141();
  Companion_instance_191 = new Companion_142();
  Companion_instance_193 = new Companion_144();
  Companion_instance_194 = new Companion_145();
  Companion_instance_195 = new Companion_146();
  Companion_instance_196 = new Companion_147();
  Companion_instance_197 = new Companion_148();
  Companion_instance_198 = new Companion_149();
  Companion_instance_199 = new Companion_150();
  Companion_instance_200 = new Companion_151();
  Companion_instance_203 = new Companion_154();
  Companion_instance_204 = new Companion_155();
  Companion_instance_208 = new Companion_159();
  Companion_instance_209 = new Companion_160();
  Companion_instance_210 = new Companion_161();
  Companion_instance_211 = new Companion_162();
  Companion_instance_213 = new Companion_164();
  Companion_instance_214 = new Companion_165();
  Companion_instance_215 = new Companion_166();
  Companion_instance_216 = new Companion_167();
  Companion_instance_217 = new Companion_168();
  Companion_instance_218 = new Companion_169();
  Companion_instance_219 = new Companion_170();
  Companion_instance_220 = new Companion_171();
  Companion_instance_221 = new Companion_172();
  Companion_instance_223 = new Companion_174();
  Companion_instance_224 = new Companion_175();
  Companion_instance_225 = new Companion_176();
  PersonViewModelConstants_instance = new PersonViewModelConstants();
  Companion_instance_226 = new Companion_177();
  Companion_instance_227 = new Companion_178();
  Companion_instance_228 = new Companion_179();
  Companion_instance_230 = new Companion_181();
  Companion_instance_231 = new Companion_182();
  Companion_instance_232 = new Companion_183();
  Companion_instance_233 = new Companion_184();
  Companion_instance_235 = new Companion_186();
  Companion_instance_237 = new Companion_188();
  Companion_instance_238 = new Companion_189();
  Companion_instance_239 = new Companion_190();
  Companion_instance_240 = new Companion_191();
  Companion_instance_241 = new Companion_192();
  Companion_instance_242 = new Companion_193();
  Companion_instance_243 = new Companion_194();
  Companion_instance_244 = new Companion_195();
  Companion_instance_246 = new Companion_197();
  Companion_instance_247 = new Companion_198();
  Companion_instance_248 = new Companion_199();
  Companion_instance_249 = new Companion_200();
  Companion_instance_251 = new Companion_202();
  Companion_instance_252 = new Companion_203();
  Companion_instance_253 = new Companion_204();
  Companion_instance_254 = new Companion_205();
  Companion_instance_255 = new Companion_206();
  NAVHOST_CLEARSTACK_VIEWNAME = 'ClearStack';
  Companion_instance_256 = new Companion_207();
  Companion_instance_257 = new Companion_208();
  Companion_instance_258 = new Companion_209();
  Companion_instance_259 = new Companion_210();
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = AuthManager;
  _.$_$.b = LearningSpace;
  _.$_$.c = Pbkdf2Params;
  _.$_$.d = UserSessionWithPersonAndLearningSpace;
  _.$_$.e = UstadAccountManager;
  _.$_$.f = get_DIContext;
  _.$_$.g = get_DIModule;
  _.$_$.h = get_NAVHOST_CLEARSTACK_VIEWNAME;
  _.$_$.i = get_NavHost;
  _.$_$.j = get_NavHostClearStackPlaceholder;
  _.$_$.k = GetContentManifestUseCase;
  _.$_$.l = EnrolIntoCourseUseCase;
  _.$_$.m = get_entries;
  _.$_$.n = ContentEntryGetMetadataStatus;
  _.$_$.o = FilterUsernameUseCase;
  _.$_$.p = VersionInfo;
  _.$_$.q = GetVersionUseCase;
  _.$_$.r = ClazzInviteRedeemUseCase;
  _.$_$.s = EnrollToCourseFromInviteCodeUseCase;
  _.$_$.t = GoToLearningSpaceUseCaseJs;
  _.$_$.u = GoToLearningSpaceUseCase;
  _.$_$.v = GetLocalAccountsSupportedUseCase;
  _.$_$.w = OnClickLinkUseCase;
  _.$_$.x = OpenExternalLinkUseCase;
  _.$_$.y = BulkAddPersonsFromLocalUriUseCaseJs;
  _.$_$.z = BulkAddPersonsFromLocalUriUseCase;
  _.$_$.a1 = GetShowPoweredByUseCase;
  _.$_$.b1 = DismissSocialWarningUseCase;
  _.$_$.c1 = ShowSocialWarningUseCase;
  _.$_$.d1 = ValidateUsernameUseCase_0;
  _.$_$.e1 = FormattedStatementResponse;
  _.$_$.f1 = collectAsState;
  _.$_$.g1 = useCoroutineScope;
  _.$_$.h1 = useLaunchedEffect;
  _.$_$.i1 = useNavControllerEffect;
  _.$_$.j1 = useOnUnloadEffect;
  _.$_$.k1 = useStringProvider;
  _.$_$.l1 = useViewModel;
  _.$_$.m1 = get_ustadViewName;
  _.$_$.n1 = AppUiState;
  _.$_$.o1 = SnackBarDispatcher;
  _.$_$.p1 = TabItem;
  _.$_$.q1 = BuildConfigMap;
  _.$_$.r1 = GenderConfig;
  _.$_$.s1 = SupportedLanguagesConfig;
  _.$_$.t1 = SystemUrlConfig;
  _.$_$.u1 = UstadBuildConfig;
  _.$_$.v1 = DomainDiModuleJs;
  _.$_$.w1 = commonClientDomainDiModule;
  _.$_$.x1 = commonDomainDiModule;
  _.$_$.y1 = StringProviderJs;
  _.$_$.z1 = mapLookup;
  _.$_$.a2 = CommandFlowUstadNavController;
  _.$_$.b2 = NavResultReturnerImpl;
  _.$_$.c2 = NavResultReturner;
  _.$_$.d2 = UstadMobileSystemImpl;
  _.$_$.e2 = BitmaskFlag;
  _.$_$.f2 = ListPagingSource;
  _.$_$.g2 = RefreshCommand;
  _.$_$.h2 = get_totalAttendeeStatusRecorded;
  _.$_$.i2 = capitalizeFirstLetter;
  _.$_$.j2 = chopOffSeconds_0;
  _.$_$.k2 = chopOffSeconds;
  _.$_$.l2 = displayName;
  _.$_$.m2 = filterByFlags;
  _.$_$.n2 = forEach;
  _.$_$.o2 = formattedString;
  _.$_$.p2 = getOrPut;
  _.$_$.q2 = hasFlag_0;
  _.$_$.r2 = htmlToPlainText;
  _.$_$.s2 = initial;
  _.$_$.t2 = maxScoreSummedIfModule;
  _.$_$.u2 = penaltyPercentage;
  _.$_$.v2 = personFullName;
  _.$_$.w2 = get_progressAsFloat;
  _.$_$.x2 = requirePostfix;
  _.$_$.y2 = rgbColorProperty;
  _.$_$.z2 = textLength;
  _.$_$.a3 = toDisplayString;
  _.$_$.b3 = toNullIfBlank;
  _.$_$.c3 = toTerminologyEntries;
  _.$_$.d3 = get_MS_PER_HOUR;
  _.$_$.e3 = get_MS_PER_MIN;
  _.$_$.f3 = MessageIdOption2;
  _.$_$.g3 = SortOrderOption;
  _.$_$.h3 = UstadAntilog;
  _.$_$.i3 = avatarColorForName;
  _.$_$.j3 = OpenLicensesViewModel;
  _.$_$.k3 = AddAccountSelectNewOrExistingUiState;
  _.$_$.l3 = AddAccountSelectNewOrExistingViewModel;
  _.$_$.m3 = AddAccountSelectNewOrExistingUserTypeUiState;
  _.$_$.n3 = AddAccountSelectNewOrExistingUserTypeViewModel;
  _.$_$.o3 = AccountListUiState;
  _.$_$.p3 = AccountListViewModel;
  _.$_$.q3 = ClazzDetailUiState;
  _.$_$.r3 = ClazzDetailViewModel;
  _.$_$.s3 = ClazzDetailOverviewUiState;
  _.$_$.t3 = ClazzDetailOverviewViewModel;
  _.$_$.u3 = ClazzEditUiState;
  _.$_$.v3 = ClazzEditViewModel;
  _.$_$.w3 = ClazzGradebookUiState;
  _.$_$.x3 = ClazzGradebookViewModel;
  _.$_$.y3 = aggregateIfModule;
  _.$_$.z3 = displayMarkFor;
  _.$_$.a4 = maxScoreForBlock;
  _.$_$.b4 = get_thumbnailUri;
  _.$_$.c4 = ClazzInviteRedeemUiState;
  _.$_$.d4 = ClazzInviteRedeemViewModel;
  _.$_$.e4 = ClazzInviteViaContactUiState;
  _.$_$.f4 = ClazzInviteViaContactViewModel;
  _.$_$.g4 = ClazzInviteViaLinkUiState;
  _.$_$.h4 = ClazzInviteViaLinkViewModel;
  _.$_$.i4 = JoinWithCodeUiState;
  _.$_$.j4 = JoinWithCodeViewModel;
  _.$_$.k4 = ClazzListUiState;
  _.$_$.l4 = ClazzListViewModel;
  _.$_$.m4 = CoursePermissionDetailUiState;
  _.$_$.n4 = CoursePermissionDetailViewModel;
  _.$_$.o4 = CoursePermissionEditUiState;
  _.$_$.p4 = CoursePermissionEditViewModel;
  _.$_$.q4 = CoursePermissionListUiState;
  _.$_$.r4 = CoursePermissionListViewModel;
  _.$_$.s4 = get_blockTypeStringResource;
  _.$_$.t4 = defaultCourseBannerImageIndex;
  _.$_$.u4 = AssignmentSubmitterSummaryUiState;
  _.$_$.v4 = ClazzAssignmentDetailSubmissionsTabUiState;
  _.$_$.w4 = ClazzAssignmentDetailSubmissionsTabViewModel;
  _.$_$.x4 = get_listItemUiState;
  _.$_$.y4 = ClazzAssignmentDetailUiState;
  _.$_$.z4 = ClazzAssignmentDetailViewModel;
  _.$_$.a5 = ClazzAssignmentDetailOverviewUiState;
  _.$_$.b5 = ClazzAssignmentDetailOverviewViewModel;
  _.$_$.c5 = ClazzAssignmentDetailoverviewSubmissionUiState;
  _.$_$.d5 = ClazzAssignmentEditUiState;
  _.$_$.e5 = ClazzAssignmentEditViewModel;
  _.$_$.f5 = PeerReviewerAllocationEditUIState;
  _.$_$.g5 = PeerReviewerAllocationEditViewModel;
  _.$_$.h5 = ClazzAssignmentSubmitterDetailUiState;
  _.$_$.i5 = ClazzAssignmentSubmitterDetailViewModel;
  _.$_$.j5 = get_entries_1;
  _.$_$.k5 = values_2;
  _.$_$.l5 = UstadCourseAssignmentMarkListItemUiState;
  _.$_$.m5 = avatarColorName;
  _.$_$.n5 = avatarName;
  _.$_$.o5 = get_isFromSubmitterGroup;
  _.$_$.p5 = ClazzMemberListUiState;
  _.$_$.q5 = ClazzMemberListViewModel;
  _.$_$.r5 = ClazzEnrolmentEditUiState;
  _.$_$.s5 = ClazzEnrolmentEditViewModel;
  _.$_$.t5 = ClazzEnrolmentListUiState;
  _.$_$.u5 = ClazzEnrolmentListViewModel;
  _.$_$.v5 = ClazzLogListAttendanceUiState;
  _.$_$.w5 = ClazzLogListAttendanceViewModel;
  _.$_$.x5 = ClazzLogEditUiState;
  _.$_$.y5 = ClazzLogEditViewModel;
  _.$_$.z5 = ClazzLogEditAttendanceUiState;
  _.$_$.a6 = ClazzLogEditAttendanceViewModel;
  _.$_$.b6 = ContentEntryDetailUiState;
  _.$_$.c6 = ContentEntryDetailViewModel;
  _.$_$.d6 = ContentEntryDetailAttemptsPersonListUiState;
  _.$_$.e6 = ContentEntryDetailAttemptsPersonListViewModel;
  _.$_$.f6 = ContentEntryDetailAttemptsSessionListUiState;
  _.$_$.g6 = ContentEntryDetailAttemptsSessionListViewModel;
  _.$_$.h6 = ContentEntryDetailAttemptsStatementListUiState;
  _.$_$.i6 = ContentEntryDetailAttemptsStatementListViewModel;
  _.$_$.j6 = get_descriptionStringRes;
  _.$_$.k6 = get_statementSummary;
  _.$_$.l6 = get_statementSummary_0;
  _.$_$.m6 = get_verbDisplayName;
  _.$_$.n6 = ContentEntryDetailOverviewUiState;
  _.$_$.o6 = ContentEntryDetailOverviewViewModel;
  _.$_$.p6 = get_progress;
  _.$_$.q6 = ContentEntryEditUiState;
  _.$_$.r6 = ContentEntryEditViewModel;
  _.$_$.s6 = ContentEntryGetMetadataUiState;
  _.$_$.t6 = ContentEntryGetMetadataViewModel;
  _.$_$.u6 = GetSubtitleUiState;
  _.$_$.v6 = GetSubtitleViewModel;
  _.$_$.w6 = ContentEntryImportLinkUiState;
  _.$_$.x6 = ContentEntryImportLinkViewModel;
  _.$_$.y6 = ContentEntryListItemUiState;
  _.$_$.z6 = ContentEntryListUiState;
  _.$_$.a7 = ContentEntryListViewModel;
  _.$_$.b7 = get_listItemUiState_0;
  _.$_$.c7 = SubtitleEditUiState;
  _.$_$.d7 = SubtitleEditViewModel;
  _.$_$.e7 = get_contentTypeStringResource;
  _.$_$.f7 = get_stringResource;
  _.$_$.g7 = CourseBlockEditUiState;
  _.$_$.h7 = CourseBlockEditViewModel;
  _.$_$.i7 = TextBlockDetailUiState;
  _.$_$.j7 = TextBlockDetailViewModel;
  _.$_$.k7 = CourseGroupSetDetailUiState;
  _.$_$.l7 = CourseGroupSetDetailViewModel;
  _.$_$.m7 = CourseGroupSetEditUiState;
  _.$_$.n7 = CourseGroupSetEditViewModel;
  _.$_$.o7 = appendGroupNumIfNotInList;
  _.$_$.p7 = CourseGroupSetListUiState;
  _.$_$.q7 = CourseGroupSetListViewModel;
  _.$_$.r7 = CourseTerminologyEditUiState;
  _.$_$.s7 = CourseTerminologyEditViewModel;
  _.$_$.t7 = CourseTerminologyListUiState;
  _.$_$.u7 = CourseTerminologyListViewModel;
  _.$_$.v7 = DeletedItemListUiState;
  _.$_$.w7 = DeletedItemListViewModel;
  _.$_$.x7 = get_delItemContentTypeStringResource;
  _.$_$.y7 = CourseDiscussionDetailUiState;
  _.$_$.z7 = CourseDiscussionDetailViewModel;
  _.$_$.a8 = DiscussionPostDetailUiState2;
  _.$_$.b8 = DiscussionPostDetailViewModel;
  _.$_$.c8 = DiscussionPostEditUiState;
  _.$_$.d8 = DiscussionPostEditViewModel;
  _.$_$.e8 = EpubContentUiState;
  _.$_$.f8 = EpubContentViewModel;
  _.$_$.g8 = EpubScrollCommand;
  _.$_$.h8 = LoginUiState;
  _.$_$.i8 = LoginViewModel;
  _.$_$.j8 = ConversationListUiState;
  _.$_$.k8 = ConversationListViewModel;
  _.$_$.l8 = MessageListUiState;
  _.$_$.m8 = MessageListViewModel;
  _.$_$.n8 = daysUntil_0;
  _.$_$.o8 = ParentalConsentManagementUiState;
  _.$_$.p8 = ParentalConsentManagementViewModel;
  _.$_$.q8 = PdfContentUiState;
  _.$_$.r8 = PdfContentViewModel;
  _.$_$.s8 = PersonAccountEditUiState;
  _.$_$.t8 = PersonAccountEditViewModel;
  _.$_$.u8 = PersonUsernameAndPasswordModel;
  _.$_$.v8 = BulkAddPersonRunImportUiState;
  _.$_$.w8 = BulkAddPersonRunImportViewModel;
  _.$_$.x8 = BulkAddPersonSelectFileUiState;
  _.$_$.y8 = BulkAddPersonSelectFileViewModel;
  _.$_$.z8 = AddChildProfilesUiState;
  _.$_$.a9 = AddChildProfilesViewModel;
  _.$_$.b9 = EditChildProfileUiState;
  _.$_$.c9 = EditChildProfileViewModel;
  _.$_$.d9 = PersonDetailUiState;
  _.$_$.e9 = PersonDetailViewModel;
  _.$_$.f9 = PersonEditUiState;
  _.$_$.g9 = PersonEditViewModel;
  _.$_$.h9 = LearningSpaceListUiState;
  _.$_$.i9 = LearningSpaceListViewModel;
  _.$_$.j9 = PersonListUiState;
  _.$_$.k9 = PersonListViewModel;
  _.$_$.l9 = ManageAccountUiState;
  _.$_$.m9 = ManageAccountViewModel;
  _.$_$.n9 = RegisterAgeRedirectUiState;
  _.$_$.o9 = RegisterAgeRedirectViewModel;
  _.$_$.p9 = RegisterMinorWaitForParentUiState;
  _.$_$.q9 = RegisterMinorWaitForParentViewModel;
  _.$_$.r9 = RedirectViewModel;
  _.$_$.s9 = ScheduleEditUiState;
  _.$_$.t9 = ScheduleEditViewModel;
  _.$_$.u9 = SettingsUiState;
  _.$_$.v9 = SettingsViewModel;
  _.$_$.w9 = SignUpUiState;
  _.$_$.x9 = SignUpViewModel;
  _.$_$.y9 = SignupEnterUsernamePasswordUiState;
  _.$_$.z9 = SignupEnterUsernamePasswordViewModel;
  _.$_$.aa = SiteDetailUiState;
  _.$_$.ba = SiteDetailViewModel;
  _.$_$.ca = SiteEditUiState;
  _.$_$.da = SiteEditViewModel;
  _.$_$.ea = SiteTermsDetailUiState;
  _.$_$.fa = SiteTermsDetailViewModel;
  _.$_$.ga = LearningSpaceEnterLinkUiState;
  _.$_$.ha = LearningSpaceEnterLinkViewModel;
  _.$_$.ia = SystemPermissionDetailUiState;
  _.$_$.ja = SystemPermissionDetailViewModel;
  _.$_$.ka = SystemPermissionEditUiState;
  _.$_$.la = SystemPermissionEditViewModel;
  _.$_$.ma = TimeZoneListViewModel;
  _.$_$.na = TimezoneListUiState;
  _.$_$.oa = VideoContentUiState;
  _.$_$.pa = MediaPlayState;
  _.$_$.qa = VideoContentViewModel;
  _.$_$.ra = XapiContentUiState;
  _.$_$.sa = XapiContentViewModel;
  _.$_$.ta = ErrorReportUiState;
  _.$_$.ua = HolidayCalendarDetailUIState;
  _.$_$.va = HolidayCalendarEditUiState;
  _.$_$.wa = HolidayCalendarListUiState;
  _.$_$.xa = LanguageDetailUiState;
  _.$_$.ya = LanguageEditUiState;
  _.$_$.za = LanguageListUiState;
  _.$_$.ab = LeavingReasonEditUiState;
  _.$_$.bb = LeavingReasonEditViewModel;
  _.$_$.cb = ReportFilterEditUiState;
  _.$_$.db = ScopedGrantDetailUiState;
  _.$_$.eb = ScopedGrantEditUiState;
  _.$_$.fb = CompressionLevel_MEDIUM_getInstance;
  _.$_$.gb = LinkTarget_DEFAULT_getInstance;
  _.$_$.hb = AppBarColors_SELECTION_MODE_getInstance;
  _.$_$.ib = AppBarColors_STANDARD_getInstance;
  _.$_$.jb = FabIcon_ADD_getInstance;
  _.$_$.kb = FabIcon_EDIT_getInstance;
  _.$_$.lb = State_INDETERMINATE_getInstance;
  _.$_$.mb = MarkingType_PEERS_getInstance;
  _.$_$.nb = TextLimitType_LIMIT_WORDS_getInstance;
  _.$_$.ob = SupportedLanguagesConfig_init_$Create$;
  _.$_$.pb = _AssignmentSubmitterSummaryUiState___get_fileSubmissionStatusIconVisible__impl__so25h0;
  _.$_$.qb = _AssignmentSubmitterSummaryUiState___get_latestPrivateCommentVisible__impl__bdq0p0;
  _.$_$.rb = _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2;
  _.$_$.sb = _ContentEntryListItemUiState___get_descriptionVisible__impl__xyu083;
  _.$_$.tb = _ContentEntryListItemUiState___get_mimetypeVisible__impl__l8r8g7;
  _.$_$.ub = Companion_getInstance_17;
  _.$_$.vb = PersonConstants_getInstance;
  _.$_$.wb = SubmissionConstants_getInstance;
  _.$_$.xb = Companion_getInstance_54;
  _.$_$.yb = Companion_instance_99;
  _.$_$.zb = Companion_instance_103;
  _.$_$.ac = Companion_getInstance_73;
  _.$_$.bc = Companion_instance_130;
  _.$_$.cc = Companion_instance_131;
  _.$_$.dc = Companion_instance_132;
  _.$_$.ec = Companion_instance_133;
  _.$_$.fc = ClazzEnrolmentListConstants_getInstance;
  _.$_$.gc = ConditionConstants_getInstance;
  _.$_$.hc = ContentCompletionStatusConstants_getInstance;
  _.$_$.ic = EnrolmentPolicyConstants_getInstance;
  _.$_$.jc = FieldConstants_getInstance;
  _.$_$.kc = LicenceConstants_getInstance;
  _.$_$.lc = OutcomeConstants_getInstance;
  _.$_$.mc = PersonParentJoinConstants_getInstance;
  _.$_$.nc = RoleConstants_getInstance;
  _.$_$.oc = ScheduleConstants_getInstance;
  _.$_$.pc = SubmissionPolicyConstants_getInstance;
  _.$_$.qc = UstadMobileConstants_getInstance;
  _.$_$.rc = Companion_getInstance_96;
  _.$_$.sc = DiTag_instance;
  _.$_$.tc = Companion_getInstance_105;
  _.$_$.uc = UMFileUtil_getInstance;
  _.$_$.vc = Companion_instance_138;
  _.$_$.wc = Companion_instance_140;
  _.$_$.xc = Companion_instance_141;
  _.$_$.yc = Companion_instance_142;
  _.$_$.zc = Companion_instance_143;
  _.$_$.ad = Companion_instance_144;
  _.$_$.bd = Companion_instance_145;
  _.$_$.cd = Companion_instance_146;
  _.$_$.dd = Companion_instance_158;
  _.$_$.ed = Companion_instance_159;
  _.$_$.fd = Companion_instance_160;
  _.$_$.gd = Companion_instance_161;
  _.$_$.hd = Companion_instance_162;
  _.$_$.id = Companion_instance_163;
  _.$_$.jd = Companion_instance_165;
  _.$_$.kd = Companion_instance_167;
  _.$_$.ld = Companion_instance_168;
  _.$_$.md = Companion_instance_169;
  _.$_$.nd = Companion_instance_170;
  _.$_$.od = Companion_instance_171;
  _.$_$.pd = Companion_getInstance_141;
  _.$_$.qd = Companion_getInstance_140;
  _.$_$.rd = Companion_instance_174;
  _.$_$.sd = Companion_instance_175;
  _.$_$.td = Companion_instance_176;
  _.$_$.ud = Companion_instance_179;
  _.$_$.vd = Companion_instance_178;
  _.$_$.wd = Companion_instance_181;
  _.$_$.xd = Companion_instance_182;
  _.$_$.yd = Companion_instance_184;
  _.$_$.zd = Companion_instance_185;
  _.$_$.ae = Companion_instance_177;
  _.$_$.be = ClazzAssignmentViewModelConstants_getInstance;
  _.$_$.ce = Companion_instance_186;
  _.$_$.de = Companion_instance_187;
  _.$_$.ee = Companion_instance_188;
  _.$_$.fe = Companion_instance_189;
  _.$_$.ge = Companion_instance_190;
  _.$_$.he = Companion_instance_191;
  _.$_$.ie = Companion_getInstance_160;
  _.$_$.je = Companion_instance_193;
  _.$_$.ke = Companion_instance_194;
  _.$_$.le = Companion_instance_195;
  _.$_$.me = Companion_instance_196;
  _.$_$.ne = Companion_instance_197;
  _.$_$.oe = Companion_instance_198;
  _.$_$.pe = Companion_instance_199;
  _.$_$.qe = Companion_instance_200;
  _.$_$.re = Companion_getInstance_169;
  _.$_$.se = Companion_instance_204;
  _.$_$.te = Companion_getInstance_174;
  _.$_$.ue = Companion_instance_208;
  _.$_$.ve = Companion_getInstance_173;
  _.$_$.we = Companion_instance_209;
  _.$_$.xe = Companion_instance_210;
  _.$_$.ye = Companion_instance_211;
  _.$_$.ze = Companion_instance_213;
  _.$_$.af = Companion_instance_214;
  _.$_$.bf = Companion_instance_215;
  _.$_$.cf = Companion_instance_216;
  _.$_$.df = Companion_instance_217;
  _.$_$.ef = Companion_instance_218;
  _.$_$.ff = Companion_instance_219;
  _.$_$.gf = Companion_instance_221;
  _.$_$.hf = Companion_getInstance_190;
  _.$_$.if = Companion_instance_223;
  _.$_$.jf = Companion_instance_224;
  _.$_$.kf = Companion_instance_225;
  _.$_$.lf = Companion_instance_226;
  _.$_$.mf = Companion_instance_228;
  _.$_$.nf = Companion_instance_230;
  _.$_$.of = Companion_instance_231;
  _.$_$.pf = Companion_instance_232;
  _.$_$.qf = Companion_instance_233;
  _.$_$.rf = Companion_getInstance_202;
  _.$_$.sf = Companion_instance_235;
  _.$_$.tf = Companion_getInstance_204;
  _.$_$.uf = Companion_instance_237;
  _.$_$.vf = Companion_instance_238;
  _.$_$.wf = Companion_instance_239;
  _.$_$.xf = Companion_instance_241;
  _.$_$.yf = Companion_instance_243;
  _.$_$.zf = Companion_getInstance_213;
  _.$_$.ag = Companion_instance_246;
  _.$_$.bg = Companion_instance_247;
  _.$_$.cg = Companion_instance_248;
  _.$_$.dg = Companion_instance_249;
  _.$_$.eg = Companion_getInstance_218;
  _.$_$.fg = Companion_instance_251;
  _.$_$.gg = Companion_instance_252;
  _.$_$.hg = Companion_instance_253;
  _.$_$.ig = Companion_instance_254;
  _.$_$.jg = Companion_instance_255;
  _.$_$.kg = Companion_instance_149;
  _.$_$.lg = Companion_instance_150;
  _.$_$.mg = Companion_instance_151;
  _.$_$.ng = Companion_instance_152;
  _.$_$.og = Companion_instance_153;
  _.$_$.pg = Companion_instance_154;
  _.$_$.qg = Companion_getInstance_125;
  _.$_$.rg = strings_getInstance;
  _.$_$.sg = MR_getInstance;
  //endregion
  return _;
}(module.exports, require('react'), require('react-router'), require('compressorjs'), require('libphonenumber-js'), require('react-router-dom'), require('uuid'), require('./kotlin-kotlin-stdlib.js'), require('./moko-resources-resources.js'), require('./UstadMobile-lib-database.js'), require('./Kosi-Kodein-kodein-di.js'), require('./Kosi-Kaverit-kaverit.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./ktor-ktor-http.js'), require('./kotlinx-coroutines-core.js'), require('./door-door-runtime.js'), require('./ktor-ktor-client-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./Napier-napier-js-ir.js'), require('./kotlinx-atomicfu.js'), require('./xmlutil-serialization.js'), require('./xmlutil-core.js'), require('./uuid.js'), require('./UstadMobile-lib-util.js'), require('./Kotlin-DateTime-library-kotlinx-datetime-js-ir.js'), require('./urlencoder-urlencoder-lib.js'), require('./xmlpullparserkmp.js'), require('./ktor-ktor-utils.js'), require('./UstadMobile-lib-xxhashkmp-core.js'), require('./multiplatform-paging-root-paging-common.js'), require('./precompose-precompose-viewmodel.js'), require('./UstadMobile-lib-centralappconfigdb-common.js'), require('./MultiplatformSettings-multiplatform-settings.js'), require('./kotlin-react-core.js'), require('./kotlin-react.js'), require('./kotlin-web.js'), require('./kotlin-js.js')));

//# sourceMappingURL=UstadMobile-core.js.map
